From d2f96daced825d2eb60e1deeb9d02c90ba77f750 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 25 Feb 2020 10:27:20 +0300 Subject: [PATCH 001/277] Preview missing values --- instat/dlgImportDataset.vb | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index 0b972a5c703..8e8c96797d8 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -721,7 +721,7 @@ Public Class dlgImportDataset End If clsTempImport = clsImportExcel.Clone() strRowMaxParamName = "n_max" - clsTempImport.AddParameter("na", Chr(34) & ucrInputMissingValueStringExcel.GetText & Chr(34)) + clsTempImport.AddParameter("na", GetMissingValueRText) End If If clsTempImport.ContainsParameter(strRowMaxParamName) Then If Integer.TryParse(clsTempImport.GetParameter(strRowMaxParamName).strArgumentValue, iTemp) Then @@ -982,4 +982,26 @@ Public Class dlgImportDataset Next Return keyList End Function + + Private Function GetMissingValueRText() As String + Dim arrStr() As String = ucrInputMissingValueStringExcel.GetText().Split(",") + Dim strMissingValue As String + + If arrStr.Length < 2 Then + strMissingValue = Chr(34) & ucrInputMissingValueStringExcel.GetText() & Chr(34) + Else + strMissingValue = "" + For Each strTemp As String In arrStr + If strMissingValue = "" Then + strMissingValue = Chr(34) & strTemp & Chr(34) + Else + strMissingValue = strMissingValue & "," & Chr(34) & strTemp & Chr(34) + End If + + Next + strMissingValue = "c(" & strMissingValue & ")" + End If + + Return strMissingValue + End Function End Class From 605ec871a3abba13e398b0aaeb8a466db42dc40c Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 26 Feb 2020 10:28:07 +0300 Subject: [PATCH 002/277] restoring selected sheets and setting multiple values --- instat/dlgImportDataset.vb | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index 8e8c96797d8..ff0b13ff374 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -253,8 +253,8 @@ Public Class dlgImportDataset '############################################################## 'EXCEL controls - ucrInputMissingValueStringExcel.SetParameter(New RParameter("na")) - ucrInputMissingValueStringExcel.SetRDefault(Chr(34) & "" & Chr(34)) + 'ucrInputMissingValueStringExcel.SetParameter(New RParameter("na")) + 'ucrInputMissingValueStringExcel.SetRDefault(Chr(34) & "" & Chr(34)) ucrChkTrimWSExcel.SetText("Trim Trailing White Space") ucrChkTrimWSExcel.SetParameter(New RParameter("trim_ws"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") @@ -512,14 +512,14 @@ Public Class dlgImportDataset 'EXCEL CONTROLS ucrNudRowsToSkipExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("skip"), iAdditionalPairNo:=1) - ucrInputMissingValueStringExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("na"), iAdditionalPairNo:=1) + 'ucrInputMissingValueStringExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("na"), iAdditionalPairNo:=1) ucrChkTrimWSExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("trim_ws"), iAdditionalPairNo:=1) ucrChkColumnNamesExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("col_names"), iAdditionalPairNo:=1) ucrNudMaxRowsExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("n_max"), iAdditionalPairNo:=1) ucrChkMaxRowsExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("n_max"), iAdditionalPairNo:=1) ucrNudRowsToSkipExcel.SetRCode(clsImportExcel, bReset) - ucrInputMissingValueStringExcel.SetRCode(clsImportExcel, bReset) + 'ucrInputMissingValueStringExcel.SetRCode(clsImportExcel, bReset) ucrChkTrimWSExcel.SetRCode(clsImportExcel, bReset) ucrChkColumnNamesExcel.SetRCode(clsImportExcel, bReset) ucrNudMaxRowsExcel.SetRCode(clsImportExcel, bReset) @@ -786,6 +786,7 @@ Public Class dlgImportDataset Private Sub FillExcelSheets(strFilePath As String) Dim expSheet As SymbolicExpression Dim chrSheets As CharacterVector + Dim lstCheckedItems As New List(Of String) expSheet = frmMain.clsRLink.RunInternalScriptGetValue(clsGetExcelSheetNames.ToScript()) If expSheet IsNot Nothing Then @@ -794,9 +795,26 @@ Public Class dlgImportDataset chrSheets = Nothing End If + 'store the checked items first temporarily + For i As Integer = 0 To clbSheets.CheckedItems.Count - 1 + lstCheckedItems.Add(clbSheets.CheckedItems(i).ToString) + Next + clbSheets.Items.Clear() If chrSheets IsNot Nothing AndAlso chrSheets.Count > 0 Then clbSheets.Items.AddRange(chrSheets.ToArray()) + + 'if there were previously checked items then restore them + If lstCheckedItems.Count > 0 Then + For i As Integer = 0 To clbSheets.Items.Count - 1 + For Each strSelected As String In lstCheckedItems + If strSelected = clbSheets.Items(i).ToString Then + clbSheets.SetItemChecked(i, True) + End If + Next + Next + End If + 'If dctSelectedExcelSheets.Count = 0 Then ' clbSheets.SetItemChecked(0, True) 'Else @@ -983,6 +1001,11 @@ Public Class dlgImportDataset Return keyList End Function + Private Sub ucrInputMissingValueStringExcel_ContentsChanged() Handles ucrInputMissingValueStringExcel.ContentsChanged + clsImportExcelMulti.AddParameter("na", GetMissingValueRText) + clsImportExcel.AddParameter("na", GetMissingValueRText) + End Sub + Private Function GetMissingValueRText() As String Dim arrStr() As String = ucrInputMissingValueStringExcel.GetText().Split(",") Dim strMissingValue As String From 96f7c60671d01d7c7b821a9ef85230974c174a6e Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 26 Feb 2020 10:42:11 +0300 Subject: [PATCH 003/277] comment addition --- instat/dlgImportDataset.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index ff0b13ff374..faa079985de 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -1010,6 +1010,7 @@ Public Class dlgImportDataset Dim arrStr() As String = ucrInputMissingValueStringExcel.GetText().Split(",") Dim strMissingValue As String + 'if length is < 2 return an R string else return a vector of strings for R If arrStr.Length < 2 Then strMissingValue = Chr(34) & ucrInputMissingValueStringExcel.GetText() & Chr(34) Else @@ -1020,11 +1021,9 @@ Public Class dlgImportDataset Else strMissingValue = strMissingValue & "," & Chr(34) & strTemp & Chr(34) End If - Next strMissingValue = "c(" & strMissingValue & ")" End If - Return strMissingValue End Function End Class From 915d8d3a5fa1b3a9f30e68e77cc0a99809880a3e Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 3 Mar 2020 08:40:29 +0300 Subject: [PATCH 004/277] more code changes and additions --- instat/dlgImportDataset.vb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index faa079985de..761e90cfecd 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -403,6 +403,8 @@ Public Class dlgImportDataset SetRCodeForControls(True) RefreshFrameView() dctSelectedExcelSheets.Clear() + clbSheets.Items.Clear() 'reset this here. Not set by R code + ucrInputMissingValueStringExcel.SetText("") 'reset this here. Not set by R code TestOkEnabled() End Sub @@ -616,8 +618,12 @@ Public Class dlgImportDataset strFileType = "" End If If strFileType <> "" AndAlso strFileType <> "RDS" Then - ucrSaveFile.Show() - ucrSaveFile.SetName(frmMain.clsRLink.MakeValidText(strFileName), bSilent:=True) + 'don't ovewrite the name for excel sheets if there is a selected sheet name + If (strFileType <> "XLSX" OrElse strFileType <> "XLS") AndAlso clbSheets.CheckedItems.Count = 0 Then + ucrSaveFile.Show() + ucrSaveFile.SetName(frmMain.clsRLink.MakeValidText(strFileName), bSilent:=True) + End If + Else ucrSaveFile.Hide() End If From 4bbfb2a1226358ab0c90bb366ae945b61dd01901 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 3 Mar 2020 08:47:36 +0300 Subject: [PATCH 005/277] Missing value change --- instat/dlgImportDataset.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index 761e90cfecd..a984817548a 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -1017,7 +1017,9 @@ Public Class dlgImportDataset Dim strMissingValue As String 'if length is < 2 return an R string else return a vector of strings for R - If arrStr.Length < 2 Then + If arrStr.Length = 0 Then + strMissingValue = "" + ElseIf arrStr.Length = 1 Then strMissingValue = Chr(34) & ucrInputMissingValueStringExcel.GetText() & Chr(34) Else strMissingValue = "" From d9242190ff5136779645883ba502ef99d53aad0f Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 9 Jun 2020 17:01:45 +0300 Subject: [PATCH 006/277] Autoswitching receiver focus --- instat/ucrReceiver.vb | 14 +++++++ instat/ucrReceiverMultiple.vb | 2 + instat/ucrSelector.vb | 68 +++++++++++++++++++++++++++++++++- instat/ucrVariablesAsFactor.vb | 11 ++++++ 4 files changed, 94 insertions(+), 1 deletion(-) diff --git a/instat/ucrReceiver.vb b/instat/ucrReceiver.vb index 9677780eaaf..875162b0b71 100644 --- a/instat/ucrReceiver.vb +++ b/instat/ucrReceiver.vb @@ -76,6 +76,9 @@ Public Class ucrReceiver ' Currently only implemented for multiple receiver. Public bForceVariablesAsList As Boolean = False + 'used by the selector to autoswitch from the current receiver + Public bAutoSwitchFromReceiver As Boolean = True + Public Sub New() ' This call is required by the designer. InitializeComponent() @@ -561,7 +564,18 @@ Public Class ucrReceiver Return ucrSelector End Get Set(ucrNewSelector As ucrSelector) + 'remove the receiver from the former selector + If ucrSelector IsNot Nothing Then + ucrSelector.RemoveReceiver(Me) + End If + ucrSelector = ucrNewSelector + + 'add the receiver to the new selector + If ucrSelector IsNot Nothing Then + ucrSelector.AddReceiver(Me) + End If + End Set End Property diff --git a/instat/ucrReceiverMultiple.vb b/instat/ucrReceiverMultiple.vb index 904d151c136..343eb99f52f 100644 --- a/instat/ucrReceiverMultiple.vb +++ b/instat/ucrReceiverMultiple.vb @@ -28,6 +28,8 @@ Public Class ucrReceiverMultiple lstSelectedVariables.Columns.Add("Selected Data") lstSelectedVariables.Columns(0).Width = lstSelectedVariables.Width - 25 End If + 'by default multiple receivers will not be autoswitched on selection change + bAutoSwitchFromReceiver = False bFirstLoad = False End If End Sub diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index 62246641db0..ab6884e96df 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -43,6 +43,10 @@ Public Class ucrSelector Protected bSilentDataFrameChange As Boolean = False + 'this list is used to hold a list of receivers listening to this selector. + 'the receivers are ordered by tab index and are used in autoswitching receiver after selection change + Private lstOrderedReceivers As New List(Of ucrReceiver) + Public Sub New() ' This call is required by the designer. InitializeComponent() @@ -187,10 +191,32 @@ Public Class ucrSelector Public Sub Add() If CurrentReceiver IsNot Nothing AndAlso (lstAvailableVariable.SelectedItems.Count > 0) Then CurrentReceiver.AddSelected() - CurrentReceiver.Focus() + CurrentReceiver.Focus() 'sets current focus enabling correct tab navigation + If CurrentReceiver.bAutoSwitchFromReceiver Then + AutoSwitchCurrentReceiver(CurrentReceiver) + End If End If End Sub + Private Sub AutoSwitchCurrentReceiver(FromSelectedReceiver As ucrReceiver) + Dim ucrNewCurrentReceiver As ucrReceiver + For i As Integer = 0 To lstOrderedReceivers.Count - 2 + If lstOrderedReceivers.Item(i) Is FromSelectedReceiver Then + ucrNewCurrentReceiver = lstOrderedReceivers.Item(i + 1) + If ucrNewCurrentReceiver.Visible AndAlso + ucrNewCurrentReceiver.Enabled Then + ucrNewCurrentReceiver.Focus() 'sets current focus enabling correct tab navigation + SetCurrentReceiver(ucrNewCurrentReceiver) + Else + AutoSwitchCurrentReceiver(ucrNewCurrentReceiver) + End If + + Exit For + + End If + Next + End Sub + 'TODO can this be removed? 'Public Sub AddVariable(strDataFrameName As String, strVariableName As String) ' Dim lviTemp As New ListViewItem @@ -261,6 +287,7 @@ Public Class ucrSelector If ucrLinkedSelector IsNot Nothing Then ucrLinkedSelector.AddToVariablesList(strVariable, strCurrentDataFrame) End If + RaiseEvent VariablesInReceiversChanged() End If End Sub @@ -440,4 +467,43 @@ Public Class ucrSelector Public Overridable Sub SetPrimaryDataFrameOptions(strNewPrimaryDataFrame As String, bNewOnlyLinkedToPrimaryDataFrames As Boolean, Optional bNewIncludePrimaryDataFrameAsLinked As Boolean = False) End Sub + + + ''' + ''' Adds passed receiver to the end of the receivers list + ''' The receiver is only added if it does not exist in the list + ''' + ''' + Public Overridable Sub AddReceiver(ucrNewReceiver As ucrReceiver) + AddReceiver({ucrNewReceiver}) + End Sub + + ''' + ''' Adds passed enumerable of receivers to the end of the receivers list + ''' The reciver is only added if it does not exist in the list + ''' + ''' + Public Overridable Sub AddReceiver(ucrNewReceivers As IEnumerable(Of ucrReceiver)) + 'add the receiver to the list if it's not already added + For Each ucr As ucrReceiver In ucrNewReceivers + If Not lstOrderedReceivers.Contains(ucr) Then + lstOrderedReceivers.Add(ucr) + End If + Next + + 'then order them by tab index. This will return an IOrderedEnumerable from which we get the list. + lstOrderedReceivers = (From ucr In lstOrderedReceivers Order By ucr.TabIndex).ToList + End Sub + + + ''' + ''' Removes the first occurrence of the passed receiver if found. + ''' + ''' + ''' true if item is successfully removed; otherwise, false. also returns false if item was not found in the list + Public Overridable Function RemoveReceiver(ucrReceiver As ucrReceiver) As Boolean + 'todo. + Return lstOrderedReceivers.Remove(ucrReceiver) + End Function + End Class \ No newline at end of file diff --git a/instat/ucrVariablesAsFactor.vb b/instat/ucrVariablesAsFactor.vb index 8ca4a228c51..04236880617 100644 --- a/instat/ucrVariablesAsFactor.vb +++ b/instat/ucrVariablesAsFactor.vb @@ -295,9 +295,20 @@ Public Class ucrVariablesAsFactor Return MyBase.Selector End Get Set(ucrNewSelector As ucrSelector) + 'this by default adds the parent receiver to the list of receivers in the selector MyBase.Selector = ucrNewSelector + 'we remove it here because the selector will manipulate the children receivers only + 'todo. Currently the selector only uses the list of receiver to manipulate the focus switching, + 'in future the usage of the receivers could change which may require this line to be changed + If MyBase.Selector IsNot Nothing Then + MyBase.Selector.RemoveReceiver(Me) + End If + + + 'set the selector to the children receivers. This by default adds the receivers to the selector ucrSingleVariable.Selector = ucrNewSelector ucrMultipleVariables.Selector = ucrNewSelector + If ucrNewSelector IsNot Nothing Then ucrVariableSelector = TryCast(ucrNewSelector, ucrSelectorByDataFrame) If ucrVariableSelector Is Nothing Then From 6432d30dcae3aa3a2b1ba441a81a78d35ae016bf Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 9 Jun 2020 17:06:51 +0300 Subject: [PATCH 007/277] comments addtions --- instat/ucrSelector.vb | 45 +++++++++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 19 deletions(-) diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index ab6884e96df..7a57dea6726 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -191,31 +191,15 @@ Public Class ucrSelector Public Sub Add() If CurrentReceiver IsNot Nothing AndAlso (lstAvailableVariable.SelectedItems.Count > 0) Then CurrentReceiver.AddSelected() - CurrentReceiver.Focus() 'sets current focus enabling correct tab navigation + 'sets current focus enabling correct tab navigation + CurrentReceiver.Focus() + 'check if autoswitching from the receiver is allowed before doing an autoswitch. If CurrentReceiver.bAutoSwitchFromReceiver Then AutoSwitchCurrentReceiver(CurrentReceiver) End If End If End Sub - Private Sub AutoSwitchCurrentReceiver(FromSelectedReceiver As ucrReceiver) - Dim ucrNewCurrentReceiver As ucrReceiver - For i As Integer = 0 To lstOrderedReceivers.Count - 2 - If lstOrderedReceivers.Item(i) Is FromSelectedReceiver Then - ucrNewCurrentReceiver = lstOrderedReceivers.Item(i + 1) - If ucrNewCurrentReceiver.Visible AndAlso - ucrNewCurrentReceiver.Enabled Then - ucrNewCurrentReceiver.Focus() 'sets current focus enabling correct tab navigation - SetCurrentReceiver(ucrNewCurrentReceiver) - Else - AutoSwitchCurrentReceiver(ucrNewCurrentReceiver) - End If - - Exit For - - End If - Next - End Sub 'TODO can this be removed? 'Public Sub AddVariable(strDataFrameName As String, strVariableName As String) @@ -506,4 +490,27 @@ Public Class ucrSelector Return lstOrderedReceivers.Remove(ucrReceiver) End Function + ''' + ''' changes the focus of the next receiver from passed receiver and sets it as the 'current receiver' of the selector + ''' + ''' + Private Sub AutoSwitchCurrentReceiver(FromSelectedReceiver As ucrReceiver) + Dim ucrNewCurrentReceiver As ucrReceiver + For i As Integer = 0 To lstOrderedReceivers.Count - 2 + If lstOrderedReceivers.Item(i) Is FromSelectedReceiver Then + ucrNewCurrentReceiver = lstOrderedReceivers.Item(i + 1) + If ucrNewCurrentReceiver.Visible AndAlso + ucrNewCurrentReceiver.Enabled Then + ucrNewCurrentReceiver.Focus() 'sets current focus enabling correct tab navigation + SetCurrentReceiver(ucrNewCurrentReceiver) + Else + AutoSwitchCurrentReceiver(ucrNewCurrentReceiver) + End If + + Exit For + + End If + Next + End Sub + End Class \ No newline at end of file From a2585a4e2b79b2b7d8cd2807ce4a5986d08dd38b Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 10 Jun 2020 09:01:44 +0300 Subject: [PATCH 008/277] comments additions --- instat/ucrSelector.vb | 6 ------ instat/ucrVariablesAsFactor.vb | 3 +-- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index 7a57dea6726..d9a05ea9688 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -200,7 +200,6 @@ Public Class ucrSelector End If End Sub - 'TODO can this be removed? 'Public Sub AddVariable(strDataFrameName As String, strVariableName As String) ' Dim lviTemp As New ListViewItem @@ -271,7 +270,6 @@ Public Class ucrSelector If ucrLinkedSelector IsNot Nothing Then ucrLinkedSelector.AddToVariablesList(strVariable, strCurrentDataFrame) End If - RaiseEvent VariablesInReceiversChanged() End If End Sub @@ -474,7 +472,6 @@ Public Class ucrSelector lstOrderedReceivers.Add(ucr) End If Next - 'then order them by tab index. This will return an IOrderedEnumerable from which we get the list. lstOrderedReceivers = (From ucr In lstOrderedReceivers Order By ucr.TabIndex).ToList End Sub @@ -486,7 +483,6 @@ Public Class ucrSelector ''' ''' true if item is successfully removed; otherwise, false. also returns false if item was not found in the list Public Overridable Function RemoveReceiver(ucrReceiver As ucrReceiver) As Boolean - 'todo. Return lstOrderedReceivers.Remove(ucrReceiver) End Function @@ -506,9 +502,7 @@ Public Class ucrSelector Else AutoSwitchCurrentReceiver(ucrNewCurrentReceiver) End If - Exit For - End If Next End Sub diff --git a/instat/ucrVariablesAsFactor.vb b/instat/ucrVariablesAsFactor.vb index 04236880617..63090193b14 100644 --- a/instat/ucrVariablesAsFactor.vb +++ b/instat/ucrVariablesAsFactor.vb @@ -299,12 +299,11 @@ Public Class ucrVariablesAsFactor MyBase.Selector = ucrNewSelector 'we remove it here because the selector will manipulate the children receivers only 'todo. Currently the selector only uses the list of receiver to manipulate the focus switching, - 'in future the usage of the receivers could change which may require this line to be changed + 'in future the usage of the receivers could change which may require this implementation to be changed If MyBase.Selector IsNot Nothing Then MyBase.Selector.RemoveReceiver(Me) End If - 'set the selector to the children receivers. This by default adds the receivers to the selector ucrSingleVariable.Selector = ucrNewSelector ucrMultipleVariables.Selector = ucrNewSelector From c267bc4107370cc068a0937b3bfa21e752350899 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Sat, 13 Jun 2020 07:45:22 +0300 Subject: [PATCH 009/277] reading of datasets of different class types --- instat/dlgFromLibrary.vb | 118 ++++++++++++++++++++++++++++++++------- 1 file changed, 97 insertions(+), 21 deletions(-) diff --git a/instat/dlgFromLibrary.vb b/instat/dlgFromLibrary.vb index 0875e384b6e..a85bced0b2f 100644 --- a/instat/dlgFromLibrary.vb +++ b/instat/dlgFromLibrary.vb @@ -14,6 +14,7 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . +Imports instat Imports instat.Translations Imports RDotNet @@ -25,9 +26,13 @@ Public Class dlgFromLibrary Private bReset As Boolean = True Private clsDataFunction As New RFunction Private dctPackages As New Dictionary(Of String, String) - Private strAvailablePackages() As String + + 'a string array that holds the packages displayed in the combobox + 'todo. this property can be removed once the PR that enhances the inputCombobox control is merged + Private arrAvailablePackages() As String Private strSelectedPackage As String = "" + Private clsImportFunction As New RFunction 'the base function that call on import R-Instat function Private Sub dlgFromLibrary_Load(sender As Object, e As EventArgs) Handles Me.Load autoTranslate(Me) @@ -56,7 +61,6 @@ Public Class dlgFromLibrary Dim clsGetPackages As New RFunction Dim expPackageNames As SymbolicExpression Dim chrPackageNames As CharacterVector - Dim iDataSets As Integer = 0 ucrBase.iHelpTopicID = 156 @@ -66,16 +70,14 @@ Public Class dlgFromLibrary expPackageNames = frmMain.clsRLink.RunInternalScriptGetValue(clsGetPackages.ToScript(), bSilent:=True) If expPackageNames IsNot Nothing AndAlso expPackageNames.Type <> Internals.SymbolicExpressionType.Null Then chrPackageNames = expPackageNames.AsCharacter - strAvailablePackages = chrPackageNames.ToArray - System.Array.Sort(Of String)(strAvailablePackages) + arrAvailablePackages = chrPackageNames.ToArray + Array.Sort(arrAvailablePackages) + ucrInputPackages.SetParameter(New RParameter("package")) 'for combobox, can't set items without setting parameter first + ucrInputPackages.SetItems(arrAvailablePackages, bAddConditions:=True) End If - If strAvailablePackages IsNot Nothing Then - ucrInputPackages.SetParameter(New RParameter("package")) - ucrInputPackages.SetItems(strAvailablePackages, bAddConditions:=True) - ucrInputPackages.SetDropDownStyleAsNonEditable() - ucrInputPackages.SetLinkedDisplayControl(lblFromPackage) - End If + ucrInputPackages.SetDropDownStyleAsNonEditable() + ucrInputPackages.SetLinkedDisplayControl(lblFromPackage) ucrPnlOptions.AddRadioButton(rdoDefaultDatasets) ucrPnlOptions.AddRadioButton(rdoInstatCollection) @@ -91,22 +93,29 @@ Public Class dlgFromLibrary End Sub Private Sub SetDefaults() - 'TODO this should be the new clear method - clsDataFunction.ClearParameters() - + 'reset the functions and the custom controls + ucrNewDataFrameName.SetName("") 'called here cause its not called in the control's reset method ucrNewDataFrameName.Reset() + clsDataFunction.Clear() + clsImportFunction.Clear() + 'set up the data function clsDataFunction.SetPackageName("utils") clsDataFunction.SetRCommand("data") clsDataFunction.AddParameter("package", Chr(34) & "datasets" & Chr(34)) + + 'set up the import data function + clsImportFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_data") + + 'add the before codes (the data() R base function) and the base function(import_data() R-Instat function) ucrBase.clsRsyntax.AddToBeforeCodes(clsDataFunction) + ucrBase.clsRsyntax.SetBaseRFunction(clsImportFunction) End Sub Private Sub SetRCodeforControls(bReset As Boolean) - If strAvailablePackages IsNot Nothing Then + If arrAvailablePackages IsNot Nothing Then ucrInputPackages.SetRCode(clsDataFunction, bReset) End If - ucrNewDataFrameName.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) ucrPnlOptions.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub @@ -180,15 +189,14 @@ Public Class dlgFromLibrary End Sub Private Sub lstCollection_SelectedIndexChanged(sender As Object, e As EventArgs) Handles lstCollection.SelectedIndexChanged - Dim strDataName As String If lstCollection.SelectedItems.Count > 0 Then - strDataName = CheckString(lstCollection.SelectedItems(0).SubItems(0).Text) - ucrBase.clsRsyntax.SetCommandString(strDataName) If Not ucrNewDataFrameName.bUserTyped Then - ucrNewDataFrameName.SetName(strDataName) + 'this will raise event ControValueChanged for this control, which will inturn call SetParameterValues() + ucrNewDataFrameName.SetName(CheckString(lstCollection.SelectedItems(0).SubItems(0).Text)) + Else + SetParameterValues() End If - clsDataFunction.AddParameter("X", strDataName) End If TestOkEnabled() EnableHelp() @@ -222,7 +230,75 @@ Public Class dlgFromLibrary End Sub Private Sub ucrNewDataFrameName_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrNewDataFrameName.ControlContentsChanged - ucrBase.clsRsyntax.SetAssignTo(ucrNewDataFrameName.GetText, strTempDataframe:=ucrNewDataFrameName.GetText) TestOkEnabled() End Sub + + Private Sub ucrNewDataFrameName_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNewDataFrameName.ControlValueChanged + SetParameterValues() + End Sub + + Private Sub SetParameterValues() + Dim strSelectedDataName As String + Dim strVecOutput As CharacterVector + Dim strRClass As String = "" + + If lstCollection.SelectedItems.Count < 1 Then + Exit Sub + End If + + strSelectedDataName = CheckString(lstCollection.SelectedItems(0).SubItems(0).Text) + clsDataFunction.AddParameter("X", strSelectedDataName) + + 'calling RunInternalScriptGetOutput() twice because currently it can't execute multiple lines + frmMain.clsRLink.RunInternalScriptGetOutput(clsDataFunction.Clone.ToScript(), bSilent:=True) + strVecOutput = frmMain.clsRLink.RunInternalScriptGetOutput("class(" + strSelectedDataName + ")", bSilent:=True) + If strVecOutput IsNot Nothing AndAlso strVecOutput.Length > 0 Then + strRClass = Mid(strVecOutput(0), 5).Replace("""", "").ToLower + End If + + If strRClass = "list" Then + clsImportFunction.AddParameter("data_tables", strParameterValue:=strSelectedDataName) + Else + Dim clsListFunction As New RFunction 'defines the list function. list(x=x) + Dim clsListParameterFunction As New RFunction 'defines the function that act as list parameters e.g list(y=fortify.zoo(x)) + clsListFunction.SetRCommand("list") + If strRClass = "zoo" Then + 'this is the recommended command for converting zoo object types to data frames. + 'In R-Instat the data.frame doesn't convert this object type well. See issue #5649 + clsListParameterFunction.SetPackageName("zoo") + clsListParameterFunction.SetRCommand("fortify.zoo") + clsListParameterFunction.AddParameter("model", strParameterValue:=strSelectedDataName) + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) + ElseIf strRClass = "spatialpolygonsdataframe" Then + 'for some reason, objects of this type have to be explicitly coerced to data.frame + 'before being imported by import R-Instat function + clsListParameterFunction.SetRCommand("data.frame") + clsListParameterFunction.AddParameter("x", strParameterValue:=strSelectedDataName) + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) + ElseIf strRClass = "dgcmatrix" OrElse strRClass = "dscmatrix" Then + 'this if block is used for dgcmatrix,dscmatrix. + 'The R summary() function returns an object of type data.frame if given a matrix. Used here to coerce it to data.frame + 'todo. this needs to be investigated further on the best command for coercing this type of data + clsListParameterFunction.SetRCommand("summary") + clsListParameterFunction.AddParameter("object", strParameterValue:=strSelectedDataName) + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) + ElseIf strRClass = "matrix" Then + 'this if block is used for dgcmatrix,dscmatrix and any other matrix types + 'this has been done in it's own block in anticipation of a correct way of coercing matrix to data frame + 'currently this command loses data(some columns) of the matrix once it's coerced. See issue #5649 + clsListParameterFunction.SetRCommand("data.frame") + clsListParameterFunction.AddParameter("x", strParameterValue:=strSelectedDataName) + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) + Else + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, strParameterValue:=strSelectedDataName) + End If + clsImportFunction.AddParameter("data_tables", clsRFunctionParameter:=clsListFunction) + End If + End Sub + + Private Sub ucrInputPackages_SelectionIndexChanged() Handles ucrInputPackages.SelectionIndexChanged + + End Sub + + End Class \ No newline at end of file From 5b77897c2082833272d1972fba026d4af445fa55 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Sat, 13 Jun 2020 07:46:37 +0300 Subject: [PATCH 010/277] comments additions --- instat/dlgFromLibrary.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgFromLibrary.vb b/instat/dlgFromLibrary.vb index a85bced0b2f..045a2463f14 100644 --- a/instat/dlgFromLibrary.vb +++ b/instat/dlgFromLibrary.vb @@ -278,7 +278,7 @@ Public Class dlgFromLibrary ElseIf strRClass = "dgcmatrix" OrElse strRClass = "dscmatrix" Then 'this if block is used for dgcmatrix,dscmatrix. 'The R summary() function returns an object of type data.frame if given a matrix. Used here to coerce it to data.frame - 'todo. this needs to be investigated further on the best command for coercing this type of data + 'todo. this needs to be investigated further on the best(correct) command for coercing this type of data clsListParameterFunction.SetRCommand("summary") clsListParameterFunction.AddParameter("object", strParameterValue:=strSelectedDataName) clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) From 49cc9b899f3a17871c6c19062071fa618bd59b38 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Sat, 13 Jun 2020 07:52:25 +0300 Subject: [PATCH 011/277] comments additions --- instat/dlgFromLibrary.vb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/dlgFromLibrary.vb b/instat/dlgFromLibrary.vb index 045a2463f14..022a3f919f5 100644 --- a/instat/dlgFromLibrary.vb +++ b/instat/dlgFromLibrary.vb @@ -278,12 +278,13 @@ Public Class dlgFromLibrary ElseIf strRClass = "dgcmatrix" OrElse strRClass = "dscmatrix" Then 'this if block is used for dgcmatrix,dscmatrix. 'The R summary() function returns an object of type data.frame if given a matrix. Used here to coerce it to data.frame - 'todo. this needs to be investigated further on the best(correct) command for coercing this type of data + 'todo. this needs to be investigated further on the best(correct) command for coercing this type of data. + 'the data.frame command is unable to coerce data of this class type hence it's own block form the matrix command clsListParameterFunction.SetRCommand("summary") clsListParameterFunction.AddParameter("object", strParameterValue:=strSelectedDataName) clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) ElseIf strRClass = "matrix" Then - 'this if block is used for dgcmatrix,dscmatrix and any other matrix types + 'this if block is used for matrix type 'this has been done in it's own block in anticipation of a correct way of coercing matrix to data frame 'currently this command loses data(some columns) of the matrix once it's coerced. See issue #5649 clsListParameterFunction.SetRCommand("data.frame") From 5b3e002d9da506ee91fc177162ba5aebd036c086 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Sat, 13 Jun 2020 07:53:48 +0300 Subject: [PATCH 012/277] empty sub deletion --- instat/dlgFromLibrary.vb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/instat/dlgFromLibrary.vb b/instat/dlgFromLibrary.vb index 022a3f919f5..6fdeeaa2921 100644 --- a/instat/dlgFromLibrary.vb +++ b/instat/dlgFromLibrary.vb @@ -297,9 +297,4 @@ Public Class dlgFromLibrary End If End Sub - Private Sub ucrInputPackages_SelectionIndexChanged() Handles ucrInputPackages.SelectionIndexChanged - - End Sub - - End Class \ No newline at end of file From 637e59d3d2aed3e1ca4081603c5600ac73cdfd35 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 23 Jun 2020 13:19:30 +0300 Subject: [PATCH 013/277] import dataset enhancements --- instat/dlgImportDataset.vb | 77 +++++++++++++++++++++++++++++--------- 1 file changed, 59 insertions(+), 18 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index 7d9b84c254b..82cec6d26f7 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -257,8 +257,8 @@ Public Class dlgImportDataset '############################################################## 'EXCEL controls - ucrInputMissingValueStringExcel.SetParameter(New RParameter("na")) - ucrInputMissingValueStringExcel.SetRDefault(Chr(34) & "" & Chr(34)) + 'ucrInputMissingValueStringExcel.SetParameter(New RParameter("na")) + 'ucrInputMissingValueStringExcel.SetRDefault(Chr(34) & "" & Chr(34)) ucrChkTrimWSExcel.SetText("Trim Trailing White Space") ucrChkTrimWSExcel.SetParameter(New RParameter("trim_ws"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") @@ -415,6 +415,8 @@ Public Class dlgImportDataset SetRCodeForControls(True) RefreshFrameView() dctSelectedExcelSheets.Clear() + clbSheets.Items.Clear() 'reset this here. Not set by R code + ucrInputMissingValueStringExcel.SetText("") 'reset this here. Not set by R code TestOkEnabled() End Sub @@ -524,14 +526,14 @@ Public Class dlgImportDataset 'EXCEL CONTROLS ucrNudRowsToSkipExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("skip"), iAdditionalPairNo:=1) - ucrInputMissingValueStringExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("na"), iAdditionalPairNo:=1) + 'ucrInputMissingValueStringExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("na"), iAdditionalPairNo:=1) ucrChkTrimWSExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("trim_ws"), iAdditionalPairNo:=1) ucrChkColumnNamesExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("col_names"), iAdditionalPairNo:=1) ucrNudMaxRowsExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("n_max"), iAdditionalPairNo:=1) ucrChkMaxRowsExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("n_max"), iAdditionalPairNo:=1) ucrNudRowsToSkipExcel.SetRCode(clsImportExcel, bReset) - ucrInputMissingValueStringExcel.SetRCode(clsImportExcel, bReset) + 'ucrInputMissingValueStringExcel.SetRCode(clsImportExcel, bReset) ucrChkTrimWSExcel.SetRCode(clsImportExcel, bReset) ucrChkColumnNamesExcel.SetRCode(clsImportExcel, bReset) ucrNudMaxRowsExcel.SetRCode(clsImportExcel, bReset) @@ -629,8 +631,13 @@ Public Class dlgImportDataset strFileType = "" End If If strFileType <> "" AndAlso strFileType <> "RDS" Then - ucrSaveFile.Show() - ucrSaveFile.SetName(frmMain.clsRLink.MakeValidText(strFileName), bSilent:=True) + 'ucrSaveFile.Show() + 'ucrSaveFile.SetName(frmMain.clsRLink.MakeValidText(strFileName), bSilent:=True) + 'don't ovewrite the name for excel sheets if there is a selected sheet name + If (strFileType <> "XLSX" OrElse strFileType <> "XLS") AndAlso clbSheets.CheckedItems.Count = 0 Then + ucrSaveFile.Show() + ucrSaveFile.SetName(frmMain.clsRLink.MakeValidText(strFileName), bSilent:=True) + End If Else ucrSaveFile.Hide() End If @@ -734,7 +741,8 @@ Public Class dlgImportDataset End If clsTempImport = clsImportExcel.Clone() strRowMaxParamName = "n_max" - clsTempImport.AddParameter("na", Chr(34) & ucrInputMissingValueStringExcel.GetText & Chr(34)) + 'clsTempImport.AddParameter("na", Chr(34) & ucrInputMissingValueStringExcel.GetText & Chr(34)) + clsTempImport.AddParameter("na", GetMissingValueRText) 'TODO. do we really need to call this here? Check this End If If clsTempImport.ContainsParameter(strRowMaxParamName) Then If Integer.TryParse(clsTempImport.GetParameter(strRowMaxParamName).strArgumentValue, iTemp) Then @@ -799,6 +807,7 @@ Public Class dlgImportDataset Private Sub FillExcelSheets(strFilePath As String) Dim expSheet As SymbolicExpression Dim chrSheets As CharacterVector + Dim lstCheckedItems As New List(Of String) expSheet = frmMain.clsRLink.RunInternalScriptGetValue(clsGetExcelSheetNames.ToScript()) If expSheet IsNot Nothing Then @@ -807,20 +816,24 @@ Public Class dlgImportDataset chrSheets = Nothing End If + 'store the checked items first temporarily + For i As Integer = 0 To clbSheets.CheckedItems.Count - 1 + lstCheckedItems.Add(clbSheets.CheckedItems(i).ToString) + Next + clbSheets.Items.Clear() If chrSheets IsNot Nothing AndAlso chrSheets.Count > 0 Then clbSheets.Items.AddRange(chrSheets.ToArray()) - 'If dctSelectedExcelSheets.Count = 0 Then - ' clbSheets.SetItemChecked(0, True) - 'Else - ' 'Storing the array here because the dctSeleceted indice changes on clbSheets.itemsClicked - ' Dim ListOfItems As Integer() = ListOfCheckedItems.ToArray - ' For i = 0 To ListOfItems.Length - 1 - ' clbSheets.SetItemChecked((ListOfItems(i) - 1), True) - ' Next - 'End If - - + 'if there were previously checked items then restore them + If lstCheckedItems.Count > 0 Then + For i As Integer = 0 To clbSheets.Items.Count - 1 + For Each strSelected As String In lstCheckedItems + If strSelected = clbSheets.Items(i).ToString Then + clbSheets.SetItemChecked(i, True) + End If + Next + Next + End If End If 'ucrInputNamedRegions.cboInput.Items.Clear() @@ -1022,4 +1035,32 @@ Public Class dlgImportDataset Return strCleanFileName End Function + Private Sub ucrInputMissingValueStringExcel_ContentsChanged() Handles ucrInputMissingValueStringExcel.ContentsChanged + clsImportExcelMulti.AddParameter("na", GetMissingValueRText) + clsImportExcel.AddParameter("na", GetMissingValueRText) + End Sub + + Private Function GetMissingValueRText() As String + Dim arrStr() As String = ucrInputMissingValueStringExcel.GetText().Split(",") + Dim strMissingValue As String + + 'if length is < 2 return an R string else return a vector of strings for R + If arrStr.Length = 0 Then + strMissingValue = "" + ElseIf arrStr.Length = 1 Then + strMissingValue = Chr(34) & ucrInputMissingValueStringExcel.GetText() & Chr(34) + Else + strMissingValue = "" + For Each strTemp As String In arrStr + If strMissingValue = "" Then + strMissingValue = Chr(34) & strTemp & Chr(34) + Else + strMissingValue = strMissingValue & "," & Chr(34) & strTemp & Chr(34) + End If + Next + strMissingValue = "c(" & strMissingValue & ")" + End If + Return strMissingValue + End Function + End Class \ No newline at end of file From bef6e1a12f64ff7048556b0dd6debaa2a4cad6bc Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 23 Jun 2020 13:59:21 +0300 Subject: [PATCH 014/277] more addtions --- instat/dlgImportDataset.vb | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index 82cec6d26f7..91e30f6a386 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -742,7 +742,7 @@ Public Class dlgImportDataset clsTempImport = clsImportExcel.Clone() strRowMaxParamName = "n_max" 'clsTempImport.AddParameter("na", Chr(34) & ucrInputMissingValueStringExcel.GetText & Chr(34)) - clsTempImport.AddParameter("na", GetMissingValueRText) 'TODO. do we really need to call this here? Check this + 'clsTempImport.AddParameter("na", GetMissingValueRText) 'TODO. do we really need to call this here? Check this End If If clsTempImport.ContainsParameter(strRowMaxParamName) Then If Integer.TryParse(clsTempImport.GetParameter(strRowMaxParamName).strArgumentValue, iTemp) Then @@ -880,6 +880,12 @@ Public Class dlgImportDataset End Sub Private Sub MissingValuesInputControls_ContentsChanged() Handles ucrInputMissingValueStringText.ContentsChanged, ucrInputMissingValueStringCSV.ContentsChanged, ucrInputMissingValueStringExcel.ContentsChanged + 'currently we have no way of knowing which control has raised this event and therefore can't do that check + 'so instead we are using the strFileType to identify which RFunctions should be updated accordingly + If strFileType = "XLSX" OrElse strFileType = "XLS" Then + clsImportExcelMulti.AddParameter("na", GetMissingValueRText) + clsImportExcel.AddParameter("na", GetMissingValueRText) + End If RefreshFrameView() End Sub @@ -1035,11 +1041,6 @@ Public Class dlgImportDataset Return strCleanFileName End Function - Private Sub ucrInputMissingValueStringExcel_ContentsChanged() Handles ucrInputMissingValueStringExcel.ContentsChanged - clsImportExcelMulti.AddParameter("na", GetMissingValueRText) - clsImportExcel.AddParameter("na", GetMissingValueRText) - End Sub - Private Function GetMissingValueRText() As String Dim arrStr() As String = ucrInputMissingValueStringExcel.GetText().Split(",") Dim strMissingValue As String @@ -1053,9 +1054,9 @@ Public Class dlgImportDataset strMissingValue = "" For Each strTemp As String In arrStr If strMissingValue = "" Then - strMissingValue = Chr(34) & strTemp & Chr(34) + strMissingValue = Chr(34) & strTemp.Trim & Chr(34) Else - strMissingValue = strMissingValue & "," & Chr(34) & strTemp & Chr(34) + strMissingValue = strMissingValue & "," & Chr(34) & strTemp.Trim & Chr(34) End If Next strMissingValue = "c(" & strMissingValue & ")" From 699f2295c9cee8c7bbd5eb61bc265a8ca896309d Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 23 Jun 2020 16:10:12 +0300 Subject: [PATCH 015/277] more code additions --- instat/dlgImportDataset.vb | 45 +++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index 91e30f6a386..b8100aebb38 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -203,9 +203,6 @@ Public Class dlgImportDataset ucrChkStringsAsFactorsCSV.SetParameter(New RParameter("stringsAsFactors"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") ucrChkStringsAsFactorsCSV.SetRDefault("FALSE") - ucrInputMissingValueStringCSV.SetParameter(New RParameter("na.strings")) - ucrInputMissingValueStringCSV.SetRDefault(Chr(34) & "NA" & Chr(34)) - ucrInputEncodingCSV.SetParameter(New RParameter("encoding", 1)) dctucrInputEncodingCSV.Add("unknown", Chr(34) & "unknown" & Chr(34)) dctucrInputEncodingCSV.Add("UTF-8", Chr(34) & "UTF-8" & Chr(34)) @@ -257,8 +254,6 @@ Public Class dlgImportDataset '############################################################## 'EXCEL controls - 'ucrInputMissingValueStringExcel.SetParameter(New RParameter("na")) - 'ucrInputMissingValueStringExcel.SetRDefault(Chr(34) & "" & Chr(34)) ucrChkTrimWSExcel.SetText("Trim Trailing White Space") ucrChkTrimWSExcel.SetParameter(New RParameter("trim_ws"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") @@ -510,7 +505,6 @@ Public Class dlgImportDataset ucrInputDecimalCSV.SetRCode(clsImportCSV, bReset) ucrInputEncodingCSV.SetRCode(clsImportCSV, bReset) ucrChkStringsAsFactorsCSV.SetRCode(clsImportCSV, bReset) - ucrInputMissingValueStringCSV.SetRCode(clsImportCSV, bReset) ucrNudRowsToSkipCSV.SetRCode(clsImportCSV, bReset) ucrNudMaxRowsCSV.SetRCode(clsImportCSV, bReset) ucrChkMaxRowsCSV.SetRCode(clsImportCSV, bReset) @@ -526,14 +520,12 @@ Public Class dlgImportDataset 'EXCEL CONTROLS ucrNudRowsToSkipExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("skip"), iAdditionalPairNo:=1) - 'ucrInputMissingValueStringExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("na"), iAdditionalPairNo:=1) ucrChkTrimWSExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("trim_ws"), iAdditionalPairNo:=1) ucrChkColumnNamesExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("col_names"), iAdditionalPairNo:=1) ucrNudMaxRowsExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("n_max"), iAdditionalPairNo:=1) ucrChkMaxRowsExcel.AddAdditionalCodeParameterPair(clsImportExcelMulti, New RParameter("n_max"), iAdditionalPairNo:=1) ucrNudRowsToSkipExcel.SetRCode(clsImportExcel, bReset) - 'ucrInputMissingValueStringExcel.SetRCode(clsImportExcel, bReset) ucrChkTrimWSExcel.SetRCode(clsImportExcel, bReset) ucrChkColumnNamesExcel.SetRCode(clsImportExcel, bReset) ucrNudMaxRowsExcel.SetRCode(clsImportExcel, bReset) @@ -701,7 +693,6 @@ Public Class dlgImportDataset 'for separtor we use the function used for csv clsTempImport = clsImportCSV.Clone() strRowMaxParamName = "nrows" - clsTempImport.AddParameter("na.strings", Chr(34) & ucrInputMissingValueStringCSV.GetText & Chr(34)) Else clsTempImport = clsImportFixedWidthText.Clone() strRowMaxParamName = "n_max" @@ -711,7 +702,6 @@ Public Class dlgImportDataset ElseIf strFileType = "CSV" Then clsTempImport = clsImportCSV.Clone() strRowMaxParamName = "nrows" - clsTempImport.AddParameter("na.strings", Chr(34) & ucrInputMissingValueStringCSV.GetText & Chr(34)) ElseIf strFileType = "XLSX" OrElse strFileType = "XLS" Then If dctSelectedExcelSheets.Count = 0 Then bCanImport = False @@ -741,8 +731,6 @@ Public Class dlgImportDataset End If clsTempImport = clsImportExcel.Clone() strRowMaxParamName = "n_max" - 'clsTempImport.AddParameter("na", Chr(34) & ucrInputMissingValueStringExcel.GetText & Chr(34)) - 'clsTempImport.AddParameter("na", GetMissingValueRText) 'TODO. do we really need to call this here? Check this End If If clsTempImport.ContainsParameter(strRowMaxParamName) Then If Integer.TryParse(clsTempImport.GetParameter(strRowMaxParamName).strArgumentValue, iTemp) Then @@ -883,8 +871,10 @@ Public Class dlgImportDataset 'currently we have no way of knowing which control has raised this event and therefore can't do that check 'so instead we are using the strFileType to identify which RFunctions should be updated accordingly If strFileType = "XLSX" OrElse strFileType = "XLS" Then - clsImportExcelMulti.AddParameter("na", GetMissingValueRText) - clsImportExcel.AddParameter("na", GetMissingValueRText) + clsImportExcelMulti.AddParameter("na", GetMissingValueRString(ucrInputMissingValueStringExcel.GetText())) + clsImportExcel.AddParameter("na", GetMissingValueRString(ucrInputMissingValueStringExcel.GetText())) + ElseIf strFileType = "CSV" Then + clsImportCSV.AddParameter("na.strings", GetMissingValueRString(ucrInputMissingValueStringCSV.GetText())) End If RefreshFrameView() End Sub @@ -1041,27 +1031,32 @@ Public Class dlgImportDataset Return strCleanFileName End Function - Private Function GetMissingValueRText() As String - Dim arrStr() As String = ucrInputMissingValueStringExcel.GetText().Split(",") - Dim strMissingValue As String + ''' + ''' Creates an R string to be used as the parameter value for na.strings and na parameters + ''' + ''' The string that will be used to create the R Text + ''' + Private Function GetMissingValueRString(strText As String) As String + Dim arrStr() As String = strText.Split(",") + Dim strRmissingValueString As String 'if length is < 2 return an R string else return a vector of strings for R If arrStr.Length = 0 Then - strMissingValue = "" + strRmissingValueString = "" ElseIf arrStr.Length = 1 Then - strMissingValue = Chr(34) & ucrInputMissingValueStringExcel.GetText() & Chr(34) + strRmissingValueString = Chr(34) & arrStr(0) & Chr(34) Else - strMissingValue = "" + strRmissingValueString = "" For Each strTemp As String In arrStr - If strMissingValue = "" Then - strMissingValue = Chr(34) & strTemp.Trim & Chr(34) + If strRmissingValueString = "" Then + strRmissingValueString = Chr(34) & strTemp.Trim & Chr(34) Else - strMissingValue = strMissingValue & "," & Chr(34) & strTemp.Trim & Chr(34) + strRmissingValueString = strRmissingValueString & "," & Chr(34) & strTemp.Trim & Chr(34) End If Next - strMissingValue = "c(" & strMissingValue & ")" + strRmissingValueString = "c(" & strRmissingValueString & ")" End If - Return strMissingValue + Return strRmissingValueString End Function End Class \ No newline at end of file From 8def96742209eea2978d2f7c2dacc5599bb7d2e3 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 23 Jun 2020 16:22:30 +0300 Subject: [PATCH 016/277] comment addition --- instat/dlgImportDataset.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index b8100aebb38..a193b92fda8 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -871,6 +871,7 @@ Public Class dlgImportDataset 'currently we have no way of knowing which control has raised this event and therefore can't do that check 'so instead we are using the strFileType to identify which RFunctions should be updated accordingly If strFileType = "XLSX" OrElse strFileType = "XLS" Then + 'set for single imports and multiple imports clsImportExcelMulti.AddParameter("na", GetMissingValueRString(ucrInputMissingValueStringExcel.GetText())) clsImportExcel.AddParameter("na", GetMissingValueRString(ucrInputMissingValueStringExcel.GetText())) ElseIf strFileType = "CSV" Then From b86a16ae9f807462f2665733e7e8fea234c7d4a4 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Thu, 2 Jul 2020 05:41:36 +0300 Subject: [PATCH 017/277] Popup implementation and dlgEnter --- instat/clsPopup.vb | 118 +++++++++++++++++++++++++++++++++++- instat/dlgEnter.Designer.vb | 9 +++ instat/dlgEnter.resx | 67 ++++++++++++++------ instat/dlgEnter.vb | 38 ++++++++++++ 4 files changed, 214 insertions(+), 18 deletions(-) diff --git a/instat/clsPopup.vb b/instat/clsPopup.vb index 2d1b7804ad4..0ddd0c73dff 100644 --- a/instat/clsPopup.vb +++ b/instat/clsPopup.vb @@ -1,3 +1,119 @@ -Public Class clsPopup +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . +Public Class clsPopup + 'event raised when the contents control loses focus. Indeicates that the popup is closing + Public Event Closing() + + Private ReadOnly frm As Form + 'specifies if the popup should hide automatically on lost focus or not + Public Property AutoHide As Boolean + + 'specifies the position of the popup relative to the owner(control) + Public Property Position As PopupPosition + + 'enumeration of allowable popup positions + Public Enum PopupPosition + Top + Below + End Enum + + Sub New() + 'initialise variables and set defaults + frm = New Form With { + .ShowInTaskbar = False, + .FormBorderStyle = FormBorderStyle.None, + .StartPosition = FormStartPosition.Manual + } + 'set default popup behaviours + AutoHide = True + Position = PopupPosition.Top + End Sub + + Public Sub SetSize(width As Integer, height As Integer) + SetSize(New Size(width, height)) + End Sub + + Public Sub SetSize(size As Size) + frm.Size = size + End Sub + + Public Sub SetLocation(x As Integer, y As Integer) + SetLocation(New Point(x, y)) + End Sub + + Public Sub SetLocation(point As Point) + frm.Location = point + End Sub + + ''' + ''' sets the specified control as the contents control of the popup + ''' + ''' The System.Windows.Forms.Control to set as the control contained in the popup + Public Sub SetContentControl(ctr As Control) + frm.Controls.Clear() 'remove any existing control first + frm.Controls.Add(ctr) + ctr.Dock = DockStyle.Fill 'the control will always be same size as the from + + 'attach the event handler that will determine auto closing + AddHandler ctr.LostFocus, Sub() + If AutoHide Then + Hide() + End If + End Sub + End Sub + + ''' + ''' shows the popup relative to the location of the specified control(owner) + ''' and the position specified + ''' + ''' The System.Windows.Forms.Control to set popup location based on + ''' PopupPosition to set the position of the popup + Public Sub Show(owner As Control, position As PopupPosition) + Me.Position = position + Show(owner) + End Sub + + ''' + ''' shows the popup relative to the location of the specified control(owner) + ''' and the position set + ''' + ''' The System.Windows.Forms.Control to set popup location based on + Public Sub Show(owner As Control) + 'compute and get the location of the specified control relative to screen coordinates + 'Don't use Point.Empty, it's not function so use Point(0, 0) + Dim ctrPos As Point = owner.PointToScreen(New Point(0, 0)) + + 'then set location of the popup relative to the position specified + Select Case Position + Case PopupPosition.Top + SetLocation(ctrPos.X - 2, ctrPos.Y - frm.Height - 2) + Case PopupPosition.Below + SetLocation(ctrPos.X - 2, ctrPos.Y + owner.Height - 2) + End Select + + 'then show popup + frm.Show() + End Sub + + ''' + ''' raises popup hiding event then hides the popup + ''' + Public Sub Hide() + RaiseEvent Closing() + frm.Close() + End Sub End Class diff --git a/instat/dlgEnter.Designer.vb b/instat/dlgEnter.Designer.vb index d01626b3e8d..f8638d9e5cf 100644 --- a/instat/dlgEnter.Designer.vb +++ b/instat/dlgEnter.Designer.vb @@ -78,6 +78,7 @@ Partial Class dlgEnter Me.ucrReceiverForEnterCalculation = New instat.ucrReceiverExpression() Me.ucrBase = New instat.ucrButtons() Me.ucrTryModelling = New instat.ucrTry() + Me.btnExample = New System.Windows.Forms.Button() Me.grpEnterKeybord1.SuspendLayout() Me.grpEnterKeyboard2.SuspendLayout() Me.SuspendLayout() @@ -351,10 +352,17 @@ Partial Class dlgEnter resources.ApplyResources(Me.ucrTryModelling, "ucrTryModelling") Me.ucrTryModelling.Name = "ucrTryModelling" ' + 'btnExample + ' + resources.ApplyResources(Me.btnExample, "btnExample") + Me.btnExample.Name = "btnExample" + Me.btnExample.UseVisualStyleBackColor = True + ' 'dlgEnter ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.btnExample) Me.Controls.Add(Me.ucrTryModelling) Me.Controls.Add(Me.grpEnterKeyboard2) Me.Controls.Add(Me.ucrSaveEnterResultInto) @@ -415,4 +423,5 @@ Partial Class dlgEnter Friend WithEvents cmdColon As Button Friend WithEvents grpEnterKeyboard2 As GroupBox Friend WithEvents ucrTryModelling As ucrTry + Friend WithEvents btnExample As Button End Class diff --git a/instat/dlgEnter.resx b/instat/dlgEnter.resx index 1e421263152..86efc237b7a 100644 --- a/instat/dlgEnter.resx +++ b/instat/dlgEnter.resx @@ -123,7 +123,7 @@ - 347, 26 + 371, 23 106, 17 @@ -144,7 +144,7 @@ $this - 5 + 6 True @@ -175,10 +175,10 @@ $this - 7 + 8 - 11, 280 + 11, 259 2, 3, 2, 3 @@ -202,7 +202,7 @@ $this - 3 + 4 4, 76 @@ -640,7 +640,7 @@ $this - 6 + 7 106, 14 @@ -1057,10 +1057,10 @@ $this - 1 + 2 - 195, 275 + 195, 254 2, 3, 2, 3 @@ -1081,7 +1081,7 @@ $this - 2 + 3 11, 65 @@ -1105,7 +1105,7 @@ $this - 4 + 5 True @@ -1114,10 +1114,40 @@ 6, 13 - 573, 376 + 573, 346 + + + NoControl + + + 301, 21 + + + 2, 2, 2, 2 + + + 64, 22 + + + 161 + + + Examples + + + btnExample + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 - 3, 236 + 3, 215 480, 33 @@ -1135,10 +1165,10 @@ $this - 0 + 1 - 11, 307 + 11, 286 452, 52 @@ -1156,7 +1186,10 @@ $this - 9 + 10 + + + NoControl CenterScreen @@ -1171,7 +1204,7 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 65, 26 + 44, 21 2, 3, 2, 3 @@ -1192,6 +1225,6 @@ $this - 8 + 9 \ No newline at end of file diff --git a/instat/dlgEnter.vb b/instat/dlgEnter.vb index a3fc713cc74..ebed417e85b 100644 --- a/instat/dlgEnter.vb +++ b/instat/dlgEnter.vb @@ -290,4 +290,42 @@ Public Class dlgEnter End If SaveResults() End Sub + + Private Sub btnExample_Click(sender As Object, e As EventArgs) Handles btnExample.Click + Dim objPopup As New clsPopup + Dim lstView As New ListView With { + .Scrollable = True, + .View = View.Details, + .FullRowSelect = True, + .ShowItemToolTips = True + } + + 'add a single column + lstView.Columns.Add("Commands", 450) + + 'add rows of sample commands + lstView.Items.Add(New ListViewItem({"seq(9 )"})) + lstView.Items.Item(0).ToolTipText = "todo. sensible tooltip here." + + lstView.Items.Add(New ListViewItem({"LETTERS"})) + lstView.Items.Item(1).ToolTipText = "todo. sensible tooltip here." + + lstView.Items.Add(New ListViewItem({"month.name"})) + lstView.Items.Item(2).ToolTipText = "todo. sensible tooltip here" + + lstView.Items.Add(New ListViewItem({"month.abb"})) + lstView.Items.Item(2).ToolTipText = "todo. sensible tooltip here" + + + AddHandler lstView.DoubleClick, Sub() + If lstView.SelectedItems.Count > 1 Then + ucrReceiverForEnterCalculation.AddToReceiverAtCursorPosition(lstView.SelectedItems.Item(0).SubItems(0).Text) + objPopup.Hide() + End If + End Sub + + objPopup.SetContentControl(lstView) + objPopup.SetSize(ucrReceiverForEnterCalculation.Width, ucrReceiverForEnterCalculation.Height + 100) + objPopup.Show(ucrReceiverForEnterCalculation) + End Sub End Class From cefe6aa52fc9b0d5e63549ef77ad2847e90444fd Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Mon, 3 Aug 2020 08:40:46 +0200 Subject: [PATCH 018/277] Update instat/ucrReceiver.vb Co-authored-by: Shadrack Kibet --- instat/ucrReceiver.vb | 71 ++++++++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/instat/ucrReceiver.vb b/instat/ucrReceiver.vb index 875162b0b71..736e8822d12 100644 --- a/instat/ucrReceiver.vb +++ b/instat/ucrReceiver.vb @@ -77,7 +77,8 @@ Public Class ucrReceiver Public bForceVariablesAsList As Boolean = False 'used by the selector to autoswitch from the current receiver - Public bAutoSwitchFromReceiver As Boolean = True + Public bAutoSwitchFromReceiver As Boolean = False + Public Sub New() ' This call is required by the designer. @@ -111,24 +112,24 @@ Public Class ucrReceiver Public Overridable Sub Remove(strItems As String()) - End Sub - - Public Overridable Sub Clear() - - End Sub - - Public Overridable Function IsEmpty() As Boolean - Return True - End Function - - Public Overridable Sub SetColor() - - End Sub - - Public Overridable Sub RemoveColor() - - End Sub - + End Sub + + Public Overridable Sub Clear() + + End Sub + + Public Overridable Function IsEmpty() As Boolean + Return True + End Function + + Public Overridable Sub SetColor() + + End Sub + + Public Overridable Sub RemoveColor() + + End Sub + Public Property strNcFilePath As String Get Return strPrvNcFilePath @@ -141,21 +142,21 @@ Public Class ucrReceiver End Set End Property - Public Overridable Function GetVariables(Optional bForceAsDataFrame As Boolean = False) As RFunction - Dim clsGetVariablesFunc As New RFunction - Return clsGetVariablesFunc - End Function - - Public Overridable Function GetVariableNames(Optional bWithQuotes As Boolean = True) As String - Dim strVarNames As String = "" - Return strVarNames - End Function - - Public Overridable Function GetVariableNamesList(Optional bWithQuotes As Boolean = True, Optional strQuotes As String = Chr(34)) As String() - Dim strVarNames As String() = Nothing - Return strVarNames - End Function - + Public Overridable Function GetVariables(Optional bForceAsDataFrame As Boolean = False) As RFunction + Dim clsGetVariablesFunc As New RFunction + Return clsGetVariablesFunc + End Function + + Public Overridable Function GetVariableNames(Optional bWithQuotes As Boolean = True) As String + Dim strVarNames As String = "" + Return strVarNames + End Function + + Public Overridable Function GetVariableNamesList(Optional bWithQuotes As Boolean = True, Optional strQuotes As String = Chr(34)) As String() + Dim strVarNames As String() = Nothing + Return strVarNames + End Function + Public Overridable Sub SetMeAsReceiver() If Selector IsNot Nothing Then Selector.SetCurrentReceiver(Me) @@ -652,4 +653,4 @@ Public Class ucrReceiver End If End If End Sub -End Class \ No newline at end of file +End Class From fcb8934fb38dbea38132c8721f6b949a558debac Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Mon, 3 Aug 2020 08:42:27 +0200 Subject: [PATCH 019/277] Update instat/ucrSelector.vb Co-authored-by: Shadrack Kibet --- instat/ucrSelector.vb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index d9a05ea9688..a21544b9ade 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -462,7 +462,8 @@ Public Class ucrSelector ''' ''' Adds passed enumerable of receivers to the end of the receivers list - ''' The reciver is only added if it does not exist in the list + ''' The receiver is only added if it does not exist in the list + ''' ''' Public Overridable Sub AddReceiver(ucrNewReceivers As IEnumerable(Of ucrReceiver)) @@ -507,4 +508,4 @@ Public Class ucrSelector Next End Sub -End Class \ No newline at end of file +End Class From f2fa1da4a2206e96e7f552b5ff256b0231597199 Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Mon, 3 Aug 2020 10:10:21 +0200 Subject: [PATCH 020/277] Update instat/ucrSelector.vb Co-authored-by: Shadrack Kibet --- instat/ucrSelector.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index a21544b9ade..c2599497ea9 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -496,8 +496,8 @@ Public Class ucrSelector For i As Integer = 0 To lstOrderedReceivers.Count - 2 If lstOrderedReceivers.Item(i) Is FromSelectedReceiver Then ucrNewCurrentReceiver = lstOrderedReceivers.Item(i + 1) - If ucrNewCurrentReceiver.Visible AndAlso - ucrNewCurrentReceiver.Enabled Then + If ucrNewCurrentReceiver.Visible AndAlso ucrNewCurrentReceiver.Enabled Then + ucrNewCurrentReceiver.Focus() 'sets current focus enabling correct tab navigation SetCurrentReceiver(ucrNewCurrentReceiver) Else From 401c1d747e9e153d7b206968e2b2f1e5f2b2496a Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 3 Aug 2020 14:20:07 +0300 Subject: [PATCH 021/277] Replaced the old save control with the new save control in the calculator --- instat/ucrCalculator.Designer.vb | 27 +- instat/ucrCalculator.resx | 2464 ++++++++++++++---------------- instat/ucrCalculator.vb | 4 +- 3 files changed, 1182 insertions(+), 1313 deletions(-) diff --git a/instat/ucrCalculator.Designer.vb b/instat/ucrCalculator.Designer.vb index 76c6abd0ead..f93bdc5e3ac 100644 --- a/instat/ucrCalculator.Designer.vb +++ b/instat/ucrCalculator.Designer.vb @@ -41,7 +41,6 @@ Partial Class ucrCalculator Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ucrCalculator)) Me.lblExpression = New System.Windows.Forms.Label() - Me.chkSaveResultInto = New System.Windows.Forms.CheckBox() Me.cmdHelp = New System.Windows.Forms.Button() Me.chkShowParameters = New System.Windows.Forms.CheckBox() Me.grpBasic = New System.Windows.Forms.GroupBox() @@ -391,9 +390,9 @@ Partial Class ucrCalculator Me.cmdBr2 = New System.Windows.Forms.Button() Me.ucrTryCalculator = New instat.ucrTry() Me.ucrInputCalOptions = New instat.ucrInputComboBox() - Me.ucrSaveResultInto = New instat.ucrInputComboBox() Me.ucrSelectorForCalculations = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverForCalculation = New instat.ucrReceiverExpression() + Me.ucrSaveResultInto = New instat.ucrSave() Me.grpBasic.SuspendLayout() Me.grpDates.SuspendLayout() Me.grpTransform.SuspendLayout() @@ -416,12 +415,6 @@ Partial Class ucrCalculator Me.lblExpression.Name = "lblExpression" Me.lblExpression.Tag = "Expression" ' - 'chkSaveResultInto - ' - resources.ApplyResources(Me.chkSaveResultInto, "chkSaveResultInto") - Me.chkSaveResultInto.Name = "chkSaveResultInto" - Me.chkSaveResultInto.UseVisualStyleBackColor = True - ' 'cmdHelp ' resources.ApplyResources(Me.cmdHelp, "cmdHelp") @@ -2860,13 +2853,6 @@ Partial Class ucrCalculator resources.ApplyResources(Me.ucrInputCalOptions, "ucrInputCalOptions") Me.ucrInputCalOptions.Name = "ucrInputCalOptions" ' - 'ucrSaveResultInto - ' - Me.ucrSaveResultInto.AddQuotesIfUnrecognised = True - Me.ucrSaveResultInto.IsReadOnly = False - resources.ApplyResources(Me.ucrSaveResultInto, "ucrSaveResultInto") - Me.ucrSaveResultInto.Name = "ucrSaveResultInto" - ' 'ucrSelectorForCalculations ' Me.ucrSelectorForCalculations.bDropUnusedFilterLevels = False @@ -2884,10 +2870,16 @@ Partial Class ucrCalculator Me.ucrReceiverForCalculation.strNcFilePath = "" Me.ucrReceiverForCalculation.ucrSelector = Nothing ' + 'ucrSaveResultInto + ' + resources.ApplyResources(Me.ucrSaveResultInto, "ucrSaveResultInto") + Me.ucrSaveResultInto.Name = "ucrSaveResultInto" + ' 'ucrCalculator ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.ucrSaveResultInto) Me.Controls.Add(Me.grpHydroGOF) Me.Controls.Add(Me.ucrTryCalculator) Me.Controls.Add(Me.grpFactor) @@ -2906,8 +2898,6 @@ Partial Class ucrCalculator Me.Controls.Add(Me.chkShowParameters) Me.Controls.Add(Me.ucrInputCalOptions) Me.Controls.Add(Me.grpBasic) - Me.Controls.Add(Me.ucrSaveResultInto) - Me.Controls.Add(Me.chkSaveResultInto) Me.Controls.Add(Me.ucrSelectorForCalculations) Me.Controls.Add(Me.ucrReceiverForCalculation) Me.Controls.Add(Me.lblExpression) @@ -2933,8 +2923,6 @@ Partial Class ucrCalculator Friend WithEvents ucrReceiverForCalculation As ucrReceiverExpression Friend WithEvents lblExpression As Label - Friend WithEvents ucrSaveResultInto As ucrInputComboBox - Friend WithEvents chkSaveResultInto As CheckBox Friend WithEvents ucrSelectorForCalculations As ucrSelectorByDataFrameAddRemove Friend WithEvents cmdHelp As Button Friend WithEvents chkShowParameters As CheckBox @@ -3288,4 +3276,5 @@ Partial Class ucrCalculator Friend WithEvents cmdVE As Button Friend WithEvents cmdSsq As Button Friend WithEvents cmdRsr As Button + Friend WithEvents ucrSaveResultInto As ucrSave End Class diff --git a/instat/ucrCalculator.resx b/instat/ucrCalculator.resx index f84380efe0e..d776b325127 100644 --- a/instat/ucrCalculator.resx +++ b/instat/ucrCalculator.resx @@ -127,10 +127,13 @@ - 11, 12 + 8, 10 + + + 2, 0, 2, 0 - 77, 17 + 58, 13 119 @@ -148,52 +151,16 @@ $this - 22 - - - True - - - NoControl - - - 13, 368 - - - 3, 4, 3, 4 - - - 133, 21 - - - 176 - - - Save Result into - - - chkSaveResultInto - - - System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 19 + 21 NoControl - 415, 281 - - - 4, 4, 4, 4 + 311, 228 - 100, 28 + 75, 23 182 @@ -211,7 +178,7 @@ $this - 14 + 15 True @@ -220,13 +187,10 @@ NoControl - 93, 50 - - - 4, 4, 4, 4 + 70, 41 - 141, 21 + 109, 17 181 @@ -244,19 +208,19 @@ $this - 15 + 16 NoControl - 201, 87 + 151, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 65, 74 + 49, 60 190 @@ -283,13 +247,13 @@ NoControl - 4, 123 + 3, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 138 @@ -313,13 +277,13 @@ NoControl - 103, 123 + 77, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 136 @@ -346,13 +310,13 @@ NoControl - 201, 52 + 151, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 65, 37 + 49, 30 133 @@ -379,13 +343,13 @@ NoControl - 152, 16 + 114, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 131 @@ -412,13 +376,13 @@ NoControl - 152, 123 + 114, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 130 @@ -445,13 +409,13 @@ NoControl - 152, 87 + 114, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 129 @@ -478,13 +442,13 @@ NoControl - 152, 52 + 114, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 128 @@ -511,13 +475,13 @@ NoControl - 201, 16 + 151, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 65, 37 + 49, 30 127 @@ -541,13 +505,13 @@ NoControl - 103, 16 + 77, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 126 @@ -571,13 +535,13 @@ NoControl - 53, 16 + 40, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 125 @@ -601,13 +565,13 @@ NoControl - 4, 16 + 3, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 124 @@ -631,13 +595,13 @@ NoControl - 103, 52 + 77, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 123 @@ -661,13 +625,13 @@ NoControl - 53, 52 + 40, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 122 @@ -691,13 +655,13 @@ NoControl - 4, 52 + 3, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 121 @@ -721,13 +685,13 @@ NoControl - 103, 87 + 77, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 120 @@ -751,13 +715,13 @@ NoControl - 53, 87 + 40, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 119 @@ -781,13 +745,13 @@ NoControl - 53, 123 + 40, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 118 @@ -811,13 +775,13 @@ NoControl - 4, 87 + 3, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 117 @@ -838,16 +802,16 @@ 18 - 297, 81 + 223, 66 - 3, 4, 3, 4 + 2, 3, 2, 3 - 3, 4, 3, 4 + 2, 3, 2, 3 - 273, 165 + 205, 134 179 @@ -865,19 +829,16 @@ $this - 17 + 18 NoControl - 163, 194 - - - 4, 4, 4, 4 + 122, 158 - 80, 37 + 60, 30 157 @@ -901,13 +862,10 @@ NoControl - 84, 194 - - - 4, 4, 4, 4 + 63, 158 - 80, 37 + 60, 30 156 @@ -931,13 +889,10 @@ NoControl - 5, 194 - - - 4, 4, 4, 4 + 4, 158 - 80, 37 + 60, 30 155 @@ -961,13 +916,10 @@ NoControl - 163, 159 - - - 4, 4, 4, 4 + 122, 129 - 80, 37 + 60, 30 154 @@ -991,13 +943,10 @@ NoControl - 5, 159 - - - 4, 4, 4, 4 + 4, 129 - 80, 37 + 60, 30 153 @@ -1021,13 +970,10 @@ NoControl - 84, 159 - - - 4, 4, 4, 4 + 63, 129 - 80, 37 + 60, 30 152 @@ -1051,13 +997,13 @@ NoControl - 5, 87 + 4, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 151 @@ -1081,13 +1027,13 @@ NoControl - 163, 123 + 122, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 150 @@ -1111,13 +1057,13 @@ NoControl - 163, 16 + 122, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 145 @@ -1141,13 +1087,13 @@ NoControl - 84, 16 + 63, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 144 @@ -1171,13 +1117,13 @@ NoControl - 5, 16 + 4, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 143 @@ -1201,13 +1147,13 @@ NoControl - 163, 52 + 122, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 142 @@ -1231,13 +1177,13 @@ NoControl - 84, 52 + 63, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 141 @@ -1261,13 +1207,13 @@ NoControl - 5, 52 + 4, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 140 @@ -1291,13 +1237,13 @@ NoControl - 163, 87 + 122, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 139 @@ -1321,13 +1267,13 @@ NoControl - 84, 87 + 63, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 138 @@ -1351,13 +1297,13 @@ NoControl - 84, 123 + 63, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 137 @@ -1381,13 +1327,13 @@ NoControl - 5, 123 + 4, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 136 @@ -1408,16 +1354,10 @@ 17 - 579, 75 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 434, 61 - 251, 236 + 188, 192 188 @@ -1435,19 +1375,16 @@ $this - 13 + 14 NoControl - 249, 198 - - - 4, 4, 4, 4 + 187, 161 - 83, 37 + 62, 30 197 @@ -1471,13 +1408,10 @@ NoControl - 167, 198 - - - 4, 4, 4, 4 + 125, 161 - 83, 37 + 62, 30 196 @@ -1501,13 +1435,10 @@ NoControl - 85, 198 - - - 4, 4, 4, 4 + 64, 161 - 83, 37 + 62, 30 195 @@ -1531,13 +1462,10 @@ NoControl - 3, 198 - - - 4, 4, 4, 4 + 2, 161 - 83, 37 + 62, 30 194 @@ -1561,13 +1489,10 @@ NoControl - 3, 126 - - - 4, 4, 4, 4 + 2, 102 - 83, 37 + 62, 30 193 @@ -1591,13 +1516,10 @@ NoControl - 3, 162 - - - 4, 4, 4, 4 + 2, 132 - 83, 37 + 62, 30 192 @@ -1621,13 +1543,10 @@ NoControl - 85, 126 - - - 4, 4, 4, 4 + 64, 102 - 83, 37 + 62, 30 191 @@ -1651,13 +1570,10 @@ NoControl - 249, 126 - - - 4, 4, 4, 4 + 187, 102 - 83, 37 + 62, 30 190 @@ -1681,13 +1597,10 @@ NoControl - 167, 90 - - - 4, 4, 4, 4 + 125, 73 - 83, 37 + 62, 30 189 @@ -1711,13 +1624,10 @@ NoControl - 167, 54 - - - 4, 4, 4, 4 + 125, 44 - 83, 37 + 62, 30 188 @@ -1741,13 +1651,10 @@ NoControl - 167, 126 - - - 4, 4, 4, 4 + 125, 102 - 83, 37 + 62, 30 187 @@ -1771,13 +1678,10 @@ NoControl - 249, 90 - - - 4, 4, 4, 4 + 187, 73 - 83, 37 + 62, 30 186 @@ -1801,13 +1705,10 @@ NoControl - 249, 162 - - - 4, 4, 4, 4 + 187, 132 - 83, 37 + 62, 30 185 @@ -1831,13 +1732,10 @@ NoControl - 167, 162 - - - 4, 4, 4, 4 + 125, 132 - 83, 37 + 62, 30 184 @@ -1861,13 +1759,10 @@ NoControl - 3, 90 - - - 4, 4, 4, 4 + 2, 73 - 83, 37 + 62, 30 183 @@ -1891,13 +1786,10 @@ NoControl - 85, 90 - - - 4, 4, 4, 4 + 64, 73 - 83, 37 + 62, 30 182 @@ -1924,13 +1816,13 @@ NoControl - 85, 162 + 64, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 181 @@ -1954,13 +1846,10 @@ NoControl - 85, 54 - - - 4, 4, 4, 4 + 64, 44 - 83, 37 + 62, 30 180 @@ -1984,13 +1873,10 @@ NoControl - 249, 54 - - - 4, 4, 4, 4 + 187, 44 - 83, 37 + 62, 30 179 @@ -2014,13 +1900,10 @@ NoControl - 3, 54 - - - 4, 4, 4, 4 + 2, 44 - 83, 37 + 62, 30 178 @@ -2044,13 +1927,10 @@ NoControl - 249, 18 - - - 4, 4, 4, 4 + 187, 15 - 83, 37 + 62, 30 177 @@ -2074,13 +1954,10 @@ NoControl - 167, 18 - - - 4, 4, 4, 4 + 125, 15 - 83, 37 + 62, 30 176 @@ -2104,13 +1981,10 @@ NoControl - 85, 18 - - - 4, 4, 4, 4 + 64, 15 - 83, 37 + 62, 30 175 @@ -2134,13 +2008,10 @@ NoControl - 3, 18 - - - 4, 4, 4, 4 + 2, 15 - 83, 37 + 62, 30 174 @@ -2161,16 +2032,10 @@ 23 - 575, 79 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 431, 64 - 342, 251 + 256, 204 189 @@ -2188,7 +2053,7 @@ $this - 8 + 9 Microsoft Sans Serif, 8.25pt @@ -2197,13 +2062,13 @@ NoControl - 308, 124 + 231, 101 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 182 @@ -2227,13 +2092,13 @@ NoControl - 308, 52 + 231, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 180 @@ -2257,13 +2122,13 @@ NoControl - 234, 52 + 176, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 179 @@ -2287,13 +2152,13 @@ NoControl - 160, 160 + 120, 130 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 178 @@ -2317,13 +2182,13 @@ NoControl - 234, 160 + 176, 130 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 177 @@ -2347,13 +2212,13 @@ NoControl - 308, 160 + 231, 130 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 176 @@ -2377,13 +2242,13 @@ NoControl - 87, 196 + 65, 159 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 175 @@ -2407,13 +2272,13 @@ NoControl - 161, 196 + 121, 159 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 174 @@ -2440,13 +2305,13 @@ NoControl - 234, 88 + 176, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 173 @@ -2473,13 +2338,13 @@ NoControl - 160, 124 + 120, 101 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 172 @@ -2506,13 +2371,13 @@ NoControl - 86, 160 + 64, 130 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 171 @@ -2539,13 +2404,13 @@ NoControl - 86, 124 + 64, 101 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 170 @@ -2572,13 +2437,13 @@ NoControl - 234, 124 + 176, 101 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 169 @@ -2605,13 +2470,13 @@ NoControl - 3, 160 + 2, 130 - 3, 4, 3, 4 + 2, 3, 2, 3 - 84, 37 + 63, 30 168 @@ -2635,13 +2500,13 @@ NoControl - 3, 124 + 2, 101 - 3, 4, 3, 4 + 2, 3, 2, 3 - 84, 37 + 63, 30 167 @@ -2665,13 +2530,13 @@ NoControl - 3, 88 + 2, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 84, 37 + 63, 30 166 @@ -2698,13 +2563,13 @@ NoControl - 308, 88 + 231, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 165 @@ -2731,13 +2596,13 @@ NoControl - 235, 196 + 176, 159 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 164 @@ -2764,13 +2629,13 @@ NoControl - 308, 16 + 231, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 163 @@ -2794,13 +2659,13 @@ NoControl - 160, 88 + 120, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 160 @@ -2827,13 +2692,13 @@ NoControl - 160, 52 + 120, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 158 @@ -2857,13 +2722,13 @@ NoControl - 160, 16 + 120, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 155 @@ -2887,13 +2752,13 @@ NoControl - 234, 16 + 176, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 154 @@ -2920,13 +2785,13 @@ NoControl - 86, 52 + 64, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 153 @@ -2950,13 +2815,13 @@ NoControl - 3, 52 + 2, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 84, 37 + 63, 30 149 @@ -2983,13 +2848,13 @@ NoControl - 3, 16 + 2, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 84, 37 + 63, 30 148 @@ -3013,13 +2878,13 @@ NoControl - 86, 16 + 64, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 150 @@ -3043,13 +2908,13 @@ NoControl - 86, 88 + 64, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 75, 37 + 56, 30 159 @@ -3070,16 +2935,16 @@ 27 - 575, 79 + 431, 64 - 3, 4, 3, 4 + 2, 3, 2, 3 - 3, 4, 3, 4 + 2, 3, 2, 3 - 388, 237 + 291, 193 185 @@ -3097,19 +2962,16 @@ $this - 7 + 8 NoControl - 203, 52 - - - 4, 4, 4, 4 + 152, 42 - 69, 37 + 52, 30 207 @@ -3133,13 +2995,10 @@ NoControl - 203, 16 - - - 4, 4, 4, 4 + 152, 13 - 69, 37 + 52, 30 206 @@ -3163,13 +3022,13 @@ NoControl - 157, 87 + 118, 71 - 3, 2, 3, 2 + 2, 2, 2, 2 - 67, 37 + 50, 30 205 @@ -3193,13 +3052,13 @@ NoControl - 104, 123 + 78, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 60, 37 + 45, 30 204 @@ -3223,13 +3082,10 @@ NoControl - 261, 123 - - - 4, 4, 4, 4 + 196, 100 - 69, 37 + 52, 30 203 @@ -3253,13 +3109,13 @@ NoControl - 212, 123 + 159, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 202 @@ -3283,13 +3139,10 @@ NoControl - 248, 194 - - - 4, 4, 4, 4 + 186, 158 - 83, 37 + 62, 30 201 @@ -3313,13 +3166,10 @@ NoControl - 248, 159 - - - 4, 4, 4, 4 + 186, 129 - 83, 37 + 62, 30 200 @@ -3343,13 +3193,10 @@ NoControl - 248, 230 - - - 4, 4, 4, 4 + 186, 187 - 83, 37 + 62, 30 199 @@ -3373,13 +3220,10 @@ NoControl - 5, 230 - - - 4, 4, 4, 4 + 4, 187 - 83, 37 + 62, 30 198 @@ -3403,13 +3247,10 @@ NoControl - 87, 230 - - - 4, 4, 4, 4 + 65, 187 - 77, 37 + 58, 30 197 @@ -3433,13 +3274,10 @@ NoControl - 163, 230 - - - 4, 4, 4, 4 + 122, 187 - 87, 37 + 65, 30 196 @@ -3463,13 +3301,10 @@ NoControl - 5, 194 - - - 4, 4, 4, 4 + 4, 158 - 83, 37 + 62, 30 195 @@ -3493,13 +3328,10 @@ NoControl - 87, 194 - - - 4, 4, 4, 4 + 65, 158 - 77, 37 + 58, 30 194 @@ -3523,13 +3355,10 @@ NoControl - 163, 194 - - - 4, 4, 4, 4 + 122, 158 - 87, 37 + 65, 30 193 @@ -3553,13 +3382,10 @@ NoControl - 5, 159 - - - 4, 4, 4, 4 + 4, 129 - 83, 37 + 62, 30 192 @@ -3583,13 +3409,10 @@ NoControl - 87, 159 - - - 4, 4, 4, 4 + 65, 129 - 77, 37 + 58, 30 191 @@ -3613,13 +3436,10 @@ NoControl - 163, 159 - - - 4, 4, 4, 4 + 122, 129 - 87, 37 + 65, 30 190 @@ -3643,13 +3463,13 @@ NoControl - 223, 87 + 167, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 53, 37 + 40, 30 139 @@ -3676,13 +3496,13 @@ NoControl - 55, 87 + 41, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 139 @@ -3706,13 +3526,13 @@ NoControl - 153, 16 + 115, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 138 @@ -3736,13 +3556,13 @@ NoControl - 275, 87 + 206, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 56, 37 + 42, 30 137 @@ -3769,13 +3589,13 @@ NoControl - 153, 52 + 115, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 137 @@ -3802,13 +3622,13 @@ NoControl - 163, 123 + 122, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 135 @@ -3832,13 +3652,13 @@ NoControl - 104, 87 + 78, 71 - 3, 2, 3, 2 + 2, 2, 2, 2 - 56, 37 + 42, 30 134 @@ -3862,13 +3682,13 @@ NoControl - 55, 123 + 41, 100 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 135 @@ -3892,13 +3712,13 @@ NoControl - 5, 123 + 4, 100 - 3, 2, 3, 2 + 2, 2, 2, 2 - 51, 37 + 38, 30 134 @@ -3922,13 +3742,13 @@ NoControl - 104, 16 + 78, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 133 @@ -3952,13 +3772,13 @@ NoControl - 55, 16 + 41, 13 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 132 @@ -3982,13 +3802,13 @@ NoControl - 5, 16 + 4, 13 - 3, 2, 3, 2 + 2, 2, 2, 2 - 51, 37 + 38, 30 131 @@ -4012,13 +3832,13 @@ NoControl - 104, 52 + 78, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 130 @@ -4045,13 +3865,13 @@ NoControl - 5, 87 + 4, 71 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 129 @@ -4075,13 +3895,13 @@ NoControl - 55, 52 + 41, 42 - 3, 4, 3, 4 + 2, 3, 2, 3 - 51, 37 + 38, 30 128 @@ -4105,13 +3925,13 @@ NoControl - 5, 52 + 4, 42 - 3, 2, 3, 2 + 2, 2, 2, 2 - 51, 37 + 38, 30 127 @@ -4132,16 +3952,16 @@ 33 - 573, 81 + 430, 66 - 3, 4, 3, 4 + 2, 3, 2, 3 - 3, 4, 3, 4 + 2, 3, 2, 3 - 337, 271 + 253, 220 183 @@ -4159,7 +3979,7 @@ $this - 5 + 6 Microsoft Sans Serif, 8.25pt @@ -4168,13 +3988,13 @@ NoControl - 240, 162 + 180, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 160 @@ -4201,13 +4021,13 @@ NoControl - 161, 162 + 121, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 159 @@ -4234,13 +4054,13 @@ NoControl - 82, 162 + 62, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 158 @@ -4267,13 +4087,13 @@ NoControl - 239, 126 + 179, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 157 @@ -4300,13 +4120,13 @@ NoControl - 160, 126 + 120, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 156 @@ -4333,13 +4153,13 @@ NoControl - 81, 126 + 61, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 155 @@ -4366,13 +4186,13 @@ NoControl - 318, 90 + 238, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 154 @@ -4399,13 +4219,13 @@ NoControl - 160, 90 + 120, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 152 @@ -4432,13 +4252,13 @@ NoControl - 318, 54 + 238, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 151 @@ -4465,13 +4285,13 @@ NoControl - 318, 18 + 238, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 150 @@ -4498,13 +4318,13 @@ NoControl - 318, 126 + 238, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 149 @@ -4531,13 +4351,13 @@ NoControl - 239, 54 + 179, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 148 @@ -4564,13 +4384,13 @@ NoControl - 81, 90 + 61, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 147 @@ -4597,13 +4417,13 @@ NoControl - 239, 18 + 179, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 146 @@ -4630,13 +4450,13 @@ NoControl - 160, 18 + 120, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 142 @@ -4663,13 +4483,13 @@ NoControl - 81, 18 + 61, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 141 @@ -4696,13 +4516,13 @@ NoControl - 2, 18 + 2, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 140 @@ -4729,13 +4549,13 @@ NoControl - 160, 54 + 120, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 139 @@ -4762,13 +4582,13 @@ NoControl - 81, 54 + 61, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 138 @@ -4795,13 +4615,13 @@ NoControl - 2, 54 + 2, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 137 @@ -4828,13 +4648,13 @@ NoControl - 239, 90 + 179, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 136 @@ -4861,13 +4681,13 @@ NoControl - 2, 90 + 2, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 134 @@ -4894,13 +4714,13 @@ NoControl - 2, 126 + 2, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 80, 37 + 60, 30 133 @@ -4924,16 +4744,10 @@ Microsoft Sans Serif, 8.25pt - 579, 78 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 434, 63 - 401, 199 + 301, 162 186 @@ -4951,7 +4765,7 @@ $this - 12 + 13 Microsoft Sans Serif, 8.25pt @@ -4960,13 +4774,13 @@ NoControl - 331, 126 + 248, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 176 @@ -4993,13 +4807,13 @@ NoControl - 249, 126 + 187, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 175 @@ -5026,13 +4840,13 @@ NoControl - 167, 126 + 125, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 174 @@ -5059,13 +4873,13 @@ NoControl - 85, 126 + 64, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 173 @@ -5092,13 +4906,13 @@ NoControl - 3, 126 + 2, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 172 @@ -5125,13 +4939,13 @@ NoControl - 331, 90 + 248, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 171 @@ -5158,13 +4972,13 @@ NoControl - 249, 90 + 187, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 170 @@ -5191,13 +5005,13 @@ NoControl - 167, 90 + 125, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 169 @@ -5224,13 +5038,13 @@ NoControl - 85, 90 + 64, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 168 @@ -5257,13 +5071,13 @@ NoControl - 3, 90 + 2, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 167 @@ -5290,13 +5104,13 @@ NoControl - 331, 54 + 248, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 166 @@ -5323,13 +5137,13 @@ NoControl - 331, 18 + 248, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 165 @@ -5356,13 +5170,13 @@ NoControl - 249, 162 + 187, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 163 @@ -5389,13 +5203,13 @@ NoControl - 167, 198 + 125, 161 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 159 @@ -5422,13 +5236,13 @@ NoControl - 249, 54 + 187, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 162 @@ -5455,13 +5269,13 @@ NoControl - 3, 162 + 2, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 154 @@ -5488,13 +5302,13 @@ NoControl - 85, 162 + 64, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 161 @@ -5521,13 +5335,13 @@ NoControl - 249, 18 + 187, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 156 @@ -5554,13 +5368,13 @@ NoControl - 167, 18 + 125, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 155 @@ -5587,13 +5401,13 @@ NoControl - 249, 198 + 187, 161 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 152 @@ -5620,13 +5434,13 @@ NoControl - 3, 18 + 2, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 148 @@ -5653,13 +5467,13 @@ NoControl - 167, 54 + 125, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 160 @@ -5686,13 +5500,13 @@ NoControl - 85, 54 + 64, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 158 @@ -5719,13 +5533,13 @@ NoControl - 3, 54 + 2, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 157 @@ -5752,13 +5566,13 @@ NoControl - 85, 18 + 64, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 153 @@ -5785,13 +5599,13 @@ NoControl - 85, 198 + 64, 161 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 151 @@ -5818,13 +5632,13 @@ NoControl - 3, 198 + 2, 161 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 150 @@ -5851,13 +5665,13 @@ NoControl - 331, 198 + 248, 161 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 149 @@ -5884,13 +5698,13 @@ NoControl - 167, 162 + 125, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 149 @@ -5917,13 +5731,13 @@ NoControl - 331, 162 + 248, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 164 @@ -5944,16 +5758,10 @@ 29 - 577, 81 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 433, 66 - 421, 239 + 316, 194 187 @@ -5971,19 +5779,16 @@ $this - 9 + 10 NoControl - 204, 161 - - - 4, 4, 4, 4 + 153, 131 - 68, 37 + 51, 30 151 @@ -6007,13 +5812,10 @@ NoControl - 137, 161 - - - 4, 4, 4, 4 + 103, 131 - 68, 37 + 51, 30 149 @@ -6037,13 +5839,10 @@ NoControl - 70, 161 - - - 4, 4, 4, 4 + 52, 131 - 68, 37 + 51, 30 148 @@ -6067,13 +5866,13 @@ NoControl - 271, 125 + 203, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 147 @@ -6100,13 +5899,13 @@ NoControl - 204, 125 + 153, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 146 @@ -6133,13 +5932,13 @@ NoControl - 137, 125 + 103, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 145 @@ -6163,13 +5962,13 @@ NoControl - 70, 125 + 52, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 144 @@ -6193,13 +5992,13 @@ NoControl - 3, 125 + 2, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 143 @@ -6223,13 +6022,13 @@ NoControl - 271, 89 + 203, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 142 @@ -6256,13 +6055,13 @@ NoControl - 204, 89 + 153, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 141 @@ -6286,13 +6085,13 @@ NoControl - 137, 89 + 103, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 140 @@ -6316,13 +6115,13 @@ NoControl - 70, 89 + 52, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 139 @@ -6349,13 +6148,13 @@ NoControl - 3, 89 + 2, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 138 @@ -6379,13 +6178,13 @@ NoControl - 271, 53 + 203, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 137 @@ -6412,13 +6211,13 @@ NoControl - 204, 53 + 153, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 136 @@ -6442,13 +6241,13 @@ NoControl - 137, 53 + 103, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 135 @@ -6472,13 +6271,13 @@ NoControl - 70, 53 + 52, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 134 @@ -6502,13 +6301,13 @@ NoControl - 3, 53 + 2, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 133 @@ -6532,13 +6331,13 @@ NoControl - 271, 17 + 203, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 132 @@ -6565,13 +6364,13 @@ NoControl - 204, 17 + 153, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 131 @@ -6595,13 +6394,13 @@ NoControl - 137, 17 + 103, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 130 @@ -6625,13 +6424,13 @@ NoControl - 70, 17 + 52, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 129 @@ -6655,13 +6454,13 @@ NoControl - 3, 17 + 2, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 128 @@ -6682,16 +6481,16 @@ 22 - 575, 79 + 431, 64 - 3, 4, 3, 4 + 2, 3, 2, 3 - 3, 4, 3, 4 + 2, 3, 2, 3 - 342, 206 + 256, 167 184 @@ -6709,7 +6508,7 @@ $this - 6 + 7 17, 17 @@ -6721,13 +6520,10 @@ NoControl - 343, 377 - - - 4, 4, 4, 4 + 257, 306 - 113, 37 + 85, 30 53 @@ -6754,13 +6550,10 @@ NoControl - 231, 377 - - - 4, 4, 4, 4 + 173, 306 - 113, 37 + 85, 30 52 @@ -6787,13 +6580,10 @@ NoControl - 119, 377 - - - 4, 4, 4, 4 + 89, 306 - 113, 37 + 85, 30 51 @@ -6820,13 +6610,10 @@ NoControl - 7, 377 - - - 4, 4, 4, 4 + 5, 306 - 113, 37 + 85, 30 50 @@ -6853,13 +6640,10 @@ NoControl - 455, 341 - - - 4, 4, 4, 4 + 341, 277 - 113, 37 + 85, 30 49 @@ -6886,13 +6670,10 @@ NoControl - 343, 341 - - - 4, 4, 4, 4 + 257, 277 - 113, 37 + 85, 30 48 @@ -6919,13 +6700,10 @@ NoControl - 231, 341 - - - 4, 4, 4, 4 + 173, 277 - 113, 37 + 85, 30 47 @@ -6952,13 +6730,10 @@ NoControl - 119, 341 - - - 4, 4, 4, 4 + 89, 277 - 113, 37 + 85, 30 46 @@ -6985,13 +6760,10 @@ NoControl - 7, 341 - - - 4, 4, 4, 4 + 5, 277 - 113, 37 + 85, 30 45 @@ -7018,13 +6790,10 @@ NoControl - 455, 305 - - - 4, 4, 4, 4 + 341, 248 - 113, 37 + 85, 30 44 @@ -7051,13 +6820,10 @@ NoControl - 343, 305 - - - 4, 4, 4, 4 + 257, 248 - 113, 37 + 85, 30 43 @@ -7084,13 +6850,10 @@ NoControl - 231, 305 - - - 4, 4, 4, 4 + 173, 248 - 113, 37 + 85, 30 42 @@ -7117,13 +6880,10 @@ NoControl - 119, 305 - - - 4, 4, 4, 4 + 89, 248 - 113, 37 + 85, 30 41 @@ -7150,13 +6910,10 @@ NoControl - 7, 305 - - - 4, 4, 4, 4 + 5, 248 - 113, 37 + 85, 30 40 @@ -7183,13 +6940,10 @@ NoControl - 455, 269 - - - 4, 4, 4, 4 + 341, 219 - 113, 37 + 85, 30 39 @@ -7216,13 +6970,10 @@ NoControl - 343, 269 - - - 4, 4, 4, 4 + 257, 219 - 113, 37 + 85, 30 38 @@ -7249,13 +7000,10 @@ NoControl - 231, 269 - - - 4, 4, 4, 4 + 173, 219 - 113, 37 + 85, 30 37 @@ -7282,13 +7030,10 @@ NoControl - 119, 269 - - - 4, 4, 4, 4 + 89, 219 - 113, 37 + 85, 30 36 @@ -7315,13 +7060,10 @@ NoControl - 7, 269 - - - 4, 4, 4, 4 + 5, 219 - 113, 37 + 85, 30 35 @@ -7348,13 +7090,10 @@ NoControl - 455, 233 - - - 4, 4, 4, 4 + 341, 189 - 113, 37 + 85, 30 34 @@ -7381,13 +7120,10 @@ NoControl - 343, 233 - - - 4, 4, 4, 4 + 257, 189 - 113, 37 + 85, 30 33 @@ -7414,13 +7150,10 @@ NoControl - 119, 233 - - - 4, 4, 4, 4 + 89, 189 - 113, 37 + 85, 30 31 @@ -7447,13 +7180,10 @@ NoControl - 7, 233 - - - 4, 4, 4, 4 + 5, 189 - 113, 37 + 85, 30 30 @@ -7480,13 +7210,10 @@ NoControl - 455, 197 - - - 4, 4, 4, 4 + 341, 160 - 113, 37 + 85, 30 29 @@ -7513,13 +7240,10 @@ NoControl - 343, 197 - - - 4, 4, 4, 4 + 257, 160 - 113, 37 + 85, 30 28 @@ -7546,13 +7270,10 @@ NoControl - 231, 197 - - - 4, 4, 4, 4 + 173, 160 - 113, 37 + 85, 30 27 @@ -7579,13 +7300,10 @@ NoControl - 119, 197 - - - 4, 4, 4, 4 + 89, 160 - 113, 37 + 85, 30 26 @@ -7612,13 +7330,10 @@ NoControl - 7, 197 - - - 4, 4, 4, 4 + 5, 160 - 113, 37 + 85, 30 25 @@ -7645,13 +7360,10 @@ NoControl - 455, 125 - - - 4, 4, 4, 4 + 341, 102 - 113, 37 + 85, 30 19 @@ -7678,13 +7390,10 @@ NoControl - 343, 125 - - - 4, 4, 4, 4 + 257, 102 - 113, 37 + 85, 30 18 @@ -7711,13 +7420,10 @@ NoControl - 231, 125 - - - 4, 4, 4, 4 + 173, 102 - 113, 37 + 85, 30 17 @@ -7744,13 +7450,10 @@ NoControl - 119, 125 - - - 4, 4, 4, 4 + 89, 102 - 113, 37 + 85, 30 16 @@ -7777,13 +7480,10 @@ NoControl - 7, 125 - - - 4, 4, 4, 4 + 5, 102 - 113, 37 + 85, 30 15 @@ -7810,13 +7510,10 @@ NoControl - 455, 89 - - - 4, 4, 4, 4 + 341, 72 - 113, 37 + 85, 30 14 @@ -7843,13 +7540,10 @@ NoControl - 343, 89 - - - 4, 4, 4, 4 + 257, 72 - 113, 37 + 85, 30 13 @@ -7876,13 +7570,10 @@ NoControl - 231, 89 - - - 4, 4, 4, 4 + 173, 72 - 113, 37 + 85, 30 12 @@ -7909,13 +7600,10 @@ NoControl - 119, 89 - - - 4, 4, 4, 4 + 89, 72 - 113, 37 + 85, 30 11 @@ -7942,13 +7630,10 @@ NoControl - 7, 89 - - - 4, 4, 4, 4 + 5, 72 - 113, 37 + 85, 30 10 @@ -7975,13 +7660,10 @@ NoControl - 455, 53 - - - 4, 4, 4, 4 + 341, 43 - 113, 37 + 85, 30 9 @@ -8008,13 +7690,10 @@ NoControl - 343, 53 - - - 4, 4, 4, 4 + 257, 43 - 113, 37 + 85, 30 8 @@ -8041,13 +7720,10 @@ NoControl - 231, 53 - - - 4, 4, 4, 4 + 173, 43 - 113, 37 + 85, 30 7 @@ -8074,13 +7750,10 @@ NoControl - 119, 53 - - - 4, 4, 4, 4 + 89, 43 - 113, 37 + 85, 30 6 @@ -8107,13 +7780,10 @@ NoControl - 7, 53 - - - 4, 4, 4, 4 + 5, 43 - 113, 37 + 85, 30 5 @@ -8140,13 +7810,10 @@ NoControl - 343, 161 - - - 4, 4, 4, 4 + 257, 131 - 113, 37 + 85, 30 23 @@ -8173,13 +7840,10 @@ NoControl - 455, 377 - - - 4, 4, 4, 4 + 341, 306 - 113, 37 + 85, 30 54 @@ -8206,13 +7870,10 @@ NoControl - 231, 233 - - - 4, 4, 4, 4 + 173, 189 - 113, 37 + 85, 30 32 @@ -8239,13 +7900,10 @@ NoControl - 455, 17 - - - 4, 4, 4, 4 + 341, 14 - 113, 37 + 85, 30 4 @@ -8272,13 +7930,10 @@ NoControl - 343, 17 - - - 4, 4, 4, 4 + 257, 14 - 113, 37 + 85, 30 3 @@ -8305,13 +7960,10 @@ NoControl - 231, 17 - - - 4, 4, 4, 4 + 173, 14 - 113, 37 + 85, 30 2 @@ -8338,13 +7990,10 @@ NoControl - 119, 17 - - - 4, 4, 4, 4 + 89, 14 - 113, 37 + 85, 30 1 @@ -8371,13 +8020,10 @@ NoControl - 7, 17 - - - 4, 4, 4, 4 + 5, 14 - 113, 37 + 85, 30 0 @@ -8404,13 +8050,10 @@ NoControl - 455, 161 - - - 4, 4, 4, 4 + 341, 131 - 113, 37 + 85, 30 24 @@ -8437,13 +8080,10 @@ NoControl - 231, 161 - - - 4, 4, 4, 4 + 173, 131 - 113, 37 + 85, 30 22 @@ -8470,13 +8110,10 @@ NoControl - 119, 161 - - - 4, 4, 4, 4 + 89, 131 - 113, 37 + 85, 30 21 @@ -8503,13 +8140,10 @@ NoControl - 7, 161 - - - 4, 4, 4, 4 + 5, 131 - 113, 37 + 85, 30 20 @@ -8530,16 +8164,10 @@ 54 - 573, 78 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 + 430, 63 - 579, 425 + 434, 345 191 @@ -8557,16 +8185,19 @@ $this - 4 + 5 NoControl - 3, 22 + 2, 18 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 15 @@ -8590,10 +8221,13 @@ NoControl - 161, 100 + 121, 81 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 13 @@ -8617,10 +8251,13 @@ NoControl - 240, 139 + 180, 113 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 10 @@ -8644,10 +8281,13 @@ NoControl - 3, 100 + 2, 81 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 8 @@ -8671,10 +8311,13 @@ NoControl - 82, 100 + 62, 81 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 6 @@ -8698,10 +8341,13 @@ NoControl - 240, 100 + 180, 81 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 14 @@ -8725,10 +8371,13 @@ NoControl - 161, 139 + 121, 113 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 12 @@ -8752,10 +8401,13 @@ NoControl - 82, 139 + 62, 113 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 11 @@ -8779,10 +8431,13 @@ NoControl - 3, 139 + 2, 113 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 9 @@ -8806,10 +8461,13 @@ NoControl - 161, 61 + 121, 50 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 7 @@ -8833,10 +8491,13 @@ NoControl - 240, 61 + 180, 50 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 5 @@ -8860,10 +8521,13 @@ NoControl - 82, 61 + 62, 50 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 4 @@ -8887,10 +8551,13 @@ NoControl - 3, 61 + 2, 50 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 3 @@ -8914,10 +8581,13 @@ NoControl - 240, 22 + 180, 18 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 2 @@ -8941,10 +8611,13 @@ NoControl - 161, 22 + 121, 18 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 1 @@ -8968,10 +8641,13 @@ NoControl - 82, 22 + 62, 18 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 0 @@ -8992,10 +8668,16 @@ 15 - 573, 75 + 430, 61 + + + 2, 2, 2, 2 + + + 2, 2, 2, 2 - 331, 189 + 248, 154 192 @@ -9013,16 +8695,19 @@ $this - 3 + 4 NoControl - 243, 176 + 182, 143 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 210 @@ -9046,10 +8731,13 @@ NoControl - 164, 176 + 123, 143 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 209 @@ -9073,10 +8761,13 @@ NoControl - 85, 176 + 64, 143 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 208 @@ -9100,10 +8791,13 @@ NoControl - 6, 176 + 4, 143 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 207 @@ -9127,10 +8821,13 @@ NoControl - 243, 137 + 182, 111 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 206 @@ -9154,10 +8851,13 @@ NoControl - 164, 137 + 123, 111 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 205 @@ -9181,10 +8881,13 @@ NoControl - 85, 137 + 64, 111 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 204 @@ -9208,10 +8911,13 @@ NoControl - 6, 137 + 4, 111 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 203 @@ -9235,10 +8941,13 @@ NoControl - 243, 98 + 182, 80 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 202 @@ -9262,10 +8971,13 @@ NoControl - 164, 98 + 123, 80 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 201 @@ -9289,10 +9001,13 @@ NoControl - 85, 98 + 64, 80 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 200 @@ -9316,10 +9031,13 @@ NoControl - 6, 98 + 4, 80 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 199 @@ -9343,10 +9061,13 @@ NoControl - 243, 59 + 182, 48 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 198 @@ -9370,10 +9091,13 @@ NoControl - 164, 59 + 123, 48 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 197 @@ -9397,10 +9121,13 @@ NoControl - 85, 59 + 64, 48 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 196 @@ -9424,10 +9151,13 @@ NoControl - 6, 59 + 4, 48 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 195 @@ -9451,10 +9181,13 @@ NoControl - 243, 20 + 182, 16 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 194 @@ -9478,10 +9211,13 @@ NoControl - 164, 20 + 123, 16 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 193 @@ -9505,10 +9241,13 @@ NoControl - 6, 20 + 4, 16 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 191 @@ -9532,10 +9271,13 @@ NoControl - 85, 20 + 64, 16 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 192 @@ -9556,10 +9298,16 @@ 19 - 574, 75 + 430, 61 + + + 2, 2, 2, 2 + + + 2, 2, 2, 2 - 330, 226 + 248, 184 191 @@ -9577,16 +9325,19 @@ $this - 2 + 3 NoControl - 251, 16 + 188, 13 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 3 @@ -9610,10 +9361,13 @@ NoControl - 168, 16 + 126, 13 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 2 @@ -9637,10 +9391,13 @@ NoControl - 85, 16 + 64, 13 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 1 @@ -9664,10 +9421,13 @@ NoControl - 2, 16 + 2, 13 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 0 @@ -9688,10 +9448,16 @@ 3 - 578, 278 + 434, 226 + + + 2, 2, 2, 2 + + + 2, 2, 2, 2 - 342, 65 + 256, 53 192 @@ -9709,16 +9475,19 @@ $this - 11 + 12 NoControl - 169, 56 + 127, 46 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 16 @@ -9742,10 +9511,13 @@ NoControl - 252, 92 + 189, 75 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 14 @@ -9769,10 +9541,13 @@ NoControl - 335, 92 + 251, 75 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 15 @@ -9796,10 +9571,13 @@ NoControl - 169, 92 + 127, 75 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 13 @@ -9823,10 +9601,13 @@ NoControl - 86, 92 + 64, 75 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 12 @@ -9850,10 +9631,13 @@ NoControl - 3, 92 + 2, 75 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 11 @@ -9877,10 +9661,13 @@ NoControl - 335, 56 + 251, 46 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 10 @@ -9904,10 +9691,13 @@ NoControl - 86, 56 + 64, 46 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 8 @@ -9931,10 +9721,13 @@ NoControl - 252, 56 + 189, 46 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 9 @@ -9958,10 +9751,13 @@ NoControl - 3, 56 + 2, 46 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 7 @@ -9985,10 +9781,13 @@ NoControl - 335, 20 + 251, 16 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 6 @@ -10012,10 +9811,13 @@ NoControl - 252, 20 + 189, 16 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 5 @@ -10039,10 +9841,13 @@ NoControl - 169, 20 + 127, 16 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 4 @@ -10066,10 +9871,13 @@ NoControl - 86, 20 + 64, 16 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 3 @@ -10093,10 +9901,13 @@ NoControl - 3, 20 + 2, 16 + + + 2, 2, 2, 2 - 84, 37 + 63, 30 2 @@ -10117,10 +9928,16 @@ 14 - 577, 347 + 433, 282 + + + 2, 2, 2, 2 + + + 2, 2, 2, 2 - 422, 138 + 316, 112 193 @@ -10138,16 +9955,19 @@ $this - 10 + 11 NoControl - 160, 254 + 120, 206 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 20 @@ -10171,10 +9991,13 @@ NoControl - 81, 254 + 61, 206 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 19 @@ -10198,10 +10021,13 @@ NoControl - 2, 254 + 2, 206 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 18 @@ -10225,10 +10051,13 @@ NoControl - 160, 215 + 120, 175 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 17 @@ -10252,10 +10081,13 @@ NoControl - 81, 215 + 61, 175 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 16 @@ -10279,10 +10111,13 @@ NoControl - 2, 215 + 2, 175 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 15 @@ -10306,10 +10141,13 @@ NoControl - 160, 176 + 120, 143 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 14 @@ -10333,10 +10171,13 @@ NoControl - 81, 176 + 61, 143 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 13 @@ -10360,10 +10201,13 @@ NoControl - 2, 176 + 2, 143 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 12 @@ -10387,10 +10231,13 @@ NoControl - 160, 137 + 120, 111 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 11 @@ -10414,10 +10261,13 @@ NoControl - 81, 137 + 61, 111 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 10 @@ -10441,10 +10291,13 @@ NoControl - 2, 137 + 2, 111 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 9 @@ -10468,10 +10321,13 @@ NoControl - 160, 98 + 120, 80 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 8 @@ -10495,10 +10351,13 @@ NoControl - 81, 98 + 61, 80 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 7 @@ -10522,10 +10381,13 @@ NoControl - 2, 98 + 2, 80 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 6 @@ -10549,10 +10411,13 @@ NoControl - 160, 59 + 120, 48 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 5 @@ -10576,10 +10441,13 @@ NoControl - 81, 59 + 61, 48 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 4 @@ -10603,10 +10471,13 @@ NoControl - 2, 59 + 2, 48 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 3 @@ -10630,10 +10501,13 @@ NoControl - 160, 20 + 120, 16 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 2 @@ -10657,10 +10531,13 @@ NoControl - 81, 20 + 61, 16 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 1 @@ -10684,10 +10561,13 @@ NoControl - 2, 20 + 2, 16 + + + 2, 2, 2, 2 - 80, 40 + 60, 32 0 @@ -10708,10 +10588,16 @@ 20 - 569, 75 + 427, 61 + + + 2, 2, 2, 2 + + + 2, 2, 2, 2 - 244, 301 + 183, 245 195 @@ -10729,16 +10615,13 @@ $this - 0 + 1 - 1, 315 - - - 4, 4, 4, 4 + 1, 256 - 528, 41 + 396, 33 194 @@ -10753,16 +10636,16 @@ $this - 1 + 2 - 301, 50 + 226, 41 - 3, 4, 3, 4 + 2, 3, 2, 3 - 183, 27 + 137, 22 180 @@ -10777,40 +10660,16 @@ $this - 16 - - - 157, 364 - - - 3, 4, 3, 4 - - - 357, 27 - - - 177 - - - ucrSaveResultInto - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 18 + 17 - 0, 79 + 0, 64 0, 0, 0, 0 - 280, 223 + 210, 181 173 @@ -10825,16 +10684,16 @@ $this - 20 + 19 - 93, 7 + 70, 6 - 3, 4, 3, 4 + 2, 3, 2, 3 - 521, 36 + 391, 29 120 @@ -10849,7 +10708,31 @@ $this - 21 + 20 + + + 11, 311 + + + 4, 5, 4, 5 + + + 327, 21 + + + 196 + + + ucrSaveResultInto + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 True @@ -10858,13 +10741,10 @@ 41 - 8, 16 - - - 4, 4, 4, 4 + 6, 13 - 1170, 563 + 878, 457 ttCalculator diff --git a/instat/ucrCalculator.vb b/instat/ucrCalculator.vb index d6531d78894..67ccc1e9ac1 100644 --- a/instat/ucrCalculator.vb +++ b/instat/ucrCalculator.vb @@ -983,7 +983,7 @@ Public Class ucrCalculator End If End Sub - Private Sub chkSaveResultInto_CheckedChanged(sender As Object, e As EventArgs) Handles chkSaveResultInto.CheckedChanged + Private Sub chkSaveResultInto_CheckedChanged(sender As Object, e As EventArgs) RaiseEvent SaveResultsCheckedChanged() End Sub @@ -1230,7 +1230,7 @@ Public Class ucrCalculator RaiseEvent SelectionChanged() End Sub - Private Sub ucrSaveResultInto_NameChanged() Handles ucrSaveResultInto.NameChanged + Private Sub ucrSaveResultInto_NameChanged() RaiseEvent SaveNameChanged() End Sub From 9624d7a8479e1996be9593352ffdf27be753ec79 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 3 Aug 2020 14:22:33 +0300 Subject: [PATCH 022/277] Setting the properties for the new save control --- instat/dlgCalculator.vb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 873adf49098..ff317d1f273 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -41,10 +41,10 @@ Public Class dlgCalculator Private Sub TestOKEnabled() If Not ucrCalc.ucrReceiverForCalculation.IsEmpty Then - If ucrCalc.chkSaveResultInto.Checked AndAlso ucrCalc.ucrSaveResultInto.IsEmpty Then - ucrBase.OKEnabled(False) - Else + If ucrCalc.ucrSaveResultInto.IsComplete Then ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) End If Else ucrBase.OKEnabled(False) @@ -56,7 +56,6 @@ Public Class dlgCalculator ucrCalc.ucrInputCalOptions.SetName("Basic") ucrCalc.Reset() ucrCalc.chkShowParameters.Checked = False - ucrCalc.chkSaveResultInto.Checked = True SaveResults() ucrCalc.ucrSelectorForCalculations.bUseCurrentFilter = False ucrCalc.ucrTryCalculator.SetRSyntax(ucrBase.clsRsyntax) From 3190e5c30a771ab54e7ae20ff0505a5fa11010f0 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 3 Aug 2020 14:28:32 +0300 Subject: [PATCH 023/277] Setting the properties for the save control --- instat/dlgCalculator.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index ff317d1f273..a6a652483b5 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -79,11 +79,11 @@ Public Class dlgCalculator ucrBase.clsRsyntax.AddToBeforeCodes(clsAttach) ucrBase.clsRsyntax.AddToAfterCodes(clsDetach) ucrBase.clsRsyntax.SetCommandString("") - ucrCalc.ucrSaveResultInto.SetItemsTypeAsColumns() - ucrCalc.ucrSaveResultInto.SetDefaultTypeAsColumn() + ucrCalc.ucrSaveResultInto.SetSaveTypeAsColumn() + ucrCalc.ucrSaveResultInto.SetIsTextBox() + ucrCalc.ucrSaveResultInto.SetAssignToBooleans(bTempAssignToIsPrefix:=True) ucrCalc.ucrSaveResultInto.SetDataFrameSelector(ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames) ucrCalc.ucrSelectorForCalculations.Reset() - ucrCalc.ucrSaveResultInto.SetValidationTypeAsRVariable() ucrCalc.ucrTryCalculator.StrvecOutputRequired() End Sub From 7a006c8513dbbd2830153c3a6a517fbd46c7bf93 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 3 Aug 2020 14:29:36 +0300 Subject: [PATCH 024/277] Setting the properties for the save control --- instat/dlgCalculator.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index a6a652483b5..69e6e30d103 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -81,6 +81,7 @@ Public Class dlgCalculator ucrBase.clsRsyntax.SetCommandString("") ucrCalc.ucrSaveResultInto.SetSaveTypeAsColumn() ucrCalc.ucrSaveResultInto.SetIsTextBox() + ucrCalc.ucrSaveResultInto.SetText("Save Result Into") ucrCalc.ucrSaveResultInto.SetAssignToBooleans(bTempAssignToIsPrefix:=True) ucrCalc.ucrSaveResultInto.SetDataFrameSelector(ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames) ucrCalc.ucrSelectorForCalculations.Reset() From df155f27c0fea9027d475b89a5dce4241110c8f2 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 3 Aug 2020 14:46:51 +0300 Subject: [PATCH 025/277] Setting the properties for the save control --- instat/dlgCalculator.vb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 69e6e30d103..cfd0b4722a4 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -59,6 +59,7 @@ Public Class dlgCalculator SaveResults() ucrCalc.ucrSelectorForCalculations.bUseCurrentFilter = False ucrCalc.ucrTryCalculator.SetRSyntax(ucrBase.clsRsyntax) + ucrCalc.ucrSaveResultInto.SetRCode(ucrBase.clsRsyntax.clsBaseCommandString) ucrBase.Visible = True End Sub @@ -158,19 +159,10 @@ Public Class dlgCalculator Private Sub chkSaveResultInto_CheckedChanged() Handles ucrCalc.SaveResultsCheckedChanged SaveResults() - ShowControl() End Sub Private Sub ucrSelectorForCalculations_DataframeChanged() Handles ucrCalc.DataFrameChanged ucrCalc.ucrTryCalculator.ucrInputTryMessage.SetName("") SaveResults() End Sub - - Private Sub ShowControl() - If ucrCalc.chkSaveResultInto.Checked Then - ucrCalc.ucrSaveResultInto.Visible = True - Else - ucrCalc.ucrSaveResultInto.Visible = False - End If - End Sub End Class \ No newline at end of file From ffb18eb59e74ef54f834ffca5ab8fafd39dc094e Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 3 Aug 2020 17:37:35 +0300 Subject: [PATCH 026/277] Setting the properties of the save control --- instat/dlgCalculator.vb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index cfd0b4722a4..ee6ce129f46 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -59,7 +59,6 @@ Public Class dlgCalculator SaveResults() ucrCalc.ucrSelectorForCalculations.bUseCurrentFilter = False ucrCalc.ucrTryCalculator.SetRSyntax(ucrBase.clsRsyntax) - ucrCalc.ucrSaveResultInto.SetRCode(ucrBase.clsRsyntax.clsBaseCommandString) ucrBase.Visible = True End Sub @@ -82,7 +81,7 @@ Public Class dlgCalculator ucrBase.clsRsyntax.SetCommandString("") ucrCalc.ucrSaveResultInto.SetSaveTypeAsColumn() ucrCalc.ucrSaveResultInto.SetIsTextBox() - ucrCalc.ucrSaveResultInto.SetText("Save Result Into") + ucrCalc.ucrSaveResultInto.SetLabelText("Save Result Into:") ucrCalc.ucrSaveResultInto.SetAssignToBooleans(bTempAssignToIsPrefix:=True) ucrCalc.ucrSaveResultInto.SetDataFrameSelector(ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames) ucrCalc.ucrSelectorForCalculations.Reset() @@ -95,7 +94,7 @@ Public Class dlgCalculator End Sub Private Sub SaveResults() - If ucrCalc.chkSaveResultInto.Checked Then + If ucrCalc.ucrSaveResultInto.Iscomplete Then ucrBase.clsRsyntax.SetAssignTo(ucrCalc.ucrSaveResultInto.GetText(), strTempColumn:=ucrCalc.ucrSaveResultInto.GetText(), strTempDataframe:=ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.Text) ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = True ucrBase.clsRsyntax.iCallType = 0 @@ -157,10 +156,6 @@ Public Class dlgCalculator End Select End Sub - Private Sub chkSaveResultInto_CheckedChanged() Handles ucrCalc.SaveResultsCheckedChanged - SaveResults() - End Sub - Private Sub ucrSelectorForCalculations_DataframeChanged() Handles ucrCalc.DataFrameChanged ucrCalc.ucrTryCalculator.ucrInputTryMessage.SetName("") SaveResults() From b27a40b9f036557f985e69b0b6f47b3f9f40cb59 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 3 Aug 2020 20:22:35 +0300 Subject: [PATCH 027/277] Setting Rcode for the save control --- instat/dlgCalculator.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index ee6ce129f46..0459d1da937 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -56,6 +56,7 @@ Public Class dlgCalculator ucrCalc.ucrInputCalOptions.SetName("Basic") ucrCalc.Reset() ucrCalc.chkShowParameters.Checked = False + ucrCalc.ucrSaveResultInto.SetRCode(ucrBase.clsRsyntax.clsBaseCommandString) SaveResults() ucrCalc.ucrSelectorForCalculations.bUseCurrentFilter = False ucrCalc.ucrTryCalculator.SetRSyntax(ucrBase.clsRsyntax) From 7d3603267bf68b272db7bfca21dee76e94fe270b Mon Sep 17 00:00:00 2001 From: ivanluv Date: Thu, 6 Aug 2020 16:08:54 +0300 Subject: [PATCH 028/277] design changes and minor code modification --- instat/dlgDisplayDailyData.Designer.vb | 140 ++++++++++++++----------- instat/dlgDisplayDailyData.resx | 110 +++++++++++++------ instat/dlgDisplayDailyData.vb | 12 ++- 3 files changed, 166 insertions(+), 96 deletions(-) diff --git a/instat/dlgDisplayDailyData.Designer.vb b/instat/dlgDisplayDailyData.Designer.vb index bc7e3678495..6f474f4f493 100644 --- a/instat/dlgDisplayDailyData.Designer.vb +++ b/instat/dlgDisplayDailyData.Designer.vb @@ -48,13 +48,14 @@ Partial Class dlgDisplayDailyData Me.lblDayOfTheYear = New System.Windows.Forms.Label() Me.lblYaxisUpper = New System.Windows.Forms.Label() Me.grpGraph = New System.Windows.Forms.GroupBox() + Me.ucrSaveGraph = New instat.ucrSave() + Me.ucrInputRugColour = New instat.ucrInputComboBox() Me.lblRugColor = New System.Windows.Forms.Label() + Me.ucrInputBarColour = New instat.ucrInputComboBox() Me.lblBarColour = New System.Windows.Forms.Label() + Me.ucrNudUpperYaxis = New instat.ucrNud() Me.lblElements = New System.Windows.Forms.Label() Me.grpSummary = New System.Windows.Forms.GroupBox() - Me.rdoGraphByYear = New System.Windows.Forms.RadioButton() - Me.ucrChkFreeYScales = New instat.ucrCheck() - Me.ucrReceiverMultipleElements = New instat.ucrReceiverMultiple() Me.ucrChkSumMissing = New instat.ucrCheck() Me.ucrChkMax = New instat.ucrCheck() Me.ucrChkIQR = New instat.ucrCheck() @@ -62,6 +63,9 @@ Partial Class dlgDisplayDailyData Me.ucrChkSum = New instat.ucrCheck() Me.ucrChkMin = New instat.ucrCheck() Me.ucrChkMean = New instat.ucrCheck() + Me.rdoGraphByYear = New System.Windows.Forms.RadioButton() + Me.ucrChkFreeYScales = New instat.ucrCheck() + Me.ucrReceiverMultipleElements = New instat.ucrReceiverMultiple() Me.ucrReceiverElement = New instat.ucrReceiverSingle() Me.ucrInputComboZero = New instat.ucrInputComboBox() Me.ucrInputComboMissing = New instat.ucrInputComboBox() @@ -76,11 +80,9 @@ Partial Class dlgDisplayDailyData Me.ucrPnlFrequencyDisplay = New instat.UcrPanel() Me.ucrSelectorDisplayDailyClimaticData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrSaveGraph = New instat.ucrSave() - Me.ucrInputRugColour = New instat.ucrInputComboBox() - Me.ucrInputBarColour = New instat.ucrInputComboBox() - Me.ucrNudUpperYaxis = New instat.ucrNud() Me.ucrReceiverSingleElements = New instat.ucrReceiverSingle() + Me.ucrInputFacetBy = New instat.ucrInputComboBox() + Me.lblFacetby = New System.Windows.Forms.Label() Me.grpGraph.SuspendLayout() Me.grpSummary.SuspendLayout() Me.SuspendLayout() @@ -148,16 +150,45 @@ Partial Class dlgDisplayDailyData Me.grpGraph.Name = "grpGraph" Me.grpGraph.TabStop = False ' + 'ucrSaveGraph + ' + resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") + Me.ucrSaveGraph.Name = "ucrSaveGraph" + ' + 'ucrInputRugColour + ' + Me.ucrInputRugColour.AddQuotesIfUnrecognised = True + Me.ucrInputRugColour.IsReadOnly = False + resources.ApplyResources(Me.ucrInputRugColour, "ucrInputRugColour") + Me.ucrInputRugColour.Name = "ucrInputRugColour" + ' 'lblRugColor ' resources.ApplyResources(Me.lblRugColor, "lblRugColor") Me.lblRugColor.Name = "lblRugColor" ' + 'ucrInputBarColour + ' + Me.ucrInputBarColour.AddQuotesIfUnrecognised = True + Me.ucrInputBarColour.IsReadOnly = False + resources.ApplyResources(Me.ucrInputBarColour, "ucrInputBarColour") + Me.ucrInputBarColour.Name = "ucrInputBarColour" + ' 'lblBarColour ' resources.ApplyResources(Me.lblBarColour, "lblBarColour") Me.lblBarColour.Name = "lblBarColour" ' + 'ucrNudUpperYaxis + ' + Me.ucrNudUpperYaxis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudUpperYaxis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudUpperYaxis, "ucrNudUpperYaxis") + Me.ucrNudUpperYaxis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudUpperYaxis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudUpperYaxis.Name = "ucrNudUpperYaxis" + Me.ucrNudUpperYaxis.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'lblElements ' resources.ApplyResources(Me.lblElements, "lblElements") @@ -176,31 +207,6 @@ Partial Class dlgDisplayDailyData Me.grpSummary.Name = "grpSummary" Me.grpSummary.TabStop = False ' - 'rdoGraphByYear - ' - resources.ApplyResources(Me.rdoGraphByYear, "rdoGraphByYear") - Me.rdoGraphByYear.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGraphByYear.FlatAppearance.BorderSize = 2 - Me.rdoGraphByYear.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGraphByYear.ForeColor = System.Drawing.SystemColors.ActiveCaptionText - Me.rdoGraphByYear.Name = "rdoGraphByYear" - Me.rdoGraphByYear.UseVisualStyleBackColor = True - ' - 'ucrChkFreeYScales - ' - Me.ucrChkFreeYScales.Checked = False - resources.ApplyResources(Me.ucrChkFreeYScales, "ucrChkFreeYScales") - Me.ucrChkFreeYScales.Name = "ucrChkFreeYScales" - ' - 'ucrReceiverMultipleElements - ' - Me.ucrReceiverMultipleElements.frmParent = Me - resources.ApplyResources(Me.ucrReceiverMultipleElements, "ucrReceiverMultipleElements") - Me.ucrReceiverMultipleElements.Name = "ucrReceiverMultipleElements" - Me.ucrReceiverMultipleElements.Selector = Nothing - Me.ucrReceiverMultipleElements.strNcFilePath = "" - Me.ucrReceiverMultipleElements.ucrSelector = Nothing - ' 'ucrChkSumMissing ' Me.ucrChkSumMissing.Checked = False @@ -243,6 +249,31 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.ucrChkMean, "ucrChkMean") Me.ucrChkMean.Name = "ucrChkMean" ' + 'rdoGraphByYear + ' + resources.ApplyResources(Me.rdoGraphByYear, "rdoGraphByYear") + Me.rdoGraphByYear.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraphByYear.FlatAppearance.BorderSize = 2 + Me.rdoGraphByYear.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraphByYear.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoGraphByYear.Name = "rdoGraphByYear" + Me.rdoGraphByYear.UseVisualStyleBackColor = True + ' + 'ucrChkFreeYScales + ' + Me.ucrChkFreeYScales.Checked = False + resources.ApplyResources(Me.ucrChkFreeYScales, "ucrChkFreeYScales") + Me.ucrChkFreeYScales.Name = "ucrChkFreeYScales" + ' + 'ucrReceiverMultipleElements + ' + Me.ucrReceiverMultipleElements.frmParent = Me + resources.ApplyResources(Me.ucrReceiverMultipleElements, "ucrReceiverMultipleElements") + Me.ucrReceiverMultipleElements.Name = "ucrReceiverMultipleElements" + Me.ucrReceiverMultipleElements.Selector = Nothing + Me.ucrReceiverMultipleElements.strNcFilePath = "" + Me.ucrReceiverMultipleElements.ucrSelector = Nothing + ' 'ucrReceiverElement ' Me.ucrReceiverElement.frmParent = Me @@ -345,35 +376,6 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'ucrSaveGraph - ' - resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") - Me.ucrSaveGraph.Name = "ucrSaveGraph" - ' - 'ucrInputRugColour - ' - Me.ucrInputRugColour.AddQuotesIfUnrecognised = True - Me.ucrInputRugColour.IsReadOnly = False - resources.ApplyResources(Me.ucrInputRugColour, "ucrInputRugColour") - Me.ucrInputRugColour.Name = "ucrInputRugColour" - ' - 'ucrInputBarColour - ' - Me.ucrInputBarColour.AddQuotesIfUnrecognised = True - Me.ucrInputBarColour.IsReadOnly = False - resources.ApplyResources(Me.ucrInputBarColour, "ucrInputBarColour") - Me.ucrInputBarColour.Name = "ucrInputBarColour" - ' - 'ucrNudUpperYaxis - ' - Me.ucrNudUpperYaxis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudUpperYaxis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudUpperYaxis, "ucrNudUpperYaxis") - Me.ucrNudUpperYaxis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudUpperYaxis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudUpperYaxis.Name = "ucrNudUpperYaxis" - Me.ucrNudUpperYaxis.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'ucrReceiverSingleElements ' Me.ucrReceiverSingleElements.frmParent = Me @@ -383,10 +385,24 @@ Partial Class dlgDisplayDailyData Me.ucrReceiverSingleElements.strNcFilePath = "" Me.ucrReceiverSingleElements.ucrSelector = Nothing ' + 'ucrInputFacetBy + ' + Me.ucrInputFacetBy.AddQuotesIfUnrecognised = True + Me.ucrInputFacetBy.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFacetBy, "ucrInputFacetBy") + Me.ucrInputFacetBy.Name = "ucrInputFacetBy" + ' + 'lblFacetby + ' + resources.ApplyResources(Me.lblFacetby, "lblFacetby") + Me.lblFacetby.Name = "lblFacetby" + ' 'dlgDisplayDailyData ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.lblFacetby) + Me.Controls.Add(Me.ucrInputFacetBy) Me.Controls.Add(Me.ucrChkFreeYScales) Me.Controls.Add(Me.ucrReceiverMultipleElements) Me.Controls.Add(Me.rdoGraphByYear) @@ -469,4 +485,6 @@ Partial Class dlgDisplayDailyData Friend WithEvents ucrReceiverSingleElements As ucrReceiverSingle Friend WithEvents ucrReceiverMultipleElements As ucrReceiverMultiple Friend WithEvents ucrChkFreeYScales As ucrCheck + Friend WithEvents lblFacetby As Label + Friend WithEvents ucrInputFacetBy As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.resx b/instat/dlgDisplayDailyData.resx index ace0a42013a..3c3921d56c3 100644 --- a/instat/dlgDisplayDailyData.resx +++ b/instat/dlgDisplayDailyData.resx @@ -129,7 +129,7 @@ - 54, 12 + 252, 12 100, 29 @@ -154,7 +154,7 @@ $this - 22 + 24 Button @@ -172,7 +172,7 @@ NoControl - 152, 12 + 54, 12 100, 29 @@ -196,7 +196,7 @@ $this - 23 + 25 True @@ -226,7 +226,7 @@ $this - 20 + 22 True @@ -256,7 +256,7 @@ $this - 19 + 21 True @@ -286,7 +286,7 @@ $this - 15 + 17 True @@ -316,7 +316,7 @@ $this - 14 + 16 True @@ -346,7 +346,7 @@ $this - 16 + 18 True @@ -550,7 +550,7 @@ $this - 7 + 9 True @@ -580,7 +580,7 @@ $this - 4 + 6 16, 97 @@ -751,7 +751,7 @@ $this - 3 + 5 Button @@ -769,7 +769,7 @@ NoControl - 251, 12 + 152, 12 100, 29 @@ -793,7 +793,7 @@ $this - 2 + 4 12, 237 @@ -814,7 +814,7 @@ $this - 0 + 2 True @@ -825,6 +825,54 @@ 423, 514 + + True + + + 292, 376 + + + 52, 13 + + + 32 + + + Facet By: + + + lblFacetby + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + 277, 395 + + + 137, 21 + + + 31 + + + ucrInputFacetBy + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + 289, 253 @@ -847,7 +895,7 @@ $this - 5 + 7 121, 422 @@ -868,7 +916,7 @@ $this - 6 + 8 121, 368 @@ -889,7 +937,7 @@ $this - 8 + 10 121, 395 @@ -910,7 +958,7 @@ $this - 9 + 11 12, 371 @@ -931,7 +979,7 @@ $this - 10 + 12 12, 424 @@ -952,7 +1000,7 @@ $this - 11 + 13 12, 396 @@ -973,7 +1021,7 @@ $this - 12 + 14 289, 209 @@ -997,7 +1045,7 @@ $this - 13 + 15 289, 166 @@ -1021,7 +1069,7 @@ $this - 17 + 19 289, 124 @@ -1045,7 +1093,7 @@ $this - 18 + 20 289, 80 @@ -1069,7 +1117,7 @@ $this - 21 + 23 54, 12 @@ -1093,7 +1141,7 @@ $this - 24 + 26 10, 43 @@ -1117,7 +1165,7 @@ $this - 25 + 27 10, 447 @@ -1141,7 +1189,7 @@ $this - 26 + 28 289, 253 @@ -1165,7 +1213,7 @@ $this - 27 + 29 CenterScreen @@ -1201,6 +1249,6 @@ $this - 1 + 3 \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index ecbdbb2c0a1..8a2bbb97460 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -54,6 +54,7 @@ Public Class dlgDisplayDailyData Dim dctMissingvalues As New Dictionary(Of String, String) Dim dctTracevalues As New Dictionary(Of String, String) Dim dctZeroValues As New Dictionary(Of String, String) + 'Dim dctFacetBy As New Dictionary(Of String) lstCheckboxes = New List(Of ucrCheck) ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False @@ -171,6 +172,8 @@ Public Class dlgDisplayDailyData ucrInputComboZero.SetItems(dctZeroValues) ucrInputComboZero.bAllowNonConditionValues = True + ucrInputFacetBy.SetLinkedDisplayControl(lblFacetby) + ucrSaveGraph.SetPrefix("Graph") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames) @@ -221,11 +224,11 @@ Public Class dlgDisplayDailyData clsXLabFunction.SetPackageName("ggplot2") clsXLabFunction.SetRCommand("xlab") - clsXLabFunction.AddParameter("label", Chr(34) & "" & Chr(34),, iPosition:=0, bIncludeArgumentName:=False) + clsXLabFunction.AddParameter("label", "NULL", iPosition:=0, bIncludeArgumentName:=False) clsFacetFunction.SetPackageName("ggplot2") - clsFacetFunction.SetRCommand("facet_grid") + clsFacetFunction.SetRCommand("facet_wrap") clsFacetFunction.AddParameter("scales", Chr(34) & "free_y" & Chr(34), iPosition:=0) clsNAFilterOperator.SetOperation("%>%") @@ -236,7 +239,7 @@ Public Class dlgDisplayDailyData ucrSelectorDisplayDailyClimaticData.Reset() - ucrReceiverElement.SetMeAsReceiver() + ucrReceiverMultipleElements.SetMeAsReceiver() clsIdVarsFunction.SetRCommand("c") clsGGplotFunction.SetPackageName("ggplot2") @@ -293,7 +296,7 @@ Public Class dlgDisplayDailyData clsDisplayDailyGraphOperator.AddParameter("daily_graph", clsRFunctionParameter:=clsDisplayDailyGraphFunction) clsDisplayDailyTableOperator.AddParameter("daily_table", clsRFunctionParameter:=clsDisplayDailyTable) - ucrBase.clsRsyntax.SetBaseROperator(clsDisplayDailyTableOperator) + ucrBase.clsRsyntax.SetBaseROperator(clsGgPlotOperator) For Each ctrTemp As ucrCheck In lstCheckboxes ctrTemp.SetParameterIncludeArgumentName(False) @@ -382,6 +385,7 @@ Public Class dlgDisplayDailyData Else ucrSelectorDisplayDailyClimaticData.SetParameterIsString() If rdoGraphByYear.Checked Then + ucrReceiverElement.SetMeAsReceiver() ucrBase.clsRsyntax.iCallType = 3 ucrBase.clsRsyntax.SetBaseROperator(clsDisplayDailyGraphOperator) Else From f8e9db390f618f0bb775341c406e2dbaa4a17b1a Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 11:15:42 +0300 Subject: [PATCH 029/277] Update instat/ucrSelector.vb lstOrderedReceivers comment Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/ucrSelector.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index c2599497ea9..a3ca67e2650 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -43,8 +43,10 @@ Public Class ucrSelector Protected bSilentDataFrameChange As Boolean = False - 'this list is used to hold a list of receivers listening to this selector. - 'the receivers are ordered by tab index and are used in autoswitching receiver after selection change + ''' The list of receivers listening to this selector. + ''' The receivers are ordered by tab index. This list is used to automatically switch + ''' focus to the next receiver whenever this selector changes selection. + ''' Private lstOrderedReceivers As New List(Of ucrReceiver) Public Sub New() From bceb1e7b4d475894988d5cf96a24334a0f1bd4bf Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 11:48:47 +0300 Subject: [PATCH 030/277] Update instat/ucrSelector.vb selector comment suggestion Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/ucrSelector.vb | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index a3ca67e2650..e568538e8f4 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -454,21 +454,23 @@ Public Class ucrSelector ''' - ''' Adds passed receiver to the end of the receivers list - ''' The receiver is only added if it does not exist in the list + ''' if is not yet in the list of receivers listening to + ''' this selector, then inserts the receiver into the list. This list is ordered by tab index. + ''' If is already in the list then the receiver is not inserted. ''' - ''' + ''' The receiver to insert into the list. Public Overridable Sub AddReceiver(ucrNewReceiver As ucrReceiver) - AddReceiver({ucrNewReceiver}) + AddReceivers({ucrNewReceiver}) End Sub ''' - ''' Adds passed enumerable of receivers to the end of the receivers list - ''' The receiver is only added if it does not exist in the list - + ''' For each reciever in , if the receiver is not yet in + ''' the list of receivers listening to this selector, then inserts the receiver into the list. + ''' This list is ordered by tab index. + ''' If the receiver is already in the list then the receiver is not inserted. ''' - ''' - Public Overridable Sub AddReceiver(ucrNewReceivers As IEnumerable(Of ucrReceiver)) + ''' The receivers to insert into the list. + Public Overridable Sub AddReceivers(ucrNewReceivers As IEnumerable(Of ucrReceiver)) 'add the receiver to the list if it's not already added For Each ucr As ucrReceiver In ucrNewReceivers If Not lstOrderedReceivers.Contains(ucr) Then From 18d0a119bd4e354e72e1a290b6594378336e34f3 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 12:14:30 +0300 Subject: [PATCH 031/277] Update instat/ucrSelector.vb slector comments Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/ucrSelector.vb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index e568538e8f4..b4c4d1e82f6 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -492,9 +492,12 @@ Public Class ucrSelector End Function ''' - ''' changes the focus of the next receiver from passed receiver and sets it as the 'current receiver' of the selector + ''' This subroutine is used to automatically switch focus to the next receiver whenever this + ''' selector changes selection. + ''' This subroutine sets the current receiver to be the next visible/enabled receiver in the + ''' list of receivers listening to this selector. This list is ordered by tab index. ''' - ''' + ''' The receiver that has the current focus. Private Sub AutoSwitchCurrentReceiver(FromSelectedReceiver As ucrReceiver) Dim ucrNewCurrentReceiver As ucrReceiver For i As Integer = 0 To lstOrderedReceivers.Count - 2 From 5067bec5d5a0e5f30deca1267cce2fe872e09e94 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 12:16:05 +0300 Subject: [PATCH 032/277] single receiver code addition --- instat/ucrReceiverSingle.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/ucrReceiverSingle.vb b/instat/ucrReceiverSingle.vb index 0d0ff7b1a20..7492746ae4f 100644 --- a/instat/ucrReceiverSingle.vb +++ b/instat/ucrReceiverSingle.vb @@ -333,6 +333,8 @@ Public Class ucrReceiverSingle If Selector IsNot Nothing AndAlso Selector.CurrentReceiver IsNot Nothing AndAlso Not Selector.CurrentReceiver.Equals(Me) Then RemoveColor() End If + 'by default multiple receivers will be autoswitched on selection change + bAutoSwitchFromReceiver = True End If End Sub From c278a8e96ce72fb22312083fb82dc8bccbd5a48b Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 14:57:43 +0300 Subject: [PATCH 033/277] Fixed bug and tooltips temporary place holders changes --- instat/dlgEnter.vb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/instat/dlgEnter.vb b/instat/dlgEnter.vb index ebed417e85b..d24c064defa 100644 --- a/instat/dlgEnter.vb +++ b/instat/dlgEnter.vb @@ -305,20 +305,21 @@ Public Class dlgEnter 'add rows of sample commands lstView.Items.Add(New ListViewItem({"seq(9 )"})) - lstView.Items.Item(0).ToolTipText = "todo. sensible tooltip here." + lstView.Items.Item(0).ToolTipText = "seq(9 )" 'todo. sensible tooltip here. lstView.Items.Add(New ListViewItem({"LETTERS"})) - lstView.Items.Item(1).ToolTipText = "todo. sensible tooltip here." + lstView.Items.Item(1).ToolTipText = "LETTERS" 'todo. sensible tooltip here. lstView.Items.Add(New ListViewItem({"month.name"})) - lstView.Items.Item(2).ToolTipText = "todo. sensible tooltip here" + lstView.Items.Item(2).ToolTipText = "month.name" 'todo. sensible tooltip here. lstView.Items.Add(New ListViewItem({"month.abb"})) - lstView.Items.Item(2).ToolTipText = "todo. sensible tooltip here" + lstView.Items.Item(2).ToolTipText = "month.abb" 'todo. sensible tooltip here. AddHandler lstView.DoubleClick, Sub() - If lstView.SelectedItems.Count > 1 Then + If lstView.SelectedItems.Count > 0 Then + ucrReceiverForEnterCalculation.Clear() ucrReceiverForEnterCalculation.AddToReceiverAtCursorPosition(lstView.SelectedItems.Item(0).SubItems(0).Text) objPopup.Hide() End If From f208a9c7b47068f81bb5a72c78304e6e26866538 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 14:58:08 +0300 Subject: [PATCH 034/277] index change --- instat/dlgEnter.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgEnter.vb b/instat/dlgEnter.vb index d24c064defa..87cbdf59609 100644 --- a/instat/dlgEnter.vb +++ b/instat/dlgEnter.vb @@ -314,7 +314,7 @@ Public Class dlgEnter lstView.Items.Item(2).ToolTipText = "month.name" 'todo. sensible tooltip here. lstView.Items.Add(New ListViewItem({"month.abb"})) - lstView.Items.Item(2).ToolTipText = "month.abb" 'todo. sensible tooltip here. + lstView.Items.Item(3).ToolTipText = "month.abb" 'todo. sensible tooltip here. AddHandler lstView.DoubleClick, Sub() From fcfdd0be1c802047c1cc03372e8a6576753c2cbb Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 15:59:29 +0300 Subject: [PATCH 035/277] added code for adjustment of csv group box location --- instat/dlgImportDataset.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index 67bd879302e..b9a703483cb 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -580,11 +580,13 @@ Public Class dlgImportDataset ucrBase.clsRsyntax.SetBaseRFunction(clsImportCSV) ucrPanelFixedWidthText.Show() grpCSV.Text = "Import Text Options" + grpCSV.Location = New System.Drawing.Point(9, 99) 'set the location of the groupbox to adjust gaps in the form UI grpCSV.Show() ElseIf strFileExt = ".csv" Then strFileType = "CSV" ucrBase.clsRsyntax.SetBaseRFunction(clsImportCSV) grpCSV.Text = "Import CSV Options" + grpCSV.Location = New System.Drawing.Point(9, 50) 'set the location of the groupbox to adjust gaps in the form UI grpCSV.Show() ElseIf strFileExt = ".dat" Then strFileType = "DAT" From 0c80c665bc31d6027f5188e81b3a051376930cef Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 16:45:25 +0300 Subject: [PATCH 036/277] Data label designer change --- instat/dlgEnter.Designer.vb | 1 + instat/dlgEnter.resx | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/instat/dlgEnter.Designer.vb b/instat/dlgEnter.Designer.vb index f8638d9e5cf..b53adcc9b15 100644 --- a/instat/dlgEnter.Designer.vb +++ b/instat/dlgEnter.Designer.vb @@ -322,6 +322,7 @@ Partial Class dlgEnter 'ucrSaveEnterResultInto ' Me.ucrSaveEnterResultInto.AddQuotesIfUnrecognised = True + Me.ucrSaveEnterResultInto.GetSetSelectedIndex = -1 Me.ucrSaveEnterResultInto.IsReadOnly = False resources.ApplyResources(Me.ucrSaveEnterResultInto, "ucrSaveEnterResultInto") Me.ucrSaveEnterResultInto.Name = "ucrSaveEnterResultInto" diff --git a/instat/dlgEnter.resx b/instat/dlgEnter.resx index 86efc237b7a..84b9e7b94f5 100644 --- a/instat/dlgEnter.resx +++ b/instat/dlgEnter.resx @@ -150,20 +150,20 @@ True - 11, 26 + 10, 25 2, 0, 2, 0 - 30, 13 + 33, 13 152 - Data + Data: lblData @@ -1188,9 +1188,6 @@ 10 - - NoControl - CenterScreen From 1c10b48711b641f761819b4955b2a1c7a7c8fee0 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 7 Aug 2020 17:02:19 +0300 Subject: [PATCH 037/277] designer changes --- instat/dlgEnter.Designer.vb | 1 - instat/dlgEnter.resx | 30 +++++++++++++++--------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/instat/dlgEnter.Designer.vb b/instat/dlgEnter.Designer.vb index b53adcc9b15..f8638d9e5cf 100644 --- a/instat/dlgEnter.Designer.vb +++ b/instat/dlgEnter.Designer.vb @@ -322,7 +322,6 @@ Partial Class dlgEnter 'ucrSaveEnterResultInto ' Me.ucrSaveEnterResultInto.AddQuotesIfUnrecognised = True - Me.ucrSaveEnterResultInto.GetSetSelectedIndex = -1 Me.ucrSaveEnterResultInto.IsReadOnly = False resources.ApplyResources(Me.ucrSaveEnterResultInto, "ucrSaveEnterResultInto") Me.ucrSaveEnterResultInto.Name = "ucrSaveEnterResultInto" diff --git a/instat/dlgEnter.resx b/instat/dlgEnter.resx index 84b9e7b94f5..0e9f98a7ce9 100644 --- a/instat/dlgEnter.resx +++ b/instat/dlgEnter.resx @@ -123,7 +123,7 @@ - 371, 23 + 371, 18 106, 17 @@ -150,7 +150,7 @@ True - 10, 25 + 10, 20 @@ -178,19 +178,19 @@ 8 - 11, 259 + 11, 248 2, 3, 2, 3 - 174, 17 + 110, 17 157 - Save Result into + Save Result Into: chkSaveEnterResultInto @@ -616,7 +616,7 @@ 0 - 163, 58 + 163, 48 2, 3, 2, 3 @@ -1033,7 +1033,7 @@ 0 - 364, 58 + 364, 48 2, 3, 2, 3 @@ -1060,13 +1060,13 @@ 2 - 195, 254 + 124, 244 2, 3, 2, 3 - 288, 22 + 266, 22 158 @@ -1084,7 +1084,7 @@ 3 - 11, 65 + 11, 55 0, 0, 0, 0 @@ -1114,13 +1114,13 @@ 6, 13 - 573, 346 + 573, 336 NoControl - 301, 21 + 301, 16 2, 2, 2, 2 @@ -1147,7 +1147,7 @@ 0 - 3, 215 + 3, 202 480, 33 @@ -1168,7 +1168,7 @@ 1 - 11, 286 + 11, 278 452, 52 @@ -1201,7 +1201,7 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 44, 21 + 44, 16 2, 3, 2, 3 From 9d6f97bf6362239a1ec35bcaa37b899cb1c8f021 Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Sat, 8 Aug 2020 08:07:26 +0200 Subject: [PATCH 038/277] Update instat/ucrSelector.vb --- instat/ucrSelector.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/ucrSelector.vb b/instat/ucrSelector.vb index b4c4d1e82f6..6ba24d41e2f 100644 --- a/instat/ucrSelector.vb +++ b/instat/ucrSelector.vb @@ -504,7 +504,6 @@ Public Class ucrSelector If lstOrderedReceivers.Item(i) Is FromSelectedReceiver Then ucrNewCurrentReceiver = lstOrderedReceivers.Item(i + 1) If ucrNewCurrentReceiver.Visible AndAlso ucrNewCurrentReceiver.Enabled Then - ucrNewCurrentReceiver.Focus() 'sets current focus enabling correct tab navigation SetCurrentReceiver(ucrNewCurrentReceiver) Else From 1ca56e02fed32589fcfc7d3ddaccc57877b4378d Mon Sep 17 00:00:00 2001 From: patowhiz Date: Mon, 10 Aug 2020 10:13:48 +0300 Subject: [PATCH 039/277] Update instat/ucrVariablesAsFactor.vb comment addition Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/ucrVariablesAsFactor.vb | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/instat/ucrVariablesAsFactor.vb b/instat/ucrVariablesAsFactor.vb index 63090193b14..31f1cec261a 100644 --- a/instat/ucrVariablesAsFactor.vb +++ b/instat/ucrVariablesAsFactor.vb @@ -295,11 +295,16 @@ Public Class ucrVariablesAsFactor Return MyBase.Selector End Get Set(ucrNewSelector As ucrSelector) - 'this by default adds the parent receiver to the list of receivers in the selector + 'This line automatically adds ucrVariablesAsFactor (Me) as the receiver of ucrNewSelector. + 'This is undesirable because ucrVariablesAsFactor is a receiver that has two receivers + '(its child controls) which it uses to manipulate data. MyBase.Selector = ucrNewSelector - 'we remove it here because the selector will manipulate the children receivers only - 'todo. Currently the selector only uses the list of receiver to manipulate the focus switching, - 'in future the usage of the receivers could change which may require this implementation to be changed + 'Therefore remove ucrVariablesAsFactor (Me) and leave only it's child controls in the + 'list of receivers used for autoswitching. + ' + 'TODO Currently the selector only uses the list of receivers to manipulate the focus + 'switching. In future the usage of the receivers could change which may require this + 'implementation to be changed If MyBase.Selector IsNot Nothing Then MyBase.Selector.RemoveReceiver(Me) End If @@ -333,4 +338,4 @@ Public Class ucrVariablesAsFactor ucrSingleVariable.SetSelectorHeading(strNewHeading) ucrMultipleVariables.SetSelectorHeading(strNewHeading) End Sub -End Class \ No newline at end of file +End Class From 095813c91bc2e5262a0ec35a583af0664ce330e0 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 10 Aug 2020 16:27:40 +0300 Subject: [PATCH 040/277] Code additions --- instat/dlgDisplayDailyData.Designer.vb | 103 ++++++--- instat/dlgDisplayDailyData.resx | 305 ++++++++++++++++++------- instat/dlgDisplayDailyData.vb | 94 +++++--- 3 files changed, 356 insertions(+), 146 deletions(-) diff --git a/instat/dlgDisplayDailyData.Designer.vb b/instat/dlgDisplayDailyData.Designer.vb index 6f474f4f493..c1461406448 100644 --- a/instat/dlgDisplayDailyData.Designer.vb +++ b/instat/dlgDisplayDailyData.Designer.vb @@ -63,8 +63,15 @@ Partial Class dlgDisplayDailyData Me.ucrChkSum = New instat.ucrCheck() Me.ucrChkMin = New instat.ucrCheck() Me.ucrChkMean = New instat.ucrCheck() + Me.grpFacet = New System.Windows.Forms.GroupBox() + Me.lblScales = New System.Windows.Forms.Label() + Me.ucrInputScale = New instat.ucrInputComboBox() + Me.lblFacetby = New System.Windows.Forms.Label() + Me.ucrNudNumberOfColumns = New instat.ucrNud() + Me.ucrInputFacetBy = New instat.ucrInputComboBox() + Me.lblNumberOfColumns = New System.Windows.Forms.Label() + Me.ucrChkNumberOfColumns = New instat.ucrCheck() Me.rdoGraphByYear = New System.Windows.Forms.RadioButton() - Me.ucrChkFreeYScales = New instat.ucrCheck() Me.ucrReceiverMultipleElements = New instat.ucrReceiverMultiple() Me.ucrReceiverElement = New instat.ucrReceiverSingle() Me.ucrInputComboZero = New instat.ucrInputComboBox() @@ -81,10 +88,9 @@ Partial Class dlgDisplayDailyData Me.ucrSelectorDisplayDailyClimaticData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrReceiverSingleElements = New instat.ucrReceiverSingle() - Me.ucrInputFacetBy = New instat.ucrInputComboBox() - Me.lblFacetby = New System.Windows.Forms.Label() Me.grpGraph.SuspendLayout() Me.grpSummary.SuspendLayout() + Me.grpFacet.SuspendLayout() Me.SuspendLayout() ' 'rdoTable @@ -249,6 +255,64 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.ucrChkMean, "ucrChkMean") Me.ucrChkMean.Name = "ucrChkMean" ' + 'grpFacet + ' + Me.grpFacet.Controls.Add(Me.lblScales) + Me.grpFacet.Controls.Add(Me.ucrInputScale) + Me.grpFacet.Controls.Add(Me.lblFacetby) + Me.grpFacet.Controls.Add(Me.ucrNudNumberOfColumns) + Me.grpFacet.Controls.Add(Me.ucrInputFacetBy) + Me.grpFacet.Controls.Add(Me.lblNumberOfColumns) + Me.grpFacet.Controls.Add(Me.ucrChkNumberOfColumns) + resources.ApplyResources(Me.grpFacet, "grpFacet") + Me.grpFacet.Name = "grpFacet" + Me.grpFacet.TabStop = False + ' + 'lblScales + ' + resources.ApplyResources(Me.lblScales, "lblScales") + Me.lblScales.Name = "lblScales" + ' + 'ucrInputScale + ' + Me.ucrInputScale.AddQuotesIfUnrecognised = True + Me.ucrInputScale.IsReadOnly = False + resources.ApplyResources(Me.ucrInputScale, "ucrInputScale") + Me.ucrInputScale.Name = "ucrInputScale" + ' + 'lblFacetby + ' + resources.ApplyResources(Me.lblFacetby, "lblFacetby") + Me.lblFacetby.Name = "lblFacetby" + ' + 'ucrNudNumberOfColumns + ' + Me.ucrNudNumberOfColumns.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumberOfColumns.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudNumberOfColumns, "ucrNudNumberOfColumns") + Me.ucrNudNumberOfColumns.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudNumberOfColumns.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumberOfColumns.Name = "ucrNudNumberOfColumns" + Me.ucrNudNumberOfColumns.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputFacetBy + ' + Me.ucrInputFacetBy.AddQuotesIfUnrecognised = True + Me.ucrInputFacetBy.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFacetBy, "ucrInputFacetBy") + Me.ucrInputFacetBy.Name = "ucrInputFacetBy" + ' + 'lblNumberOfColumns + ' + resources.ApplyResources(Me.lblNumberOfColumns, "lblNumberOfColumns") + Me.lblNumberOfColumns.Name = "lblNumberOfColumns" + ' + 'ucrChkNumberOfColumns + ' + Me.ucrChkNumberOfColumns.Checked = False + resources.ApplyResources(Me.ucrChkNumberOfColumns, "ucrChkNumberOfColumns") + Me.ucrChkNumberOfColumns.Name = "ucrChkNumberOfColumns" + ' 'rdoGraphByYear ' resources.ApplyResources(Me.rdoGraphByYear, "rdoGraphByYear") @@ -259,12 +323,6 @@ Partial Class dlgDisplayDailyData Me.rdoGraphByYear.Name = "rdoGraphByYear" Me.rdoGraphByYear.UseVisualStyleBackColor = True ' - 'ucrChkFreeYScales - ' - Me.ucrChkFreeYScales.Checked = False - resources.ApplyResources(Me.ucrChkFreeYScales, "ucrChkFreeYScales") - Me.ucrChkFreeYScales.Name = "ucrChkFreeYScales" - ' 'ucrReceiverMultipleElements ' Me.ucrReceiverMultipleElements.frmParent = Me @@ -385,32 +443,18 @@ Partial Class dlgDisplayDailyData Me.ucrReceiverSingleElements.strNcFilePath = "" Me.ucrReceiverSingleElements.ucrSelector = Nothing ' - 'ucrInputFacetBy - ' - Me.ucrInputFacetBy.AddQuotesIfUnrecognised = True - Me.ucrInputFacetBy.IsReadOnly = False - resources.ApplyResources(Me.ucrInputFacetBy, "ucrInputFacetBy") - Me.ucrInputFacetBy.Name = "ucrInputFacetBy" - ' - 'lblFacetby - ' - resources.ApplyResources(Me.lblFacetby, "lblFacetby") - Me.lblFacetby.Name = "lblFacetby" - ' 'dlgDisplayDailyData ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.lblFacetby) - Me.Controls.Add(Me.ucrInputFacetBy) - Me.Controls.Add(Me.ucrChkFreeYScales) + Me.Controls.Add(Me.grpSummary) Me.Controls.Add(Me.ucrReceiverMultipleElements) Me.Controls.Add(Me.rdoGraphByYear) - Me.Controls.Add(Me.grpSummary) Me.Controls.Add(Me.lblElements) Me.Controls.Add(Me.ucrReceiverElement) Me.Controls.Add(Me.ucrInputComboZero) Me.Controls.Add(Me.grpGraph) + Me.Controls.Add(Me.grpFacet) Me.Controls.Add(Me.ucrInputComboMissing) Me.Controls.Add(Me.ucrInputComboTrace) Me.Controls.Add(Me.ucrChkMissing) @@ -438,6 +482,8 @@ Partial Class dlgDisplayDailyData Me.grpGraph.ResumeLayout(False) Me.grpGraph.PerformLayout() Me.grpSummary.ResumeLayout(False) + Me.grpFacet.ResumeLayout(False) + Me.grpFacet.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -484,7 +530,12 @@ Partial Class dlgDisplayDailyData Friend WithEvents rdoGraphByYear As RadioButton Friend WithEvents ucrReceiverSingleElements As ucrReceiverSingle Friend WithEvents ucrReceiverMultipleElements As ucrReceiverMultiple - Friend WithEvents ucrChkFreeYScales As ucrCheck Friend WithEvents lblFacetby As Label Friend WithEvents ucrInputFacetBy As ucrInputComboBox + Friend WithEvents ucrChkNumberOfColumns As ucrCheck + Friend WithEvents ucrNudNumberOfColumns As ucrNud + Friend WithEvents lblNumberOfColumns As Label + Friend WithEvents grpFacet As GroupBox + Friend WithEvents lblScales As Label + Friend WithEvents ucrInputScale As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.resx b/instat/dlgDisplayDailyData.resx index 3c3921d56c3..acf2f4a21e8 100644 --- a/instat/dlgDisplayDailyData.resx +++ b/instat/dlgDisplayDailyData.resx @@ -154,7 +154,7 @@ $this - 24 + 22 Button @@ -196,7 +196,7 @@ $this - 25 + 23 True @@ -226,7 +226,7 @@ $this - 22 + 20 True @@ -256,7 +256,7 @@ $this - 21 + 19 True @@ -286,7 +286,7 @@ $this - 17 + 15 True @@ -316,7 +316,7 @@ $this - 16 + 14 True @@ -346,7 +346,7 @@ $this - 18 + 16 True @@ -550,7 +550,7 @@ $this - 9 + 6 True @@ -580,7 +580,7 @@ $this - 6 + 3 16, 97 @@ -730,7 +730,7 @@ 6 - 10, 233 + 13, 233 235, 133 @@ -751,85 +751,67 @@ $this - 5 - - - Button - - - None - - - MiddleCenter + 0 - - Flat + + True - + NoControl - - 152, 12 - - - 100, 29 - - - 23 + + 6, 16 - - Graph by Year + + 37, 13 - - MiddleCenter + + 36 - - rdoGraphByYear - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Scale: - - $this + + lblScales - - 4 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 12, 237 + + grpFacet - - 100, 20 + + 0 - - 30 + + 62, 12 - - ucrChkFreeYScales + + 105, 21 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 35 - - $this + + ucrInputScale - - 2 + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - True - - - 6, 13 + + grpFacet - - 423, 514 + + 1 True + + NoControl + - 292, 376 + 5, 39 52, 13 @@ -847,16 +829,37 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + grpFacet - 0 + 2 + + + 113, 86 + + + 50, 23 + + + 33 + + + ucrNudNumberOfColumns + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + + 3 - 277, 395 + 62, 37 - 137, 21 + 105, 21 31 @@ -868,10 +871,136 @@ instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - $this + grpFacet - 1 + 4 + + + True + + + NoControl + + + 3, 87 + + + 104, 13 + + + 33 + + + Number Of Columns: + + + lblNumberOfColumns + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFacet + + + 5 + + + 7, 64 + + + 175, 20 + + + 33 + + + ucrChkNumberOfColumns + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + + 6 + + + 7, 228 + + + 188, 132 + + + 34 + + + Facet + + + grpFacet + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 + + + Button + + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 152, 12 + + + 100, 29 + + + 23 + + + Graph by Year + + + MiddleCenter + + + rdoGraphByYear + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + 6, 13 + + + 423, 514 289, 253 @@ -895,7 +1024,7 @@ $this - 7 + 4 121, 422 @@ -916,7 +1045,7 @@ $this - 8 + 5 121, 368 @@ -937,7 +1066,7 @@ $this - 10 + 8 121, 395 @@ -958,7 +1087,7 @@ $this - 11 + 9 12, 371 @@ -979,7 +1108,7 @@ $this - 12 + 10 12, 424 @@ -1000,7 +1129,7 @@ $this - 13 + 11 12, 396 @@ -1021,7 +1150,7 @@ $this - 14 + 12 289, 209 @@ -1045,7 +1174,7 @@ $this - 15 + 13 289, 166 @@ -1069,7 +1198,7 @@ $this - 19 + 17 289, 124 @@ -1093,7 +1222,7 @@ $this - 20 + 18 289, 80 @@ -1117,7 +1246,7 @@ $this - 23 + 21 54, 12 @@ -1141,7 +1270,7 @@ $this - 26 + 24 10, 43 @@ -1165,7 +1294,7 @@ $this - 27 + 25 10, 447 @@ -1189,7 +1318,7 @@ $this - 28 + 26 289, 253 @@ -1213,7 +1342,7 @@ $this - 29 + 27 CenterScreen @@ -1249,6 +1378,6 @@ $this - 3 + 1 \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 8a2bbb97460..0376beac7cc 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -26,7 +26,7 @@ Public Class dlgDisplayDailyData Private clsGGplotFunction, clsGeomLineFunction, clsGeomRugFunction, clsThemeFunction, clsThemeGreyFunction As New RFunction Private clsIdVarsFunction, clsFacetFunction, clsGgplotAesFunction, clsGGplotElementText, clsXLabFunction As New RFunction Private clsGgPlotOperator, clsDisplayDailyGraphOperator, clsDisplayDailyTableOperator, clsNAFilterOperator As New ROperator - Private clsFacetOperator As New ROperator + Private clsStationElementFacetOperator, clsElementStationFacetOperator, clsStationFacetOperator, clsElementFacetOperator As New ROperator Private Sub dlgDisplayDailyData_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -54,7 +54,7 @@ Public Class dlgDisplayDailyData Dim dctMissingvalues As New Dictionary(Of String, String) Dim dctTracevalues As New Dictionary(Of String, String) Dim dctZeroValues As New Dictionary(Of String, String) - 'Dim dctFacetBy As New Dictionary(Of String) + Dim dctScale As New Dictionary(Of String, String) lstCheckboxes = New List(Of ucrCheck) ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False @@ -137,8 +137,19 @@ Public Class dlgDisplayDailyData ucrChkSumMissing.SetParameter(New RParameter("summary_count_missing", 6), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkSumMissing.SetText("N Missing") - ucrChkFreeYScales.SetParameter(New RParameter("scales", 2), bNewChangeParameterValue:=False) - ucrChkFreeYScales.SetText("Free y Scale") + ucrChkNumberOfColumns.SetParameter(New RParameter("ncol", 1), bNewChangeParameterValue:=False) + ucrChkNumberOfColumns.SetText("Number of Columns") + ucrChkNumberOfColumns.AddToLinkedControls(ucrNudNumberOfColumns, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrNudNumberOfColumns.SetLinkedDisplayControl(lblNumberOfColumns) + ucrNudNumberOfColumns.SetParameter(New RParameter("ncol", 1)) + ucrNudNumberOfColumns.SetMinMax(1, Integer.MaxValue) + + ucrInputScale.SetParameter(New RParameter("scales", 2)) + dctScale.Add("Free_y", Chr(34) & "free_y" & Chr(34)) + dctScale.Add("Free_x", Chr(34) & "free_x" & Chr(34)) + ucrInputScale.SetItems(dctScale) + ucrInputScale.SetLinkedDisplayControl(lblScales) + lstCheckboxes.AddRange({ucrChkSum, ucrChkMax, ucrChkMin, ucrChkMean, ucrChkMedian, ucrChkIQR, ucrChkSumMissing}) @@ -173,6 +184,7 @@ Public Class dlgDisplayDailyData ucrInputComboZero.bAllowNonConditionValues = True ucrInputFacetBy.SetLinkedDisplayControl(lblFacetby) + ucrInputFacetBy.SetItems({"Station-Element", "Element-Station", "Station", "Element"}) ucrSaveGraph.SetPrefix("Graph") ucrSaveGraph.SetSaveTypeAsGraph() @@ -188,12 +200,13 @@ Public Class dlgDisplayDailyData ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoGraphByYear, "daily_graph") ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoTable, "daily_table") ucrPnlFrequencyDisplay.AddToLinkedControls(ucrNudUpperYaxis, {rdoGraphByYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=100) - ucrPnlFrequencyDisplay.AddToLinkedControls({ucrReceiverMultipleElements, ucrChkFreeYScales}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencyDisplay.AddToLinkedControls({ucrReceiverMultipleElements, ucrInputScale, ucrChkNumberOfColumns}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboMissing, ucrChkMissing}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboTrace, ucrChkTrace}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboZero, ucrChkZero}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls(ucrChkSum, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkSum.SetLinkedDisplayControl(grpSummary) + ucrInputScale.SetLinkedDisplayControl(grpFacet) ucrChkMissing.AddToLinkedControls({ucrInputComboMissing}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkTrace.AddToLinkedControls({ucrInputComboTrace}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="tr") @@ -220,7 +233,29 @@ Public Class dlgDisplayDailyData clsNAFilterOperator = New ROperator clsFacetFunction = New RFunction clsXLabFunction = New RFunction - clsFacetOperator = New ROperator + clsStationFacetOperator = New ROperator + clsElementStationFacetOperator = New ROperator + clsStationElementFacetOperator = New ROperator + clsElementFacetOperator = New ROperator + + ucrInputFacetBy.SetText("Station-Element") + + clsElementFacetOperator.SetOperation("~") + clsElementFacetOperator.AddParameter("first", "", iPosition:=0) + clsElementFacetOperator.AddParameter("variable", "variable", bIncludeArgumentName:=False, iPosition:=1) + + clsStationFacetOperator.SetOperation("~") + clsStationFacetOperator.AddParameter("First", "", iPosition:=0) + clsStationFacetOperator.bBrackets = False + + clsElementStationFacetOperator.SetOperation("~") + clsElementStationFacetOperator.AddParameter("variable", "variable", iPosition:=0) + clsElementStationFacetOperator.bBrackets = False + + clsStationElementFacetOperator.SetOperation("~") + clsStationElementFacetOperator.AddParameter("variable", "variable", iPosition:=1) + clsStationElementFacetOperator.bBrackets = False + clsXLabFunction.SetPackageName("ggplot2") clsXLabFunction.SetRCommand("xlab") @@ -230,6 +265,7 @@ Public Class dlgDisplayDailyData clsFacetFunction.SetPackageName("ggplot2") clsFacetFunction.SetRCommand("facet_wrap") clsFacetFunction.AddParameter("scales", Chr(34) & "free_y" & Chr(34), iPosition:=0) + clsFacetFunction.AddParameter("ncol", "1", iPosition:=1) clsNAFilterOperator.SetOperation("%>%") clsNAFilterOperator.AddParameter("filter", "filter(is.na(value))", iPosition:=1) @@ -254,9 +290,6 @@ Public Class dlgDisplayDailyData clsGeomLineFunction.SetPackageName("ggplot2") clsGeomLineFunction.SetRCommand("geom_line") - clsFacetOperator.SetOperation("~") - clsFacetOperator.AddParameter("variable", "variable", bIncludeArgumentName:=False, iPosition:=0) - clsGeomRugFunction.SetPackageName("ggplot2") clsGeomRugFunction.SetRCommand("geom_rug") clsGeomRugFunction.AddParameter("data", clsROperatorParameter:=clsNAFilterOperator, iPosition:=0) @@ -343,7 +376,9 @@ Public Class dlgDisplayDailyData ucrReceiverElement.AddAdditionalCodeParameterPair(clsDisplayDailyGraphFunction, New RParameter("climatic_element", 1), iAdditionalPairNo:=1) ucrSaveGraph.SetRCode(clsDisplayDailyGraphFunction, bReset) ucrPnlFrequencyDisplay.SetRCode(ucrBase.clsRsyntax.clsBaseOperator, bReset) - ucrChkFreeYScales.SetRCode(clsFacetFunction, bReset) + ucrInputScale.SetRCode(clsFacetFunction, bReset) + ucrChkNumberOfColumns.SetRCode(clsFacetFunction, bReset) + ucrNudNumberOfColumns.SetRCode(clsFacetFunction, bReset) End Sub Private Sub TestOkEnabled() @@ -395,13 +430,11 @@ Public Class dlgDisplayDailyData End If End If StackingFunction() - FacetControl() End Sub Private Sub ucrSelectorDisplayDailyClimaticData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDisplayDailyClimaticData.ControlValueChanged clsDisplayDailyGraphFunction.AddParameter("data_name", Chr(34) & ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.strCurrDataFrame & Chr(34), iPosition:=0) StackingFunction() - FacetControl() End Sub '''-------------------------------------------------------------------------------------------- ''' @@ -425,26 +458,6 @@ Public Class dlgDisplayDailyData End If End Sub - '''-------------------------------------------------------------------------------------------- - ''' - ''' If the Graph radio button is checked, adds the rows, facets and space parameters to the - ''' facet function. - ''' If the radio button is unchecked, it removes these parameters. - ''' - '''-------------------------------------------------------------------------------------------- - Private Sub FacetControl() - If rdoGraph.Checked AndAlso Not ucrReceiverStations.IsEmpty Then - clsFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), bIncludeArgumentName:=False, iPosition:=1) - clsFacetFunction.RemoveParameterByName("rows") - clsFacetFunction.AddParameter("facets", clsROperatorParameter:=clsFacetOperator, iPosition:=1) - clsFacetFunction.AddParameter("space", Chr(34) & "fixed" & Chr(34), iPosition:=2) - Else - clsFacetFunction.RemoveParameterByName("facets") - clsFacetFunction.RemoveParameterByName("space") - clsFacetFunction.AddParameter("rows", "vars(variable)", iPosition:=1) - End If - - End Sub Private Sub ucrReceiverMultipleElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleElements.ControlValueChanged StackingFunction() End Sub @@ -453,7 +466,24 @@ Public Class dlgDisplayDailyData clsGgplotAesFunction.AddParameter("x", ucrReceiverDate.GetVariableNames(False), iPosition:=0) End Sub + + Private Sub ucrReceiverDate_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverStations.ControlContentsChanged, ucrReceiverDayOfYear.ControlContentsChanged, ucrReceiverMultipleElements.ControlValueChanged, ucrNudUpperYaxis.ControlContentsChanged, ucrInputRugColour.ControlContentsChanged, ucrInputBarColour.ControlContentsChanged, ucrPnlFrequencyDisplay.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrChkSum.ControlContentsChanged, ucrChkMax.ControlContentsChanged, ucrChkMin.ControlContentsChanged, ucrChkMean.ControlContentsChanged, ucrChkMedian.ControlContentsChanged, ucrChkIQR.ControlContentsChanged, ucrChkSumMissing.ControlContentsChanged TestOkEnabled() End Sub + + Private Sub ucrInputFacetBy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFacetBy.ControlValueChanged + If ucrInputFacetBy.GetText = "Station-Element" Then + clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(), iPosition:=0) + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationElementFacetOperator, iPosition:=2) + ElseIf ucrInputFacetBy.GetText = "Element-Station" Then + clsElementStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(), iPosition:=1) + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementStationFacetOperator, iPosition:=2) + ElseIf ucrInputFacetBy.GetText = "Station" Then + clsStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(), iPosition:=1) + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationFacetOperator, iPosition:=2) + ElseIf ucrInputFacetBy.GetText = "Element" Then + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementFacetOperator, iPosition:=2) + End If + End Sub End Class \ No newline at end of file From 5c0991ef840f0105b470a8f70c1bef468bc19d6f Mon Sep 17 00:00:00 2001 From: ivanluv Date: Tue, 11 Aug 2020 11:26:00 +0300 Subject: [PATCH 041/277] Modificationto the facet control --- instat/dlgDisplayDailyData.vb | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 0376beac7cc..4eff49f4cca 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -184,7 +184,7 @@ Public Class dlgDisplayDailyData ucrInputComboZero.bAllowNonConditionValues = True ucrInputFacetBy.SetLinkedDisplayControl(lblFacetby) - ucrInputFacetBy.SetItems({"Station-Element", "Element-Station", "Station", "Element"}) + ucrInputFacetBy.SetItems({"Element"}) ucrSaveGraph.SetPrefix("Graph") ucrSaveGraph.SetSaveTypeAsGraph() @@ -238,7 +238,7 @@ Public Class dlgDisplayDailyData clsStationElementFacetOperator = New ROperator clsElementFacetOperator = New ROperator - ucrInputFacetBy.SetText("Station-Element") + ucrInputFacetBy.SetText("Element") clsElementFacetOperator.SetOperation("~") clsElementFacetOperator.AddParameter("first", "", iPosition:=0) @@ -432,7 +432,17 @@ Public Class dlgDisplayDailyData StackingFunction() End Sub - Private Sub ucrSelectorDisplayDailyClimaticData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDisplayDailyClimaticData.ControlValueChanged + Private Sub ucrSelectorDisplayDailyClimaticData_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDisplayDailyClimaticData.ControlValueChanged, ucrReceiverStations.ControlContentsChanged + If rdoGraph.Checked Then + If Not ucrReceiverStations.IsEmpty Then + ucrInputFacetBy.SetItems({"Station-Element", "Element-Station", "Station"}) + ucrInputFacetBy.SetText("Station-Element") + Else + ucrInputFacetBy.SetItems({"Element"}) + ucrInputFacetBy.SetText("Element") + End If + End If + clsDisplayDailyGraphFunction.AddParameter("data_name", Chr(34) & ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.strCurrDataFrame & Chr(34), iPosition:=0) StackingFunction() End Sub @@ -466,21 +476,19 @@ Public Class dlgDisplayDailyData clsGgplotAesFunction.AddParameter("x", ucrReceiverDate.GetVariableNames(False), iPosition:=0) End Sub - - Private Sub ucrReceiverDate_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverStations.ControlContentsChanged, ucrReceiverDayOfYear.ControlContentsChanged, ucrReceiverMultipleElements.ControlValueChanged, ucrNudUpperYaxis.ControlContentsChanged, ucrInputRugColour.ControlContentsChanged, ucrInputBarColour.ControlContentsChanged, ucrPnlFrequencyDisplay.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrChkSum.ControlContentsChanged, ucrChkMax.ControlContentsChanged, ucrChkMin.ControlContentsChanged, ucrChkMean.ControlContentsChanged, ucrChkMedian.ControlContentsChanged, ucrChkIQR.ControlContentsChanged, ucrChkSumMissing.ControlContentsChanged TestOkEnabled() End Sub Private Sub ucrInputFacetBy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFacetBy.ControlValueChanged If ucrInputFacetBy.GetText = "Station-Element" Then - clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(), iPosition:=0) + clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=0) clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationElementFacetOperator, iPosition:=2) ElseIf ucrInputFacetBy.GetText = "Element-Station" Then - clsElementStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(), iPosition:=1) + clsElementStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementStationFacetOperator, iPosition:=2) ElseIf ucrInputFacetBy.GetText = "Station" Then - clsStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(), iPosition:=1) + clsStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationFacetOperator, iPosition:=2) ElseIf ucrInputFacetBy.GetText = "Element" Then clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementFacetOperator, iPosition:=2) From 71f393831ea89bf15ea1bddc8cf6d32e5675eb69 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 11 Aug 2020 15:50:01 +0300 Subject: [PATCH 042/277] Update instat/dlgImportDataset.vb @lloyddewit suggestion code Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgImportDataset.vb | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index b9a703483cb..c79e8f5ccbc 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -1025,25 +1025,25 @@ Public Class dlgImportDataset ''' Private Function GetMissingValueRString(strText As String) As String Dim arrStr() As String = strText.Split(",") - Dim strRmissingValueString As String 'if length is < 2 return an R string else return a vector of strings for R If arrStr.Length = 0 Then - strRmissingValueString = "" - ElseIf arrStr.Length = 1 Then - strRmissingValueString = Chr(34) & arrStr(0) & Chr(34) - Else - strRmissingValueString = "" - For Each strTemp As String In arrStr - If strRmissingValueString = "" Then - strRmissingValueString = Chr(34) & strTemp.Trim & Chr(34) - Else - strRmissingValueString = strRmissingValueString & "," & Chr(34) & strTemp.Trim & Chr(34) - End If - Next - strRmissingValueString = "c(" & strRmissingValueString & ")" + Return "" + End If + If arrStr.Length = 1 Then + Return Chr(34) & arrStr(0) & Chr(34) End If + + Dim strRmissingValueString As String = "" + For Each strTemp As String In arrStr + If strRmissingValueString = "" Then + strRmissingValueString = Chr(34) & strTemp.Trim & Chr(34) + Else + strRmissingValueString = strRmissingValueString & "," & Chr(34) & strTemp.Trim & Chr(34) + End If + Next + strRmissingValueString = "c(" & strRmissingValueString & ")" Return strRmissingValueString End Function -End Class \ No newline at end of file +End Class From a313dd41906bd882fd9c0981c0d069b994f90783 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 11 Aug 2020 16:31:05 +0300 Subject: [PATCH 043/277] modified the @lloydewit suggested code --- instat/dlgImportDataset.vb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index c79e8f5ccbc..070d316e549 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -1026,10 +1026,8 @@ Public Class dlgImportDataset Private Function GetMissingValueRString(strText As String) As String Dim arrStr() As String = strText.Split(",") - 'if length is < 2 return an R string else return a vector of strings for R - If arrStr.Length = 0 Then - Return "" - End If + 'if length is = 1 return an R string else return a vector of strings for R. + 'please note the array length will never be 0 If arrStr.Length = 1 Then Return Chr(34) & arrStr(0) & Chr(34) End If From 6fd86516b897b7816bfa86c7dc11cb8d02a17dc8 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Wed, 12 Aug 2020 17:17:00 +0300 Subject: [PATCH 044/277] Making changes for number of columns,facet control --- instat/dlgDisplayDailyData.Designer.vb | 200 ++++++++++++------------- instat/dlgDisplayDailyData.resx | 7 +- instat/dlgDisplayDailyData.vb | 67 ++++++--- 3 files changed, 153 insertions(+), 121 deletions(-) diff --git a/instat/dlgDisplayDailyData.Designer.vb b/instat/dlgDisplayDailyData.Designer.vb index c1461406448..9774cd41dd0 100644 --- a/instat/dlgDisplayDailyData.Designer.vb +++ b/instat/dlgDisplayDailyData.Designer.vb @@ -48,14 +48,15 @@ Partial Class dlgDisplayDailyData Me.lblDayOfTheYear = New System.Windows.Forms.Label() Me.lblYaxisUpper = New System.Windows.Forms.Label() Me.grpGraph = New System.Windows.Forms.GroupBox() - Me.ucrSaveGraph = New instat.ucrSave() - Me.ucrInputRugColour = New instat.ucrInputComboBox() Me.lblRugColor = New System.Windows.Forms.Label() - Me.ucrInputBarColour = New instat.ucrInputComboBox() Me.lblBarColour = New System.Windows.Forms.Label() - Me.ucrNudUpperYaxis = New instat.ucrNud() Me.lblElements = New System.Windows.Forms.Label() Me.grpSummary = New System.Windows.Forms.GroupBox() + Me.grpFacet = New System.Windows.Forms.GroupBox() + Me.lblScales = New System.Windows.Forms.Label() + Me.lblFacetby = New System.Windows.Forms.Label() + Me.lblNumberOfColumns = New System.Windows.Forms.Label() + Me.rdoGraphByYear = New System.Windows.Forms.RadioButton() Me.ucrChkSumMissing = New instat.ucrCheck() Me.ucrChkMax = New instat.ucrCheck() Me.ucrChkIQR = New instat.ucrCheck() @@ -63,18 +64,17 @@ Partial Class dlgDisplayDailyData Me.ucrChkSum = New instat.ucrCheck() Me.ucrChkMin = New instat.ucrCheck() Me.ucrChkMean = New instat.ucrCheck() - Me.grpFacet = New System.Windows.Forms.GroupBox() - Me.lblScales = New System.Windows.Forms.Label() + Me.ucrReceiverMultipleElements = New instat.ucrReceiverMultiple() + Me.ucrReceiverElement = New instat.ucrReceiverSingle() + Me.ucrInputComboZero = New instat.ucrInputComboBox() + Me.ucrSaveGraph = New instat.ucrSave() + Me.ucrInputRugColour = New instat.ucrInputComboBox() + Me.ucrInputBarColour = New instat.ucrInputComboBox() + Me.ucrNudUpperYaxis = New instat.ucrNud() Me.ucrInputScale = New instat.ucrInputComboBox() - Me.lblFacetby = New System.Windows.Forms.Label() Me.ucrNudNumberOfColumns = New instat.ucrNud() Me.ucrInputFacetBy = New instat.ucrInputComboBox() - Me.lblNumberOfColumns = New System.Windows.Forms.Label() Me.ucrChkNumberOfColumns = New instat.ucrCheck() - Me.rdoGraphByYear = New System.Windows.Forms.RadioButton() - Me.ucrReceiverMultipleElements = New instat.ucrReceiverMultiple() - Me.ucrReceiverElement = New instat.ucrReceiverSingle() - Me.ucrInputComboZero = New instat.ucrInputComboBox() Me.ucrInputComboMissing = New instat.ucrInputComboBox() Me.ucrInputComboTrace = New instat.ucrInputComboBox() Me.ucrChkMissing = New instat.ucrCheck() @@ -156,45 +156,16 @@ Partial Class dlgDisplayDailyData Me.grpGraph.Name = "grpGraph" Me.grpGraph.TabStop = False ' - 'ucrSaveGraph - ' - resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") - Me.ucrSaveGraph.Name = "ucrSaveGraph" - ' - 'ucrInputRugColour - ' - Me.ucrInputRugColour.AddQuotesIfUnrecognised = True - Me.ucrInputRugColour.IsReadOnly = False - resources.ApplyResources(Me.ucrInputRugColour, "ucrInputRugColour") - Me.ucrInputRugColour.Name = "ucrInputRugColour" - ' 'lblRugColor ' resources.ApplyResources(Me.lblRugColor, "lblRugColor") Me.lblRugColor.Name = "lblRugColor" ' - 'ucrInputBarColour - ' - Me.ucrInputBarColour.AddQuotesIfUnrecognised = True - Me.ucrInputBarColour.IsReadOnly = False - resources.ApplyResources(Me.ucrInputBarColour, "ucrInputBarColour") - Me.ucrInputBarColour.Name = "ucrInputBarColour" - ' 'lblBarColour ' resources.ApplyResources(Me.lblBarColour, "lblBarColour") Me.lblBarColour.Name = "lblBarColour" ' - 'ucrNudUpperYaxis - ' - Me.ucrNudUpperYaxis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudUpperYaxis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudUpperYaxis, "ucrNudUpperYaxis") - Me.ucrNudUpperYaxis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudUpperYaxis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudUpperYaxis.Name = "ucrNudUpperYaxis" - Me.ucrNudUpperYaxis.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'lblElements ' resources.ApplyResources(Me.lblElements, "lblElements") @@ -213,6 +184,44 @@ Partial Class dlgDisplayDailyData Me.grpSummary.Name = "grpSummary" Me.grpSummary.TabStop = False ' + 'grpFacet + ' + Me.grpFacet.Controls.Add(Me.lblScales) + Me.grpFacet.Controls.Add(Me.ucrInputScale) + Me.grpFacet.Controls.Add(Me.lblFacetby) + Me.grpFacet.Controls.Add(Me.ucrNudNumberOfColumns) + Me.grpFacet.Controls.Add(Me.ucrInputFacetBy) + Me.grpFacet.Controls.Add(Me.lblNumberOfColumns) + Me.grpFacet.Controls.Add(Me.ucrChkNumberOfColumns) + resources.ApplyResources(Me.grpFacet, "grpFacet") + Me.grpFacet.Name = "grpFacet" + Me.grpFacet.TabStop = False + ' + 'lblScales + ' + resources.ApplyResources(Me.lblScales, "lblScales") + Me.lblScales.Name = "lblScales" + ' + 'lblFacetby + ' + resources.ApplyResources(Me.lblFacetby, "lblFacetby") + Me.lblFacetby.Name = "lblFacetby" + ' + 'lblNumberOfColumns + ' + resources.ApplyResources(Me.lblNumberOfColumns, "lblNumberOfColumns") + Me.lblNumberOfColumns.Name = "lblNumberOfColumns" + ' + 'rdoGraphByYear + ' + resources.ApplyResources(Me.rdoGraphByYear, "rdoGraphByYear") + Me.rdoGraphByYear.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraphByYear.FlatAppearance.BorderSize = 2 + Me.rdoGraphByYear.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraphByYear.ForeColor = System.Drawing.SystemColors.ActiveCaptionText + Me.rdoGraphByYear.Name = "rdoGraphByYear" + Me.rdoGraphByYear.UseVisualStyleBackColor = True + ' 'ucrChkSumMissing ' Me.ucrChkSumMissing.Checked = False @@ -255,23 +264,59 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.ucrChkMean, "ucrChkMean") Me.ucrChkMean.Name = "ucrChkMean" ' - 'grpFacet + 'ucrReceiverMultipleElements ' - Me.grpFacet.Controls.Add(Me.lblScales) - Me.grpFacet.Controls.Add(Me.ucrInputScale) - Me.grpFacet.Controls.Add(Me.lblFacetby) - Me.grpFacet.Controls.Add(Me.ucrNudNumberOfColumns) - Me.grpFacet.Controls.Add(Me.ucrInputFacetBy) - Me.grpFacet.Controls.Add(Me.lblNumberOfColumns) - Me.grpFacet.Controls.Add(Me.ucrChkNumberOfColumns) - resources.ApplyResources(Me.grpFacet, "grpFacet") - Me.grpFacet.Name = "grpFacet" - Me.grpFacet.TabStop = False + Me.ucrReceiverMultipleElements.frmParent = Me + resources.ApplyResources(Me.ucrReceiverMultipleElements, "ucrReceiverMultipleElements") + Me.ucrReceiverMultipleElements.Name = "ucrReceiverMultipleElements" + Me.ucrReceiverMultipleElements.Selector = Nothing + Me.ucrReceiverMultipleElements.strNcFilePath = "" + Me.ucrReceiverMultipleElements.ucrSelector = Nothing ' - 'lblScales + 'ucrReceiverElement ' - resources.ApplyResources(Me.lblScales, "lblScales") - Me.lblScales.Name = "lblScales" + Me.ucrReceiverElement.frmParent = Me + resources.ApplyResources(Me.ucrReceiverElement, "ucrReceiverElement") + Me.ucrReceiverElement.Name = "ucrReceiverElement" + Me.ucrReceiverElement.Selector = Nothing + Me.ucrReceiverElement.strNcFilePath = "" + Me.ucrReceiverElement.ucrSelector = Nothing + ' + 'ucrInputComboZero + ' + Me.ucrInputComboZero.AddQuotesIfUnrecognised = True + Me.ucrInputComboZero.IsReadOnly = False + resources.ApplyResources(Me.ucrInputComboZero, "ucrInputComboZero") + Me.ucrInputComboZero.Name = "ucrInputComboZero" + ' + 'ucrSaveGraph + ' + resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") + Me.ucrSaveGraph.Name = "ucrSaveGraph" + ' + 'ucrInputRugColour + ' + Me.ucrInputRugColour.AddQuotesIfUnrecognised = True + Me.ucrInputRugColour.IsReadOnly = False + resources.ApplyResources(Me.ucrInputRugColour, "ucrInputRugColour") + Me.ucrInputRugColour.Name = "ucrInputRugColour" + ' + 'ucrInputBarColour + ' + Me.ucrInputBarColour.AddQuotesIfUnrecognised = True + Me.ucrInputBarColour.IsReadOnly = False + resources.ApplyResources(Me.ucrInputBarColour, "ucrInputBarColour") + Me.ucrInputBarColour.Name = "ucrInputBarColour" + ' + 'ucrNudUpperYaxis + ' + Me.ucrNudUpperYaxis.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudUpperYaxis.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + resources.ApplyResources(Me.ucrNudUpperYaxis, "ucrNudUpperYaxis") + Me.ucrNudUpperYaxis.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudUpperYaxis.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudUpperYaxis.Name = "ucrNudUpperYaxis" + Me.ucrNudUpperYaxis.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'ucrInputScale ' @@ -280,11 +325,6 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.ucrInputScale, "ucrInputScale") Me.ucrInputScale.Name = "ucrInputScale" ' - 'lblFacetby - ' - resources.ApplyResources(Me.lblFacetby, "lblFacetby") - Me.lblFacetby.Name = "lblFacetby" - ' 'ucrNudNumberOfColumns ' Me.ucrNudNumberOfColumns.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -302,52 +342,12 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.ucrInputFacetBy, "ucrInputFacetBy") Me.ucrInputFacetBy.Name = "ucrInputFacetBy" ' - 'lblNumberOfColumns - ' - resources.ApplyResources(Me.lblNumberOfColumns, "lblNumberOfColumns") - Me.lblNumberOfColumns.Name = "lblNumberOfColumns" - ' 'ucrChkNumberOfColumns ' Me.ucrChkNumberOfColumns.Checked = False resources.ApplyResources(Me.ucrChkNumberOfColumns, "ucrChkNumberOfColumns") Me.ucrChkNumberOfColumns.Name = "ucrChkNumberOfColumns" ' - 'rdoGraphByYear - ' - resources.ApplyResources(Me.rdoGraphByYear, "rdoGraphByYear") - Me.rdoGraphByYear.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGraphByYear.FlatAppearance.BorderSize = 2 - Me.rdoGraphByYear.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGraphByYear.ForeColor = System.Drawing.SystemColors.ActiveCaptionText - Me.rdoGraphByYear.Name = "rdoGraphByYear" - Me.rdoGraphByYear.UseVisualStyleBackColor = True - ' - 'ucrReceiverMultipleElements - ' - Me.ucrReceiverMultipleElements.frmParent = Me - resources.ApplyResources(Me.ucrReceiverMultipleElements, "ucrReceiverMultipleElements") - Me.ucrReceiverMultipleElements.Name = "ucrReceiverMultipleElements" - Me.ucrReceiverMultipleElements.Selector = Nothing - Me.ucrReceiverMultipleElements.strNcFilePath = "" - Me.ucrReceiverMultipleElements.ucrSelector = Nothing - ' - 'ucrReceiverElement - ' - Me.ucrReceiverElement.frmParent = Me - resources.ApplyResources(Me.ucrReceiverElement, "ucrReceiverElement") - Me.ucrReceiverElement.Name = "ucrReceiverElement" - Me.ucrReceiverElement.Selector = Nothing - Me.ucrReceiverElement.strNcFilePath = "" - Me.ucrReceiverElement.ucrSelector = Nothing - ' - 'ucrInputComboZero - ' - Me.ucrInputComboZero.AddQuotesIfUnrecognised = True - Me.ucrInputComboZero.IsReadOnly = False - resources.ApplyResources(Me.ucrInputComboZero, "ucrInputComboZero") - Me.ucrInputComboZero.Name = "ucrInputComboZero" - ' 'ucrInputComboMissing ' Me.ucrInputComboMissing.AddQuotesIfUnrecognised = True diff --git a/instat/dlgDisplayDailyData.resx b/instat/dlgDisplayDailyData.resx index acf2f4a21e8..f86353c87ed 100644 --- a/instat/dlgDisplayDailyData.resx +++ b/instat/dlgDisplayDailyData.resx @@ -172,7 +172,7 @@ NoControl - 54, 12 + 56, 12 100, 29 @@ -967,7 +967,7 @@ NoControl - 152, 12 + 154, 12 100, 29 @@ -1344,6 +1344,9 @@ 27 + + NoControl + CenterScreen diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 4eff49f4cca..deda415039c 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -137,18 +137,24 @@ Public Class dlgDisplayDailyData ucrChkSumMissing.SetParameter(New RParameter("summary_count_missing", 6), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkSumMissing.SetText("N Missing") - ucrChkNumberOfColumns.SetParameter(New RParameter("ncol", 1), bNewChangeParameterValue:=False) + ucrChkNumberOfColumns.AddParameterPresentCondition(True, "ncol") + ucrChkNumberOfColumns.AddParameterPresentCondition(False, "ncol", False) + ucrChkNumberOfColumns.SetText("Number of Columns") - ucrChkNumberOfColumns.AddToLinkedControls(ucrNudNumberOfColumns, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkNumberOfColumns.AddToLinkedControls(ucrNudNumberOfColumns, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) + ucrNudNumberOfColumns.SetLinkedDisplayControl(lblNumberOfColumns) ucrNudNumberOfColumns.SetParameter(New RParameter("ncol", 1)) ucrNudNumberOfColumns.SetMinMax(1, Integer.MaxValue) - ucrInputScale.SetParameter(New RParameter("scales", 2)) + ucrInputScale.SetParameter(New RParameter("scales", 0)) + dctScale.Add("Free", Chr(34) & "free" & Chr(34)) dctScale.Add("Free_y", Chr(34) & "free_y" & Chr(34)) dctScale.Add("Free_x", Chr(34) & "free_x" & Chr(34)) ucrInputScale.SetItems(dctScale) ucrInputScale.SetLinkedDisplayControl(lblScales) + ucrInputScale.SetDropDownStyleAsNonEditable() + ucrInputScale.SetRDefault("free_y") lstCheckboxes.AddRange({ucrChkSum, ucrChkMax, ucrChkMin, ucrChkMean, ucrChkMedian, ucrChkIQR, ucrChkSumMissing}) @@ -184,7 +190,8 @@ Public Class dlgDisplayDailyData ucrInputComboZero.bAllowNonConditionValues = True ucrInputFacetBy.SetLinkedDisplayControl(lblFacetby) - ucrInputFacetBy.SetItems({"Element"}) + 'ucrInputFacetBy.SetItems({"Element"}) + ucrInputFacetBy.SetDropDownStyleAsNonEditable() ucrSaveGraph.SetPrefix("Graph") ucrSaveGraph.SetSaveTypeAsGraph() @@ -200,7 +207,7 @@ Public Class dlgDisplayDailyData ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoGraphByYear, "daily_graph") ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoTable, "daily_table") ucrPnlFrequencyDisplay.AddToLinkedControls(ucrNudUpperYaxis, {rdoGraphByYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=100) - ucrPnlFrequencyDisplay.AddToLinkedControls({ucrReceiverMultipleElements, ucrInputScale, ucrChkNumberOfColumns}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencyDisplay.AddToLinkedControls({ucrReceiverMultipleElements, ucrInputFacetBy, ucrInputScale, ucrChkNumberOfColumns}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboMissing, ucrChkMissing}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboTrace, ucrChkTrace}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboZero, ucrChkZero}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -269,6 +276,7 @@ Public Class dlgDisplayDailyData clsNAFilterOperator.SetOperation("%>%") clsNAFilterOperator.AddParameter("filter", "filter(is.na(value))", iPosition:=1) + clsNAFilterOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) clsDisplayDailyGraphOperator.SetOperation("") clsDisplayDailyTableOperator.SetOperation("") @@ -281,6 +289,7 @@ Public Class dlgDisplayDailyData clsGGplotFunction.SetPackageName("ggplot2") clsGGplotFunction.SetRCommand("ggplot") clsGGplotFunction.AddParameter("mapping", clsRFunctionParameter:=clsGgplotAesFunction) + clsGGplotFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) clsGgplotAesFunction.SetPackageName("ggplot2") clsGgplotAesFunction.SetRCommand("aes") @@ -331,6 +340,8 @@ Public Class dlgDisplayDailyData ucrBase.clsRsyntax.SetBaseROperator(clsGgPlotOperator) + SetFacetItems() + For Each ctrTemp As ucrCheck In lstCheckboxes ctrTemp.SetParameterIncludeArgumentName(False) ctrTemp.SetRDefault(Chr(34) & Chr(34)) @@ -347,9 +358,6 @@ Public Class dlgDisplayDailyData ucrReceiverDate.AddAdditionalCodeParameterPair(clsDisplayDailyTable, New RParameter("date_col", 2), iAdditionalPairNo:=1) ucrReceiverDate.AddAdditionalCodeParameterPair(clsIdVarsFunction, New RParameter("date", iNewPosition:=1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) - ucrSelectorDisplayDailyClimaticData.AddAdditionalCodeParameterPair(clsGGplotFunction, New RParameter("data", iNewPosition:=0), iAdditionalPairNo:=1) - ucrSelectorDisplayDailyClimaticData.AddAdditionalCodeParameterPair(clsNAFilterOperator, New RParameter("data", iNewPosition:=0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) - ucrChkSum.SetRCode(clsConcFunction, bReset) ucrChkMax.SetRCode(clsConcFunction, bReset) ucrChkMin.SetRCode(clsConcFunction, bReset) @@ -433,16 +441,15 @@ Public Class dlgDisplayDailyData End Sub Private Sub ucrSelectorDisplayDailyClimaticData_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDisplayDailyClimaticData.ControlValueChanged, ucrReceiverStations.ControlContentsChanged - If rdoGraph.Checked Then - If Not ucrReceiverStations.IsEmpty Then - ucrInputFacetBy.SetItems({"Station-Element", "Element-Station", "Station"}) - ucrInputFacetBy.SetText("Station-Element") - Else - ucrInputFacetBy.SetItems({"Element"}) - ucrInputFacetBy.SetText("Element") - End If - End If - + 'If rdoGraph.Checked Then + ' If Not ucrReceiverStations.IsEmpty Then + ' ucrInputFacetBy.SetItems({"Station-Element", "Element-Station", "Station"}) + ' ucrInputFacetBy.SetText("Station-Element") + ' Else + ' ucrInputFacetBy.SetItems({"Element"}) + ' ucrInputFacetBy.SetText("Element") + ' End If + 'End If clsDisplayDailyGraphFunction.AddParameter("data_name", Chr(34) & ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.strCurrDataFrame & Chr(34), iPosition:=0) StackingFunction() End Sub @@ -468,7 +475,8 @@ Public Class dlgDisplayDailyData End If End Sub - Private Sub ucrReceiverMultipleElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleElements.ControlValueChanged + Private Sub ucrReceiverMultipleElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleElements.ControlContentsChanged, ucrReceiverStations.ControlValueChanged + SetFacetItems() StackingFunction() End Sub @@ -480,6 +488,22 @@ Public Class dlgDisplayDailyData TestOkEnabled() End Sub + Private Sub SetFacetItems() + If Not ucrReceiverStations.IsEmpty AndAlso ucrReceiverMultipleElements.GetCount > 1 Then + ucrInputFacetBy.SetItems({"Station-Element", "Element-Station"}) + ucrInputFacetBy.SetText("Station-Element") + ElseIf Not ucrReceiverStations.IsEmpty AndAlso ucrReceiverMultipleElements.GetCount <= 1 Then + ucrInputFacetBy.SetItems({"Station"}) + ucrInputFacetBy.SetText("Station") + ElseIf ucrReceiverStations.IsEmpty AndAlso ucrReceiverMultipleElements.GetCount >= 1 Then + ucrInputFacetBy.SetItems({"Element"}) + ucrInputFacetBy.SetText("Element") + Else + ucrInputFacetBy.SetItems({"No Facets"}) + ucrInputFacetBy.SetText("No Facets") + End If + End Sub + Private Sub ucrInputFacetBy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFacetBy.ControlValueChanged If ucrInputFacetBy.GetText = "Station-Element" Then clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=0) @@ -494,4 +518,9 @@ Public Class dlgDisplayDailyData clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementFacetOperator, iPosition:=2) End If End Sub + + Private Sub ucrSelectorDisplayDailyClimaticData_DataFrameChanged() Handles ucrSelectorDisplayDailyClimaticData.DataFrameChanged + clsGGplotFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + clsNAFilterOperator.AddParameter("data", clsRFunctionParameter:=ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + End Sub End Class \ No newline at end of file From 11b946521d77a94388bce81f38c5d05772ae19d2 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Thu, 13 Aug 2020 14:34:34 +0300 Subject: [PATCH 045/277] small changes --- instat/dlgDisplayDailyData.vb | 77 +++++++++++++++++++---------------- 1 file changed, 43 insertions(+), 34 deletions(-) diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index deda415039c..23513507e3a 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -137,24 +137,19 @@ Public Class dlgDisplayDailyData ucrChkSumMissing.SetParameter(New RParameter("summary_count_missing", 6), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "summary_count_missing" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkSumMissing.SetText("N Missing") + ucrNudNumberOfColumns.SetParameter(New RParameter("ncol", 1)) + ucrNudNumberOfColumns.SetMinMax(1, Integer.MaxValue) + ucrChkNumberOfColumns.AddParameterPresentCondition(True, "ncol") ucrChkNumberOfColumns.AddParameterPresentCondition(False, "ncol", False) - ucrChkNumberOfColumns.SetText("Number of Columns") - ucrChkNumberOfColumns.AddToLinkedControls(ucrNudNumberOfColumns, {True}, bNewLinkedHideIfParameterMissing:=True, bNewLinkedAddRemoveParameter:=True) - - ucrNudNumberOfColumns.SetLinkedDisplayControl(lblNumberOfColumns) - ucrNudNumberOfColumns.SetParameter(New RParameter("ncol", 1)) - ucrNudNumberOfColumns.SetMinMax(1, Integer.MaxValue) ucrInputScale.SetParameter(New RParameter("scales", 0)) - dctScale.Add("Free", Chr(34) & "free" & Chr(34)) dctScale.Add("Free_y", Chr(34) & "free_y" & Chr(34)) dctScale.Add("Free_x", Chr(34) & "free_x" & Chr(34)) + dctScale.Add("Free", Chr(34) & "free" & Chr(34)) ucrInputScale.SetItems(dctScale) - ucrInputScale.SetLinkedDisplayControl(lblScales) ucrInputScale.SetDropDownStyleAsNonEditable() - ucrInputScale.SetRDefault("free_y") lstCheckboxes.AddRange({ucrChkSum, ucrChkMax, ucrChkMin, ucrChkMean, ucrChkMedian, ucrChkIQR, ucrChkSumMissing}) @@ -190,7 +185,6 @@ Public Class dlgDisplayDailyData ucrInputComboZero.bAllowNonConditionValues = True ucrInputFacetBy.SetLinkedDisplayControl(lblFacetby) - 'ucrInputFacetBy.SetItems({"Element"}) ucrInputFacetBy.SetDropDownStyleAsNonEditable() ucrSaveGraph.SetPrefix("Graph") @@ -207,13 +201,17 @@ Public Class dlgDisplayDailyData ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoGraphByYear, "daily_graph") ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoTable, "daily_table") ucrPnlFrequencyDisplay.AddToLinkedControls(ucrNudUpperYaxis, {rdoGraphByYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=100) - ucrPnlFrequencyDisplay.AddToLinkedControls({ucrReceiverMultipleElements, ucrInputFacetBy, ucrInputScale, ucrChkNumberOfColumns}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencyDisplay.AddToLinkedControls({ucrReceiverMultipleElements, ucrInputFacetBy, ucrChkNumberOfColumns}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputScale}, {rdoGraph}, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboMissing, ucrChkMissing}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboTrace, ucrChkTrace}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboZero, ucrChkZero}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls(ucrChkSum, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkNumberOfColumns.AddToLinkedControls(ucrNudNumberOfColumns, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) + ucrNudNumberOfColumns.SetLinkedDisplayControl(lblNumberOfColumns) ucrChkSum.SetLinkedDisplayControl(grpSummary) ucrInputScale.SetLinkedDisplayControl(grpFacet) + ucrInputScale.SetLinkedDisplayControl(lblScales) ucrChkMissing.AddToLinkedControls({ucrInputComboMissing}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkTrace.AddToLinkedControls({ucrInputComboTrace}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="tr") @@ -245,7 +243,7 @@ Public Class dlgDisplayDailyData clsStationElementFacetOperator = New ROperator clsElementFacetOperator = New ROperator - ucrInputFacetBy.SetText("Element") + ucrNudNumberOfColumns.SetText("1") clsElementFacetOperator.SetOperation("~") clsElementFacetOperator.AddParameter("first", "", iPosition:=0) @@ -272,7 +270,7 @@ Public Class dlgDisplayDailyData clsFacetFunction.SetPackageName("ggplot2") clsFacetFunction.SetRCommand("facet_wrap") clsFacetFunction.AddParameter("scales", Chr(34) & "free_y" & Chr(34), iPosition:=0) - clsFacetFunction.AddParameter("ncol", "1", iPosition:=1) + clsFacetFunction.AddParameter("ncol", 1, iPosition:=1) clsNAFilterOperator.SetOperation("%>%") clsNAFilterOperator.AddParameter("filter", "filter(is.na(value))", iPosition:=1) @@ -385,8 +383,8 @@ Public Class dlgDisplayDailyData ucrSaveGraph.SetRCode(clsDisplayDailyGraphFunction, bReset) ucrPnlFrequencyDisplay.SetRCode(ucrBase.clsRsyntax.clsBaseOperator, bReset) ucrInputScale.SetRCode(clsFacetFunction, bReset) - ucrChkNumberOfColumns.SetRCode(clsFacetFunction, bReset) ucrNudNumberOfColumns.SetRCode(clsFacetFunction, bReset) + ucrChkNumberOfColumns.SetRCode(clsFacetFunction, bReset) End Sub Private Sub TestOkEnabled() @@ -441,15 +439,6 @@ Public Class dlgDisplayDailyData End Sub Private Sub ucrSelectorDisplayDailyClimaticData_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDisplayDailyClimaticData.ControlValueChanged, ucrReceiverStations.ControlContentsChanged - 'If rdoGraph.Checked Then - ' If Not ucrReceiverStations.IsEmpty Then - ' ucrInputFacetBy.SetItems({"Station-Element", "Element-Station", "Station"}) - ' ucrInputFacetBy.SetText("Station-Element") - ' Else - ' ucrInputFacetBy.SetItems({"Element"}) - ' ucrInputFacetBy.SetText("Element") - ' End If - 'End If clsDisplayDailyGraphFunction.AddParameter("data_name", Chr(34) & ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.strCurrDataFrame & Chr(34), iPosition:=0) StackingFunction() End Sub @@ -505,18 +494,38 @@ Public Class dlgDisplayDailyData End Sub Private Sub ucrInputFacetBy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFacetBy.ControlValueChanged - If ucrInputFacetBy.GetText = "Station-Element" Then - clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=0) - clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationElementFacetOperator, iPosition:=2) - ElseIf ucrInputFacetBy.GetText = "Element-Station" Then - clsElementStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) - clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementStationFacetOperator, iPosition:=2) - ElseIf ucrInputFacetBy.GetText = "Station" Then - clsStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) - clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationFacetOperator, iPosition:=2) - ElseIf ucrInputFacetBy.GetText = "Element" Then - clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementFacetOperator, iPosition:=2) + Select Case ucrInputFacetBy.GetText() + Case "Station-Element" + clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=0) + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationElementFacetOperator, iPosition:=2) + Case "Element-Station" + clsElementStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementStationFacetOperator, iPosition:=2) + Case "Station" + clsStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationFacetOperator, iPosition:=2) + Case "Element" + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementFacetOperator, iPosition:=2) + End Select + + If ucrInputFacetBy.GetText() = "Station-Element" OrElse ucrInputFacetBy.GetText() = "Element-Station" Then + clsFacetFunction.AddParameter("labeller", "label_wrap_gen(multi_line=FALSE)", iPosition:=3) + Else + clsFacetFunction.RemoveParameterByName("labeller") End If + + 'If ucrInputFacetBy.GetText = "Station-Element" Then + ' clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=0) + ' clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationElementFacetOperator, iPosition:=2) + 'ElseIf ucrInputFacetBy.GetText = "Element-Station" Then + ' clsElementStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) + ' clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementStationFacetOperator, iPosition:=2) + 'ElseIf ucrInputFacetBy.GetText = "Station" Then + ' clsStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) + ' clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationFacetOperator, iPosition:=2) + 'ElseIf ucrInputFacetBy.GetText = "Element" Then + ' clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementFacetOperator, iPosition:=2) + 'End If End Sub Private Sub ucrSelectorDisplayDailyClimaticData_DataFrameChanged() Handles ucrSelectorDisplayDailyClimaticData.DataFrameChanged From ce286d3f1c501b7b2765de001c8a32354b811364 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Sat, 15 Aug 2020 14:09:47 +0300 Subject: [PATCH 046/277] added excel import range code --- instat/dlgImportDataset.vb | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index 070d316e549..c94da064d15 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -6,6 +6,7 @@ Public Class dlgImportDataset Private clsImportFixedWidthText, clsImportCSV, clsImportDAT, clsImportRDS, clsReadRDS, clsImportExcel, clsImport As RFunction Private clsGetExcelSheetNames As RFunction + Private clsRangeOperator As ROperator ''' Ensures that any file paths containing special characters (e.g. accents) are ''' correctly encoded. ''' @@ -252,6 +253,20 @@ Public Class dlgImportDataset ucrChkColumnNamesExcel.SetParameter(New RParameter("col_names"), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:="TRUE", strNewValueIfUnchecked:="FALSE") ucrChkColumnNamesExcel.SetRDefault("TRUE") + ucrChkRange.SetText("Range:") + ucrChkRange.AddParameterPresentCondition(True, "range", True) + ucrChkRange.AddParameterPresentCondition(False, "range", False) + ucrChkRange.AddToLinkedControls({ucrInputTextFrom}, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="A1") + ucrChkRange.AddToLinkedControls({ucrInputTextTo}, objValues:={True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="AA100") + + ucrInputTextFrom.SetParameter(New RParameter("from", bNewIncludeArgumentName:=False, iNewPosition:=0)) + ucrInputTextTo.SetParameter(New RParameter("To", bNewIncludeArgumentName:=False, iNewPosition:=1)) + ucrInputTextTo.AddQuotesIfUnrecognised = False + ucrInputTextFrom.AddQuotesIfUnrecognised = False + + ucrInputTextFrom.SetLinkedDisplayControl(lblFrom) + ucrInputTextTo.SetLinkedDisplayControl(lblTo) + ucrChkMaxRowsExcel.SetText("Maximum Rows To Import") ucrChkMaxRowsExcel.AddParameterPresentCondition(True, "n_max", True) ucrChkMaxRowsExcel.AddParameterPresentCondition(False, "n_max", False) @@ -307,6 +322,7 @@ Public Class dlgImportDataset clsReadRDS = New RFunction clsImportDAT = New RFunction clsGetExcelSheetNames = New RFunction + clsRangeOperator = New ROperator clsEnc2Native = New RFunction clsLapply = New RFunction @@ -321,6 +337,10 @@ Public Class dlgImportDataset clsImportExcel.SetRCommand("import") clsImportExcel.AddParameter("guess_max", "Inf") + clsRangeOperator.SetOperation(":", bBracketsTemp:=False) + clsRangeOperator.bToScriptAsRString = True + clsRangeOperator.bSpaceAroundOperation = False + clsImportCSV.SetPackageName("rio") clsImportCSV.SetRCommand("import") clsImportCSV.AddParameter("stringsAsFactors", "TRUE") @@ -514,6 +534,10 @@ Public Class dlgImportDataset ucrChkColumnNamesExcel.SetRCode(clsImportExcel, bReset) ucrNudMaxRowsExcel.SetRCode(clsImportExcel, bReset) ucrChkMaxRowsExcel.SetRCode(clsImportExcel, bReset) + + ucrChkRange.SetRCode(clsImportExcel, bReset) + ucrInputTextFrom.SetRCode(clsRangeOperator, bReset) + ucrInputTextTo.SetRCode(clsRangeOperator, bReset) End Sub Private Sub TextPreviewVisible(bVisible As Boolean) @@ -985,6 +1009,14 @@ Public Class dlgImportDataset End If End Sub + Private Sub ucrChkRange_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkRange.ControlValueChanged + If ucrChkRange.Checked Then + clsImportExcel.AddParameter("range", clsROperatorParameter:=clsRangeOperator) + Else + clsImportExcel.RemoveParameterByName("range") + End If + End Sub + Private Function ListOfCheckedItems() Dim keyList As New List(Of Integer) For Each kvp As KeyValuePair(Of Integer, String) In dctSelectedExcelSheets From 6bb0a4606eed0d249f4c19ceff7b1295774788c8 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 17 Aug 2020 10:30:42 +0300 Subject: [PATCH 047/277] Minor changes --- instat/dlgDisplayDailyData.vb | 69 +++++++++++++---------------------- 1 file changed, 26 insertions(+), 43 deletions(-) diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 23513507e3a..fca62dd1054 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -26,7 +26,7 @@ Public Class dlgDisplayDailyData Private clsGGplotFunction, clsGeomLineFunction, clsGeomRugFunction, clsThemeFunction, clsThemeGreyFunction As New RFunction Private clsIdVarsFunction, clsFacetFunction, clsGgplotAesFunction, clsGGplotElementText, clsXLabFunction As New RFunction Private clsGgPlotOperator, clsDisplayDailyGraphOperator, clsDisplayDailyTableOperator, clsNAFilterOperator As New ROperator - Private clsStationElementFacetOperator, clsElementStationFacetOperator, clsStationFacetOperator, clsElementFacetOperator As New ROperator + Private clsStationElemFacetOperator As New ROperator Private Sub dlgDisplayDailyData_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -238,29 +238,11 @@ Public Class dlgDisplayDailyData clsNAFilterOperator = New ROperator clsFacetFunction = New RFunction clsXLabFunction = New RFunction - clsStationFacetOperator = New ROperator - clsElementStationFacetOperator = New ROperator - clsStationElementFacetOperator = New ROperator - clsElementFacetOperator = New ROperator + clsStationElemFacetOperator = New ROperator ucrNudNumberOfColumns.SetText("1") - clsElementFacetOperator.SetOperation("~") - clsElementFacetOperator.AddParameter("first", "", iPosition:=0) - clsElementFacetOperator.AddParameter("variable", "variable", bIncludeArgumentName:=False, iPosition:=1) - - clsStationFacetOperator.SetOperation("~") - clsStationFacetOperator.AddParameter("First", "", iPosition:=0) - clsStationFacetOperator.bBrackets = False - - clsElementStationFacetOperator.SetOperation("~") - clsElementStationFacetOperator.AddParameter("variable", "variable", iPosition:=0) - clsElementStationFacetOperator.bBrackets = False - - clsStationElementFacetOperator.SetOperation("~") - clsStationElementFacetOperator.AddParameter("variable", "variable", iPosition:=1) - clsStationElementFacetOperator.bBrackets = False - + clsStationElemFacetOperator.SetOperation("~") clsXLabFunction.SetPackageName("ggplot2") clsXLabFunction.SetRCommand("xlab") @@ -271,6 +253,7 @@ Public Class dlgDisplayDailyData clsFacetFunction.SetRCommand("facet_wrap") clsFacetFunction.AddParameter("scales", Chr(34) & "free_y" & Chr(34), iPosition:=0) clsFacetFunction.AddParameter("ncol", 1, iPosition:=1) + clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationElemFacetOperator, iPosition:=2) clsNAFilterOperator.SetOperation("%>%") clsNAFilterOperator.AddParameter("filter", "filter(is.na(value))", iPosition:=1) @@ -438,7 +421,7 @@ Public Class dlgDisplayDailyData StackingFunction() End Sub - Private Sub ucrSelectorDisplayDailyClimaticData_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDisplayDailyClimaticData.ControlValueChanged, ucrReceiverStations.ControlContentsChanged + Private Sub ucrSelectorDisplayDailyClimaticData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDisplayDailyClimaticData.ControlValueChanged, ucrReceiverStations.ControlValueChanged clsDisplayDailyGraphFunction.AddParameter("data_name", Chr(34) & ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.strCurrDataFrame & Chr(34), iPosition:=0) StackingFunction() End Sub @@ -476,7 +459,18 @@ Public Class dlgDisplayDailyData Private Sub ucrReceiverDate_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverStations.ControlContentsChanged, ucrReceiverDayOfYear.ControlContentsChanged, ucrReceiverMultipleElements.ControlValueChanged, ucrNudUpperYaxis.ControlContentsChanged, ucrInputRugColour.ControlContentsChanged, ucrInputBarColour.ControlContentsChanged, ucrPnlFrequencyDisplay.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrChkSum.ControlContentsChanged, ucrChkMax.ControlContentsChanged, ucrChkMin.ControlContentsChanged, ucrChkMean.ControlContentsChanged, ucrChkMedian.ControlContentsChanged, ucrChkIQR.ControlContentsChanged, ucrChkSumMissing.ControlContentsChanged TestOkEnabled() End Sub - + '''-------------------------------------------------------------------------------------------- + ''' + ''' If the station receiver is not empty and the multiple element receiver has more one element the + ''' facet combobox text is set to "Station-Element " and "Element - station" + '''If the station receiver is not empty and the multiple element receiver has no or one element the facet combobox + ''' text is set to "Station" + ''' If the station receiver is empty and the multiple element receiver has more than one element the facet combobox + ''' text is set to "Element" + ''' If the station receiver is empty and the multiple element receiver has no element the facet combobox + ''' text is set to "No Facets" + ''' + '''-------------------------------------------------------------------------------------------- Private Sub SetFacetItems() If Not ucrReceiverStations.IsEmpty AndAlso ucrReceiverMultipleElements.GetCount > 1 Then ucrInputFacetBy.SetItems({"Station-Element", "Element-Station"}) @@ -494,18 +488,20 @@ Public Class dlgDisplayDailyData End Sub Private Sub ucrInputFacetBy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFacetBy.ControlValueChanged + clsStationElemFacetOperator.ClearParameters() Select Case ucrInputFacetBy.GetText() Case "Station-Element" - clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=0) - clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationElementFacetOperator, iPosition:=2) + clsStationElemFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=0) + clsStationElemFacetOperator.AddParameter("variable", "variable", iPosition:=1) Case "Element-Station" - clsElementStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) - clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementStationFacetOperator, iPosition:=2) + clsStationElemFacetOperator.AddParameter("variable", "variable", iPosition:=0) + clsStationElemFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) Case "Station" - clsStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) - clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationFacetOperator, iPosition:=2) + clsStationElemFacetOperator.AddParameter("First", "", iPosition:=0) + clsStationElemFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) Case "Element" - clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementFacetOperator, iPosition:=2) + clsStationElemFacetOperator.AddParameter("variable", "variable", iPosition:=1) + clsStationElemFacetOperator.AddParameter("First", "", iPosition:=0) End Select If ucrInputFacetBy.GetText() = "Station-Element" OrElse ucrInputFacetBy.GetText() = "Element-Station" Then @@ -513,19 +509,6 @@ Public Class dlgDisplayDailyData Else clsFacetFunction.RemoveParameterByName("labeller") End If - - 'If ucrInputFacetBy.GetText = "Station-Element" Then - ' clsStationElementFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=0) - ' clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationElementFacetOperator, iPosition:=2) - 'ElseIf ucrInputFacetBy.GetText = "Element-Station" Then - ' clsElementStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) - ' clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementStationFacetOperator, iPosition:=2) - 'ElseIf ucrInputFacetBy.GetText = "Station" Then - ' clsStationFacetOperator.AddParameter("station", ucrReceiverStations.GetVariableNames(False), iPosition:=1) - ' clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsStationFacetOperator, iPosition:=2) - 'ElseIf ucrInputFacetBy.GetText = "Element" Then - ' clsFacetFunction.AddParameter("facet", clsROperatorParameter:=clsElementFacetOperator, iPosition:=2) - 'End If End Sub Private Sub ucrSelectorDisplayDailyClimaticData_DataFrameChanged() Handles ucrSelectorDisplayDailyClimaticData.DataFrameChanged From 1996d4fe02f597204aed34780a07e98919c5f49e Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 17 Aug 2020 12:47:26 +0300 Subject: [PATCH 048/277] Adding the rug colour options --- instat/dlgDisplayDailyData.Designer.vb | 18 + instat/dlgDisplayDailyData.resx | 865 +++++++++++++++++-------- instat/dlgDisplayDailyData.vb | 18 +- 3 files changed, 612 insertions(+), 289 deletions(-) diff --git a/instat/dlgDisplayDailyData.Designer.vb b/instat/dlgDisplayDailyData.Designer.vb index 9774cd41dd0..8a81934225a 100644 --- a/instat/dlgDisplayDailyData.Designer.vb +++ b/instat/dlgDisplayDailyData.Designer.vb @@ -57,6 +57,8 @@ Partial Class dlgDisplayDailyData Me.lblFacetby = New System.Windows.Forms.Label() Me.lblNumberOfColumns = New System.Windows.Forms.Label() Me.rdoGraphByYear = New System.Windows.Forms.RadioButton() + Me.lblGRugColour = New System.Windows.Forms.Label() + Me.ucrInputGRugColur = New instat.ucrInputComboBox() Me.ucrChkSumMissing = New instat.ucrCheck() Me.ucrChkMax = New instat.ucrCheck() Me.ucrChkIQR = New instat.ucrCheck() @@ -222,6 +224,18 @@ Partial Class dlgDisplayDailyData Me.rdoGraphByYear.Name = "rdoGraphByYear" Me.rdoGraphByYear.UseVisualStyleBackColor = True ' + 'lblGRugColour + ' + resources.ApplyResources(Me.lblGRugColour, "lblGRugColour") + Me.lblGRugColour.Name = "lblGRugColour" + ' + 'ucrInputGRugColur + ' + Me.ucrInputGRugColur.AddQuotesIfUnrecognised = True + Me.ucrInputGRugColur.IsReadOnly = False + resources.ApplyResources(Me.ucrInputGRugColur, "ucrInputGRugColur") + Me.ucrInputGRugColur.Name = "ucrInputGRugColur" + ' 'ucrChkSumMissing ' Me.ucrChkSumMissing.Checked = False @@ -447,7 +461,9 @@ Partial Class dlgDisplayDailyData ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.ucrInputGRugColur) Me.Controls.Add(Me.grpSummary) + Me.Controls.Add(Me.lblGRugColour) Me.Controls.Add(Me.ucrReceiverMultipleElements) Me.Controls.Add(Me.rdoGraphByYear) Me.Controls.Add(Me.lblElements) @@ -538,4 +554,6 @@ Partial Class dlgDisplayDailyData Friend WithEvents grpFacet As GroupBox Friend WithEvents lblScales As Label Friend WithEvents ucrInputScale As ucrInputComboBox + Friend WithEvents lblGRugColour As Label + Friend WithEvents ucrInputGRugColur As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.resx b/instat/dlgDisplayDailyData.resx index f86353c87ed..c96deff4351 100644 --- a/instat/dlgDisplayDailyData.resx +++ b/instat/dlgDisplayDailyData.resx @@ -154,7 +154,7 @@ $this - 22 + 24 Button @@ -196,7 +196,7 @@ $this - 23 + 25 True @@ -226,7 +226,7 @@ $this - 20 + 22 True @@ -256,7 +256,7 @@ $this - 19 + 21 True @@ -286,7 +286,7 @@ $this - 15 + 17 True @@ -316,7 +316,7 @@ $this - 14 + 16 True @@ -346,7 +346,7 @@ $this - 16 + 18 True @@ -378,18 +378,6 @@ 6 - - 9, 106 - - - 4, 5, 4, 5 - - - 261, 24 - - - 4 - ucrSaveGraph @@ -402,15 +390,6 @@ 0 - - 83, 70 - - - 96, 21 - - - 6 - ucrInputRugColour @@ -423,24 +402,6 @@ 1 - - True - - - NoControl - - - 9, 75 - - - 57, 13 - - - 4 - - - Rug Color: - lblRugColor @@ -453,15 +414,6 @@ 2 - - 83, 43 - - - 96, 21 - - - 2 - ucrInputBarColour @@ -474,24 +426,6 @@ 3 - - True - - - NoControl - - - 9, 48 - - - 59, 13 - - - 2 - - - Bar Colour: - lblBarColour @@ -504,18 +438,6 @@ 4 - - 83, 13 - - - 4, 4, 4, 4 - - - 50, 23 - - - 3 - ucrNudUpperYaxis @@ -550,7 +472,67 @@ $this - 6 + 8 + + + True + + + NoControl + + + 9, 75 + + + 57, 13 + + + 4 + + + Rug Color: + + + lblRugColor + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraph + + + 2 + + + True + + + NoControl + + + 9, 48 + + + 59, 13 + + + 2 + + + Bar Colour: + + + lblBarColour + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraph + + + 4 True @@ -580,16 +562,7 @@ $this - 3 - - - 16, 97 - - - 189, 20 - - - 32 + 5 ucrChkSumMissing @@ -603,15 +576,6 @@ 0 - - 16, 45 - - - 100, 20 - - - 26 - ucrChkMax @@ -624,15 +588,6 @@ 1 - - 127, 71 - - - 100, 20 - - - 30 - ucrChkIQR @@ -645,15 +600,6 @@ 2 - - 16, 71 - - - 100, 20 - - - 31 - ucrChkMedian @@ -666,15 +612,6 @@ 3 - - 16, 19 - - - 100, 20 - - - 27 - ucrChkSum @@ -687,15 +624,6 @@ 4 - - 127, 19 - - - 100, 20 - - - 29 - ucrChkMin @@ -708,15 +636,6 @@ 5 - - 127, 45 - - - 100, 20 - - - 28 - ucrChkMean @@ -751,25 +670,7 @@ $this - 0 - - - True - - - NoControl - - - 6, 16 - - - 37, 13 - - - 36 - - - Scale: + 1 lblScales @@ -783,15 +684,6 @@ 0 - - 62, 12 - - - 105, 21 - - - 35 - ucrInputScale @@ -804,29 +696,11 @@ 1 - - True + + lblFacetby - - NoControl - - - 5, 39 - - - 52, 13 - - - 32 - - - Facet By: - - - lblFacetby - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 grpFacet @@ -834,15 +708,6 @@ 2 - - 113, 86 - - - 50, 23 - - - 33 - ucrNudNumberOfColumns @@ -855,15 +720,6 @@ 3 - - 62, 37 - - - 105, 21 - - - 31 - ucrInputFacetBy @@ -876,24 +732,6 @@ 4 - - True - - - NoControl - - - 3, 87 - - - 104, 13 - - - 33 - - - Number Of Columns: - lblNumberOfColumns @@ -906,15 +744,6 @@ 5 - - 7, 64 - - - 175, 20 - - - 33 - ucrChkNumberOfColumns @@ -949,49 +778,337 @@ $this - 7 + 9 + + + True + + + NoControl + + + 6, 16 + + + 37, 13 + + + 36 + + + Scale: + + + lblScales + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFacet + + + 0 + + + True + + + NoControl + + + 5, 39 + + + 52, 13 + + + 32 + + + Facet By: + + + lblFacetby + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFacet + + + 2 + + + True + + + NoControl + + + 3, 87 + + + 104, 13 + + + 33 + + + Number Of Columns: + + + lblNumberOfColumns + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFacet + + + 5 Button - - None + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 154, 12 + + + 100, 29 + + + 23 + + + Graph by Year + + + MiddleCenter + + + rdoGraphByYear + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + True + + + NoControl + + + 11, 373 + + + 63, 13 + + + 36 + + + Rug Colour: + + + lblGRugColour + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + 77, 369 + + + 97, 21 + + + 35 + + + ucrInputGRugColur + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 + + + 16, 97 + + + 189, 20 + + + 32 + + + ucrChkSumMissing + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 0 + + + 16, 45 + + + 100, 20 + + + 26 + + + ucrChkMax + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 1 + + + 127, 71 + + + 100, 20 + + + 30 + + + ucrChkIQR + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 2 + + + 16, 70 + + + 100, 20 + + + 31 + + + ucrChkMedian + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 3 + + + 16, 19 + + + 100, 20 + + + 27 + + + ucrChkSum + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 4 + + + 127, 19 + + + 100, 20 - - MiddleCenter + + 29 - - Flat + + ucrChkMin - - NoControl + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 154, 12 + + grpSummary - - 100, 29 + + 5 - - 23 + + 127, 45 - - Graph by Year + + 100, 20 - - MiddleCenter + + 28 - - rdoGraphByYear + + ucrChkMean - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - $this + + grpSummary - - 2 + + 6 True @@ -1024,7 +1141,7 @@ $this - 4 + 6 121, 422 @@ -1045,7 +1162,7 @@ $this - 5 + 7 121, 368 @@ -1066,7 +1183,7 @@ $this - 8 + 10 121, 395 @@ -1087,7 +1204,7 @@ $this - 9 + 11 12, 371 @@ -1108,7 +1225,7 @@ $this - 10 + 12 12, 424 @@ -1129,7 +1246,7 @@ $this - 11 + 13 12, 396 @@ -1150,7 +1267,7 @@ $this - 12 + 14 289, 209 @@ -1174,7 +1291,7 @@ $this - 13 + 15 289, 166 @@ -1198,7 +1315,7 @@ $this - 17 + 19 289, 124 @@ -1222,7 +1339,7 @@ $this - 18 + 20 289, 80 @@ -1246,7 +1363,7 @@ $this - 21 + 23 54, 12 @@ -1270,7 +1387,7 @@ $this - 24 + 26 10, 43 @@ -1294,7 +1411,7 @@ $this - 25 + 27 10, 447 @@ -1318,7 +1435,7 @@ $this - 26 + 28 289, 253 @@ -1342,7 +1459,7 @@ $this - 27 + 29 NoControl @@ -1381,6 +1498,180 @@ $this + 3 + + + 9, 106 + + + 4, 5, 4, 5 + + + 261, 24 + + + 4 + + + ucrSaveGraph + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraph + + + 0 + + + 83, 70 + + + 96, 21 + + + 6 + + + ucrInputRugColour + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraph + + + 1 + + + 83, 43 + + + 96, 21 + + + 2 + + + ucrInputBarColour + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraph + + + 3 + + + 83, 13 + + + 4, 4, 4, 4 + + + 50, 23 + + + 3 + + + ucrNudUpperYaxis + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraph + + + 5 + + + 62, 12 + + + 105, 21 + + + 35 + + + ucrInputScale + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + 1 + + 113, 86 + + + 50, 23 + + + 33 + + + ucrNudNumberOfColumns + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + + 3 + + + 62, 37 + + + 105, 21 + + + 31 + + + ucrInputFacetBy + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + + 4 + + + 7, 64 + + + 175, 20 + + + 33 + + + ucrChkNumberOfColumns + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + + 6 + \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index fca62dd1054..7aa326b470c 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -50,6 +50,7 @@ Public Class dlgDisplayDailyData Dim dctBarColour As New Dictionary(Of String, String) Dim dctRugColour As New Dictionary(Of String, String) + Dim dctGRugColour As New Dictionary(Of String, String) Dim dctSummary As New Dictionary(Of String, String) Dim dctMissingvalues As New Dictionary(Of String, String) Dim dctTracevalues As New Dictionary(Of String, String) @@ -100,6 +101,17 @@ Public Class dlgDisplayDailyData ucrNudUpperYaxis.SetParameter(New RParameter("upper_limit", 9)) ucrNudUpperYaxis.SetMinMax(0, Integer.MaxValue) + + ucrInputGRugColur.SetParameter(New RParameter("colour", 1)) + dctGRugColour.Add("Blue", Chr(34) & "blue" & Chr(34)) + dctGRugColour.Add("Red", Chr(34) & "red" & Chr(34)) + dctGRugColour.Add("Yellow", Chr(34) & "yellow" & Chr(34)) + dctGRugColour.Add("Green", Chr(34) & "green" & Chr(34)) + dctGRugColour.Add("Violet", Chr(34) & "violet" & Chr(34)) + ucrInputGRugColur.SetItems(dctGRugColour) + ucrInputGRugColur.SetDropDownStyleAsEditable(True) + + ucrInputBarColour.SetParameter(New RParameter("bar_colour", 7)) dctBarColour.Add("Blue", Chr(34) & "blue" & Chr(34)) dctBarColour.Add("Red", Chr(34) & "red" & Chr(34)) @@ -202,7 +214,7 @@ Public Class dlgDisplayDailyData ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoTable, "daily_table") ucrPnlFrequencyDisplay.AddToLinkedControls(ucrNudUpperYaxis, {rdoGraphByYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=100) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrReceiverMultipleElements, ucrInputFacetBy, ucrChkNumberOfColumns}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputScale}, {rdoGraph}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputScale, ucrInputGRugColur}, {rdoGraph}, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboMissing, ucrChkMissing}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboTrace, ucrChkTrace}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboZero, ucrChkZero}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -212,6 +224,7 @@ Public Class dlgDisplayDailyData ucrChkSum.SetLinkedDisplayControl(grpSummary) ucrInputScale.SetLinkedDisplayControl(grpFacet) ucrInputScale.SetLinkedDisplayControl(lblScales) + ucrInputGRugColur.SetLinkedDisplayControl(lblGRugColour) ucrChkMissing.AddToLinkedControls({ucrInputComboMissing}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkTrace.AddToLinkedControls({ucrInputComboTrace}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="tr") @@ -283,7 +296,7 @@ Public Class dlgDisplayDailyData clsGeomRugFunction.SetPackageName("ggplot2") clsGeomRugFunction.SetRCommand("geom_rug") clsGeomRugFunction.AddParameter("data", clsROperatorParameter:=clsNAFilterOperator, iPosition:=0) - clsGeomRugFunction.AddParameter("colour", Chr(34) & "black" & Chr(34), iPosition:=1) + clsGeomRugFunction.AddParameter("colour", Chr(34) & "red" & Chr(34), iPosition:=1) clsThemeGreyFunction.SetRCommand("theme_grey") @@ -368,6 +381,7 @@ Public Class dlgDisplayDailyData ucrInputScale.SetRCode(clsFacetFunction, bReset) ucrNudNumberOfColumns.SetRCode(clsFacetFunction, bReset) ucrChkNumberOfColumns.SetRCode(clsFacetFunction, bReset) + ucrInputGRugColur.SetRCode(clsGeomRugFunction, bReset) End Sub Private Sub TestOkEnabled() From ddd79f9ea507eae33821430d4e9c9e7d07296778 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 18 Aug 2020 14:30:48 +0300 Subject: [PATCH 049/277] changed toolstrip text --- instat/frmMain.resx | 358 ++++++++++++++++++++++---------------------- 1 file changed, 179 insertions(+), 179 deletions(-) diff --git a/instat/frmMain.resx b/instat/frmMain.resx index ab9c03ee769..ad3b44dcc04 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -1209,46 +1209,46 @@ Check Data - 180, 22 + 178, 22 Inventory... - 180, 22 + 178, 22 Fill Missing Values... - 177, 6 + 175, 6 - 180, 22 + 178, 22 Display Daily... - 180, 22 + 178, 22 Boxplot... - 180, 22 + 178, 22 QC Temperatures... - 180, 22 + 178, 22 QC Rainfall... - 180, 22 + 178, 22 Homogenization... @@ -2604,99 +2604,6 @@ Data Frame - - 245, 22 - - - Visualise Data - - - 245, 22 - - - Duplicates... - - - 245, 22 - - - Compare Columns... - - - 245, 22 - - - Non-numeric Cases... - - - 242, 6 - - - 245, 22 - - - Boxplot... - - - 245, 22 - - - One Variable Summarise... - - - 245, 22 - - - One Variable Graph... - - - 245, 22 - - - One Variable Frequencies... - - - 242, 6 - - - 245, 22 - - - Export To OpenRefine... - - - 245, 22 - - - Import From OpenRefine... - - - 242, 6 - - - False - - - 245, 22 - - - Jitter... - - - False - - - 245, 22 - - - Prepare to Share (sdc package)... - - - 245, 22 - - - Anonymise ID Column... - 180, 22 @@ -2760,6 +2667,84 @@ Keys and Links + + False + + + 196, 22 + + + Data Frame Metadata... + + + 196, 22 + + + Rename Data Frame... + + + False + + + 196, 22 + + + Reorder Data Frames... + + + 196, 22 + + + Copy Data Frame... + + + 196, 22 + + + Delete Data Frames... + + + 193, 6 + + + 210, 22 + + + Hide/Show Data Frames... + + + 196, 22 + + + Metadata... + + + False + + + 196, 22 + + + Rename Metadata... + + + False + + + 196, 22 + + + Reorder Metadata... + + + False + + + 196, 22 + + + Delete Metadata... + 180, 22 @@ -3045,6 +3030,99 @@ Colour by Property... + + 245, 22 + + + Visualise Data + + + 245, 22 + + + Duplicates... + + + 245, 22 + + + Compare Columns... + + + 245, 22 + + + Non-numeric Cases... + + + 242, 6 + + + 245, 22 + + + Boxplot... + + + 245, 22 + + + One Variable Summarise... + + + 245, 22 + + + One Variable Graph... + + + 245, 22 + + + One Variable Frequencies... + + + 242, 6 + + + 245, 22 + + + Export To OpenRefine... + + + 245, 22 + + + Import From OpenRefine... + + + 242, 6 + + + False + + + 245, 22 + + + Jitter... + + + False + + + 245, 22 + + + Prepare to Share (sdc package)... + + + 245, 22 + + + Anonymise ID Column... + 179, 22 @@ -3372,84 +3450,6 @@ Add Comment... - - False - - - 196, 22 - - - Data Frame Metadata... - - - 196, 22 - - - Rename Data Frame... - - - False - - - 196, 22 - - - Reorder Data Frames... - - - 196, 22 - - - Copy Data Frame... - - - 196, 22 - - - Delete Data Frames... - - - 193, 6 - - - 196, 22 - - - Hide Dataframes... - - - 196, 22 - - - Metadata... - - - False - - - 196, 22 - - - Rename Metadata... - - - False - - - 196, 22 - - - Reorder Metadata... - - - False - - - 196, 22 - - - Delete Metadata... - 126, 22 From 9edccd3fe3698c78c7284dee738ff636c6f7ae19 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Tue, 18 Aug 2020 17:07:51 +0300 Subject: [PATCH 050/277] Changes to the functions --- instat/dlgDisplayDailyData.resx | 788 +++++++++++--------------------- instat/dlgDisplayDailyData.vb | 16 +- 2 files changed, 286 insertions(+), 518 deletions(-) diff --git a/instat/dlgDisplayDailyData.resx b/instat/dlgDisplayDailyData.resx index c96deff4351..d9169ee7068 100644 --- a/instat/dlgDisplayDailyData.resx +++ b/instat/dlgDisplayDailyData.resx @@ -378,6 +378,18 @@ 6 + + 9, 106 + + + 4, 5, 4, 5 + + + 261, 24 + + + 4 + ucrSaveGraph @@ -390,6 +402,15 @@ 0 + + 83, 70 + + + 96, 21 + + + 6 + ucrInputRugColour @@ -402,6 +423,24 @@ 1 + + True + + + NoControl + + + 9, 75 + + + 57, 13 + + + 4 + + + Rug Color: + lblRugColor @@ -414,6 +453,15 @@ 2 + + 83, 43 + + + 96, 21 + + + 2 + ucrInputBarColour @@ -426,6 +474,24 @@ 3 + + True + + + NoControl + + + 9, 48 + + + 59, 13 + + + 2 + + + Bar Colour: + lblBarColour @@ -438,6 +504,18 @@ 4 + + 83, 13 + + + 4, 4, 4, 4 + + + 50, 23 + + + 3 + ucrNudUpperYaxis @@ -474,66 +552,6 @@ 8 - - True - - - NoControl - - - 9, 75 - - - 57, 13 - - - 4 - - - Rug Color: - - - lblRugColor - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpGraph - - - 2 - - - True - - - NoControl - - - 9, 48 - - - 59, 13 - - - 2 - - - Bar Colour: - - - lblBarColour - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpGraph - - - 4 - True @@ -564,6 +582,15 @@ 5 + + 16, 97 + + + 189, 20 + + + 32 + ucrChkSumMissing @@ -576,6 +603,15 @@ 0 + + 16, 45 + + + 100, 20 + + + 26 + ucrChkMax @@ -588,6 +624,15 @@ 1 + + 127, 71 + + + 100, 20 + + + 30 + ucrChkIQR @@ -600,6 +645,15 @@ 2 + + 16, 70 + + + 100, 20 + + + 31 + ucrChkMedian @@ -612,6 +666,15 @@ 3 + + 16, 19 + + + 100, 20 + + + 27 + ucrChkSum @@ -624,6 +687,15 @@ 4 + + 127, 19 + + + 100, 20 + + + 29 + ucrChkMin @@ -636,6 +708,15 @@ 5 + + 127, 45 + + + 100, 20 + + + 28 + ucrChkMean @@ -672,6 +753,24 @@ 1 + + True + + + NoControl + + + 6, 16 + + + 37, 13 + + + 36 + + + Scale: + lblScales @@ -684,6 +783,15 @@ 0 + + 62, 12 + + + 105, 21 + + + 35 + ucrInputScale @@ -696,6 +804,24 @@ 1 + + True + + + NoControl + + + 5, 39 + + + 52, 13 + + + 32 + + + Facet By: + lblFacetby @@ -708,6 +834,15 @@ 2 + + 113, 86 + + + 50, 23 + + + 33 + ucrNudNumberOfColumns @@ -720,7 +855,16 @@ 3 - + + 62, 37 + + + 105, 21 + + + 31 + + ucrInputFacetBy @@ -732,6 +876,24 @@ 4 + + True + + + NoControl + + + 3, 87 + + + 104, 13 + + + 33 + + + Number Of Columns: + lblNumberOfColumns @@ -744,6 +906,15 @@ 5 + + 7, 64 + + + 175, 20 + + + 33 + ucrChkNumberOfColumns @@ -780,96 +951,6 @@ 9 - - True - - - NoControl - - - 6, 16 - - - 37, 13 - - - 36 - - - Scale: - - - lblScales - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFacet - - - 0 - - - True - - - NoControl - - - 5, 39 - - - 52, 13 - - - 32 - - - Facet By: - - - lblFacetby - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFacet - - - 2 - - - True - - - NoControl - - - 3, 87 - - - 104, 13 - - - 33 - - - Number Of Columns: - - - lblNumberOfColumns - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFacet - - - 5 - Button @@ -900,215 +981,68 @@ MiddleCenter - - rdoGraphByYear - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - - - True - - - NoControl - - - 11, 373 - - - 63, 13 - - - 36 - - - Rug Colour: - - - lblGRugColour - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - - 77, 369 - - - 97, 21 - - - 35 - - - ucrInputGRugColur - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 0 - - - 16, 97 - - - 189, 20 - - - 32 - - - ucrChkSumMissing - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpSummary - - - 0 - - - 16, 45 - - - 100, 20 - - - 26 - - - ucrChkMax - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpSummary - - - 1 - - - 127, 71 - - - 100, 20 - - - 30 - - - ucrChkIQR - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpSummary - - - 2 - - - 16, 70 - - - 100, 20 - - - 31 - - - ucrChkMedian - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpSummary - - - 3 - - - 16, 19 + + rdoGraphByYear - - 100, 20 + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 27 + + $this - - ucrChkSum + + 4 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + True - - grpSummary + + NoControl - - 4 + + 11, 373 - - 127, 19 + + 63, 13 - - 100, 20 + + 36 - - 29 + + Rug Colour: - - ucrChkMin + + lblGRugColour - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + $this - - 5 + + 2 - - 127, 45 + + 77, 369 - - 100, 20 + + 97, 21 - - 28 + + 35 - - ucrChkMean + + ucrInputGRugColur - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpSummary + + $this - - 6 + + 0 True @@ -1500,178 +1434,4 @@ 3 - - 9, 106 - - - 4, 5, 4, 5 - - - 261, 24 - - - 4 - - - ucrSaveGraph - - - instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpGraph - - - 0 - - - 83, 70 - - - 96, 21 - - - 6 - - - ucrInputRugColour - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpGraph - - - 1 - - - 83, 43 - - - 96, 21 - - - 2 - - - ucrInputBarColour - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpGraph - - - 3 - - - 83, 13 - - - 4, 4, 4, 4 - - - 50, 23 - - - 3 - - - ucrNudUpperYaxis - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpGraph - - - 5 - - - 62, 12 - - - 105, 21 - - - 35 - - - ucrInputScale - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpFacet - - - 1 - - - 113, 86 - - - 50, 23 - - - 33 - - - ucrNudNumberOfColumns - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpFacet - - - 3 - - - 62, 37 - - - 105, 21 - - - 31 - - - ucrInputFacetBy - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpFacet - - - 4 - - - 7, 64 - - - 175, 20 - - - 33 - - - ucrChkNumberOfColumns - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpFacet - - - 6 - \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 7aa326b470c..1f688f0e34d 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -19,6 +19,7 @@ Imports instat.Translations Public Class dlgDisplayDailyData Private iBasicHeight As Integer Private iBaseMaxY As Integer + Private iSaveYLocation As Integer Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private lstCheckboxes As New List(Of ucrCheck) @@ -27,12 +28,14 @@ Public Class dlgDisplayDailyData Private clsIdVarsFunction, clsFacetFunction, clsGgplotAesFunction, clsGGplotElementText, clsXLabFunction As New RFunction Private clsGgPlotOperator, clsDisplayDailyGraphOperator, clsDisplayDailyTableOperator, clsNAFilterOperator As New ROperator Private clsStationElemFacetOperator As New ROperator + Private clsLabelWrapGenFunction As New RFunction Private Sub dlgDisplayDailyData_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) If bFirstLoad Then iBasicHeight = Me.Height iBaseMaxY = ucrBase.Location.Y + iSaveYLocation = ucrSaveGraph.Location.Y InitialiseDialog() bFirstLoad = False End If @@ -252,6 +255,7 @@ Public Class dlgDisplayDailyData clsFacetFunction = New RFunction clsXLabFunction = New RFunction clsStationElemFacetOperator = New ROperator + clsLabelWrapGenFunction = New RFunction ucrNudNumberOfColumns.SetText("1") @@ -261,6 +265,9 @@ Public Class dlgDisplayDailyData clsXLabFunction.SetRCommand("xlab") clsXLabFunction.AddParameter("label", "NULL", iPosition:=0, bIncludeArgumentName:=False) + clsLabelWrapGenFunction.SetRCommand("label_wrap_gen") + clsLabelWrapGenFunction.AddParameter("multi_line", "FALSE", iPosition:=0) + clsFacetFunction.SetPackageName("ggplot2") clsFacetFunction.SetRCommand("facet_wrap") @@ -377,6 +384,7 @@ Public Class dlgDisplayDailyData ucrReceiverElement.SetRCode(clsDisplayDailyTable, bReset) ucrReceiverElement.AddAdditionalCodeParameterPair(clsDisplayDailyGraphFunction, New RParameter("climatic_element", 1), iAdditionalPairNo:=1) ucrSaveGraph.SetRCode(clsDisplayDailyGraphFunction, bReset) + ucrSaveGraph.AddAdditionalRCode(clsGgPlotOperator) ucrPnlFrequencyDisplay.SetRCode(ucrBase.clsRsyntax.clsBaseOperator, bReset) ucrInputScale.SetRCode(clsFacetFunction, bReset) ucrNudNumberOfColumns.SetRCode(clsFacetFunction, bReset) @@ -406,7 +414,7 @@ Public Class dlgDisplayDailyData If rdoGraphByYear.Checked Then Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight * 0.86) ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY / 1.2) - ElseIf rdoTable.Checked Then + ElseIf rdoTable.Checked OrElse rdoGraph.Checked Then Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY) End If @@ -461,7 +469,7 @@ Public Class dlgDisplayDailyData End If End Sub - Private Sub ucrReceiverMultipleElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleElements.ControlContentsChanged, ucrReceiverStations.ControlValueChanged + Private Sub ucrReceiverMultipleElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleElements.ControlValueChanged, ucrReceiverStations.ControlValueChanged SetFacetItems() StackingFunction() End Sub @@ -470,7 +478,7 @@ Public Class dlgDisplayDailyData clsGgplotAesFunction.AddParameter("x", ucrReceiverDate.GetVariableNames(False), iPosition:=0) End Sub - Private Sub ucrReceiverDate_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverStations.ControlContentsChanged, ucrReceiverDayOfYear.ControlContentsChanged, ucrReceiverMultipleElements.ControlValueChanged, ucrNudUpperYaxis.ControlContentsChanged, ucrInputRugColour.ControlContentsChanged, ucrInputBarColour.ControlContentsChanged, ucrPnlFrequencyDisplay.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrChkSum.ControlContentsChanged, ucrChkMax.ControlContentsChanged, ucrChkMin.ControlContentsChanged, ucrChkMean.ControlContentsChanged, ucrChkMedian.ControlContentsChanged, ucrChkIQR.ControlContentsChanged, ucrChkSumMissing.ControlContentsChanged + Private Sub ucrReceiverDate_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverStations.ControlContentsChanged, ucrReceiverDayOfYear.ControlContentsChanged, ucrReceiverMultipleElements.ControlContentsChanged, ucrNudUpperYaxis.ControlContentsChanged, ucrInputRugColour.ControlContentsChanged, ucrInputBarColour.ControlContentsChanged, ucrPnlFrequencyDisplay.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrChkSum.ControlContentsChanged, ucrChkMax.ControlContentsChanged, ucrChkMin.ControlContentsChanged, ucrChkMean.ControlContentsChanged, ucrChkMedian.ControlContentsChanged, ucrChkIQR.ControlContentsChanged, ucrChkSumMissing.ControlContentsChanged TestOkEnabled() End Sub '''-------------------------------------------------------------------------------------------- @@ -519,7 +527,7 @@ Public Class dlgDisplayDailyData End Select If ucrInputFacetBy.GetText() = "Station-Element" OrElse ucrInputFacetBy.GetText() = "Element-Station" Then - clsFacetFunction.AddParameter("labeller", "label_wrap_gen(multi_line=FALSE)", iPosition:=3) + clsFacetFunction.AddParameter("labeller", clsRFunctionParameter:=clsLabelWrapGenFunction, iPosition:=3) Else clsFacetFunction.RemoveParameterByName("labeller") End If From 20b146ae9aa9b54dc640f1df2091952db42c8648 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 20 Aug 2020 09:40:13 +0300 Subject: [PATCH 051/277] Setting the test Ok for the calculator --- instat/dlgCalculator.vb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 0459d1da937..06b4f3012a5 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -40,15 +40,7 @@ Public Class dlgCalculator End Sub Private Sub TestOKEnabled() - If Not ucrCalc.ucrReceiverForCalculation.IsEmpty Then - If ucrCalc.ucrSaveResultInto.IsComplete Then - ucrBase.OKEnabled(True) - Else - ucrBase.OKEnabled(False) - End If - Else - ucrBase.OKEnabled(False) - End If + ucrBase.OKEnabled(Not ucrCalc.ucrReceiverForCalculation.IsEmpty AndAlso ucrCalc.ucrSaveResultInto.IsComplete) End Sub Private Sub SetDefaults() From 35f6bbc72334190d00d5ed2faa608487ecb49ce1 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Thu, 20 Aug 2020 11:50:35 +0300 Subject: [PATCH 052/277] Adding the save control and removing unwanted code --- instat/dlgDisplayDailyData.Designer.vb | 2 +- instat/dlgDisplayDailyData.resx | 648 ++++++++++++++++--------- instat/dlgDisplayDailyData.vb | 11 +- 3 files changed, 419 insertions(+), 242 deletions(-) diff --git a/instat/dlgDisplayDailyData.Designer.vb b/instat/dlgDisplayDailyData.Designer.vb index 8a81934225a..3cdac09881e 100644 --- a/instat/dlgDisplayDailyData.Designer.vb +++ b/instat/dlgDisplayDailyData.Designer.vb @@ -147,7 +147,6 @@ Partial Class dlgDisplayDailyData ' 'grpGraph ' - Me.grpGraph.Controls.Add(Me.ucrSaveGraph) Me.grpGraph.Controls.Add(Me.ucrInputRugColour) Me.grpGraph.Controls.Add(Me.lblRugColor) Me.grpGraph.Controls.Add(Me.ucrInputBarColour) @@ -461,6 +460,7 @@ Partial Class dlgDisplayDailyData ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.ucrSaveGraph) Me.Controls.Add(Me.ucrInputGRugColur) Me.Controls.Add(Me.grpSummary) Me.Controls.Add(Me.lblGRugColour) diff --git a/instat/dlgDisplayDailyData.resx b/instat/dlgDisplayDailyData.resx index d9169ee7068..9aa87de5a68 100644 --- a/instat/dlgDisplayDailyData.resx +++ b/instat/dlgDisplayDailyData.resx @@ -154,7 +154,7 @@ $this - 24 + 25 Button @@ -196,7 +196,7 @@ $this - 25 + 26 True @@ -226,7 +226,7 @@ $this - 22 + 23 True @@ -256,7 +256,7 @@ $this - 21 + 22 True @@ -286,7 +286,7 @@ $this - 17 + 18 True @@ -316,7 +316,7 @@ $this - 16 + 17 True @@ -346,7 +346,7 @@ $this - 18 + 19 True @@ -376,31 +376,7 @@ grpGraph - 6 - - - 9, 106 - - - 4, 5, 4, 5 - - - 261, 24 - - - 4 - - - ucrSaveGraph - - - instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpGraph - - - 0 + 5 83, 70 @@ -421,7 +397,7 @@ grpGraph - 1 + 0 True @@ -451,7 +427,7 @@ grpGraph - 2 + 1 83, 43 @@ -472,7 +448,7 @@ grpGraph - 3 + 2 True @@ -502,7 +478,7 @@ grpGraph - 4 + 3 83, 13 @@ -526,13 +502,13 @@ grpGraph - 5 + 4 - 9, 228 + 11, 228 - 276, 137 + 234, 118 21 @@ -550,7 +526,7 @@ $this - 8 + 9 True @@ -580,16 +556,7 @@ $this - 5 - - - 16, 97 - - - 189, 20 - - - 32 + 6 ucrChkSumMissing @@ -603,15 +570,6 @@ 0 - - 16, 45 - - - 100, 20 - - - 26 - ucrChkMax @@ -624,15 +582,6 @@ 1 - - 127, 71 - - - 100, 20 - - - 30 - ucrChkIQR @@ -645,15 +594,6 @@ 2 - - 16, 70 - - - 100, 20 - - - 31 - ucrChkMedian @@ -666,15 +606,6 @@ 3 - - 16, 19 - - - 100, 20 - - - 27 - ucrChkSum @@ -687,15 +618,6 @@ 4 - - 127, 19 - - - 100, 20 - - - 29 - ucrChkMin @@ -708,15 +630,6 @@ 5 - - 127, 45 - - - 100, 20 - - - 28 - ucrChkMean @@ -730,7 +643,7 @@ 6 - 13, 233 + 10, 229 235, 133 @@ -751,25 +664,7 @@ $this - 1 - - - True - - - NoControl - - - 6, 16 - - - 37, 13 - - - 36 - - - Scale: + 2 lblScales @@ -783,15 +678,6 @@ 0 - - 62, 12 - - - 105, 21 - - - 35 - ucrInputScale @@ -804,24 +690,6 @@ 1 - - True - - - NoControl - - - 5, 39 - - - 52, 13 - - - 32 - - - Facet By: - lblFacetby @@ -834,15 +702,6 @@ 2 - - 113, 86 - - - 50, 23 - - - 33 - ucrNudNumberOfColumns @@ -855,15 +714,6 @@ 3 - - 62, 37 - - - 105, 21 - - - 31 - ucrInputFacetBy @@ -876,24 +726,6 @@ 4 - - True - - - NoControl - - - 3, 87 - - - 104, 13 - - - 33 - - - Number Of Columns: - lblNumberOfColumns @@ -906,15 +738,6 @@ 5 - - 7, 64 - - - 175, 20 - - - 33 - ucrChkNumberOfColumns @@ -928,10 +751,10 @@ 6 - 7, 228 + 12, 228 - 188, 132 + 188, 124 34 @@ -949,49 +772,139 @@ $this - 9 + 10 - - Button + + True - - None + + NoControl - - MiddleCenter + + 6, 16 - - Flat + + 37, 13 - - NoControl + + 36 - - 154, 12 + + Scale: - - 100, 29 + + lblScales - - 23 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Graph by Year + + grpFacet - - MiddleCenter + + 0 - - rdoGraphByYear + + True - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl + + + 5, 39 + + + 52, 13 + + + 32 + + + Facet By: + + + lblFacetby + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFacet + + + 2 + + + True + + + NoControl + + + 3, 87 + + + 104, 13 + + + 33 + + + Number Of Columns: + + + lblNumberOfColumns + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFacet + + + 5 + + + Button + + + None + + + MiddleCenter + + + Flat + + + NoControl + + + 154, 12 + + + 100, 29 + + + 23 + + + Graph by Year + + + MiddleCenter + + + rdoGraphByYear + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 $this - 4 + 5 True @@ -1021,7 +934,7 @@ $this - 2 + 3 77, 369 @@ -1042,8 +955,155 @@ $this + 1 + + + 16, 97 + + + 189, 20 + + + 32 + + + ucrChkSumMissing + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + 0 + + 16, 45 + + + 100, 20 + + + 26 + + + ucrChkMax + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 1 + + + 127, 71 + + + 100, 20 + + + 30 + + + ucrChkIQR + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 2 + + + 16, 70 + + + 100, 20 + + + 31 + + + ucrChkMedian + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 3 + + + 16, 19 + + + 100, 20 + + + 27 + + + ucrChkSum + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 4 + + + 127, 19 + + + 100, 20 + + + 29 + + + ucrChkMin + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 5 + + + 127, 45 + + + 100, 20 + + + 28 + + + ucrChkMean + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpSummary + + + 6 + True @@ -1053,6 +1113,30 @@ 423, 514 + + 10, 419 + + + 4, 5, 4, 5 + + + 261, 24 + + + 4 + + + ucrSaveGraph + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 + 289, 253 @@ -1075,7 +1159,7 @@ $this - 6 + 7 121, 422 @@ -1096,7 +1180,7 @@ $this - 7 + 8 121, 368 @@ -1117,7 +1201,7 @@ $this - 10 + 11 121, 395 @@ -1138,7 +1222,7 @@ $this - 11 + 12 12, 371 @@ -1159,7 +1243,7 @@ $this - 12 + 13 12, 424 @@ -1180,7 +1264,7 @@ $this - 13 + 14 12, 396 @@ -1201,7 +1285,7 @@ $this - 14 + 15 289, 209 @@ -1225,7 +1309,7 @@ $this - 15 + 16 289, 166 @@ -1249,7 +1333,7 @@ $this - 19 + 20 289, 124 @@ -1273,7 +1357,7 @@ $this - 20 + 21 289, 80 @@ -1297,7 +1381,7 @@ $this - 23 + 24 54, 12 @@ -1321,7 +1405,7 @@ $this - 26 + 27 10, 43 @@ -1345,7 +1429,7 @@ $this - 27 + 28 10, 447 @@ -1369,7 +1453,7 @@ $this - 28 + 29 289, 253 @@ -1393,7 +1477,7 @@ $this - 29 + 30 NoControl @@ -1432,6 +1516,90 @@ $this + 4 + + + 62, 12 + + + 105, 21 + + + 35 + + + ucrInputScale + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + + 1 + + + 113, 86 + + + 50, 23 + + + 33 + + + ucrNudNumberOfColumns + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + 3 + + 62, 37 + + + 105, 21 + + + 31 + + + ucrInputFacetBy + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + + 4 + + + 7, 64 + + + 175, 20 + + + 33 + + + ucrChkNumberOfColumns + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpFacet + + + 6 + \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 1f688f0e34d..e7cb61a3d83 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -112,7 +112,6 @@ Public Class dlgDisplayDailyData dctGRugColour.Add("Green", Chr(34) & "green" & Chr(34)) dctGRugColour.Add("Violet", Chr(34) & "violet" & Chr(34)) ucrInputGRugColur.SetItems(dctGRugColour) - ucrInputGRugColur.SetDropDownStyleAsEditable(True) ucrInputBarColour.SetParameter(New RParameter("bar_colour", 7)) @@ -222,6 +221,7 @@ Public Class dlgDisplayDailyData ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboTrace, ucrChkTrace}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboZero, ucrChkZero}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls(ucrChkSum, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencyDisplay.AddToLinkedControls(ucrSaveGraph, {rdoGraph, rdoGraphByYear}, bNewLinkedHideIfParameterMissing:=True) ucrChkNumberOfColumns.AddToLinkedControls(ucrNudNumberOfColumns, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) ucrNudNumberOfColumns.SetLinkedDisplayControl(lblNumberOfColumns) ucrChkSum.SetLinkedDisplayControl(grpSummary) @@ -414,14 +414,23 @@ Public Class dlgDisplayDailyData If rdoGraphByYear.Checked Then Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight * 0.86) ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY / 1.2) + ucrSaveGraph.Location = New Point(ucrSaveGraph.Location.X, iSaveYLocation / 1.2) ElseIf rdoTable.Checked OrElse rdoGraph.Checked Then Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY) + If rdoGraph.Checked Then + ucrSaveGraph.Location = New Point(ucrSaveGraph.Location.X, iSaveYLocation) + End If End If End Sub Private Sub ucrPnlFrequencyDisplay_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlFrequencyDisplay.ControlValueChanged DialogSize() + If rdoGraphByYear.Checked Then + ucrSaveGraph.SetPrefix("Graph_by_Year") + ElseIf rdoGraph.checked Then + ucrSaveGraph.SetPrefix("Graph") + End If If rdoGraph.Checked Then ucrBase.clsRsyntax.iCallType = 3 ucrReceiverMultipleElements.SetMeAsReceiver() From d77761b0e911dc695d9a916529bb385d09329c90 Mon Sep 17 00:00:00 2001 From: Lily Clements Date: Fri, 21 Aug 2020 13:41:53 +0100 Subject: [PATCH 053/277] Non numerical values design --- instat/dlgFindNonnumericValues.Designer.vb | 2 +- instat/dlgFindNonnumericValues.resx | 160 +++++++++++++-------- 2 files changed, 105 insertions(+), 57 deletions(-) diff --git a/instat/dlgFindNonnumericValues.Designer.vb b/instat/dlgFindNonnumericValues.Designer.vb index 4b2549d3bfd..f788c8071bc 100644 --- a/instat/dlgFindNonnumericValues.Designer.vb +++ b/instat/dlgFindNonnumericValues.Designer.vb @@ -89,7 +89,6 @@ Partial Class dlgFindNonnumericValues ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.lblColumnName) Me.Controls.Add(Me.ucrInputColumnName) Me.Controls.Add(Me.ucrChkFilterNonumerics) Me.Controls.Add(Me.ucrChkShowSummary) @@ -97,6 +96,7 @@ Partial Class dlgFindNonnumericValues Me.Controls.Add(Me.ucrReceiverColumn) Me.Controls.Add(Me.ucrSelectorShowNonNumericValues) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.lblColumnName) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MinimizeBox = False Me.Name = "dlgFindNonnumericValues" diff --git a/instat/dlgFindNonnumericValues.resx b/instat/dlgFindNonnumericValues.resx index a97aeb88196..d9cb02bcee9 100644 --- a/instat/dlgFindNonnumericValues.resx +++ b/instat/dlgFindNonnumericValues.resx @@ -127,7 +127,7 @@ - 240, 48 + 240, 45 94, 13 @@ -148,13 +148,13 @@ $this - 4 + 3 - 234, 226 + 10, 222 - 125, 20 + 314, 20 4 @@ -169,10 +169,10 @@ $this - 2 + 1 - 10, 226 + 10, 196 125, 20 @@ -190,7 +190,7 @@ $this - 3 + 2 True @@ -199,19 +199,43 @@ 6, 13 - 416, 352 + 417, 333 - - 10, 262 + + ucrInputColumnName - - 118, 13 + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + + $this + + + 0 + + + ucrSelectorShowNonNumericValues + + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + 5 - - Logical column: + + ucrBase + + + instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 6 lblColumnName @@ -223,31 +247,46 @@ $this - 0 + 7 - - 134, 259 + + CenterScreen - - 137, 21 + + Find Non-Numeric Values - - 6 + + dlgFindNonnumericValues - - ucrInputColumnName + + System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 240, 60 - + + 0, 0, 0, 0 + + + 120, 20 + + + 2 + + + ucrReceiverColumn + + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + $this - - 1 + + 4 - 9, 28 + 10, 10 0, 0, 0, 0 @@ -268,10 +307,10 @@ $this - 6 + 5 - 10, 292 + 10, 274 410, 52 @@ -289,42 +328,51 @@ $this - 7 + 6 - - CenterScreen + + 92, 247 - - Find non numeric values + + 137, 21 - - dlgFindNonnumericValues + + 6 - - System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ucrInputColumnName - - 240, 64 + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 0, 0, 0, 0 + + $this - - 120, 20 + + 0 - - 2 + + 7, 250 - - ucrReceiverColumn + + 90, 18 - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5 - + + Logical Column: + + + lblColumnName + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 5 + + 7 \ No newline at end of file From 8df10e34b1bc0a2e0621a48bcab60c1bb4a8a917 Mon Sep 17 00:00:00 2001 From: Lily Clements Date: Fri, 21 Aug 2020 13:51:39 +0100 Subject: [PATCH 054/277] dlgCombine design changes --- instat/dlgCombine.resx | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/instat/dlgCombine.resx b/instat/dlgCombine.resx index 13a3c7a109f..59e4d954a60 100644 --- a/instat/dlgCombine.resx +++ b/instat/dlgCombine.resx @@ -123,7 +123,7 @@ - 273, 34 + 267, 44 100, 15 @@ -154,13 +154,13 @@ NoControl - 266, 188 + 264, 194 56, 13 - 8 + 4 Separator: @@ -178,13 +178,13 @@ 0 - 273, 216 + 267, 219 133, 20 - 7 + 6 ucrChkLexOrder @@ -199,13 +199,13 @@ 1 - 359, 180 + 321, 192 87, 21 - 6 + 5 ucrInputSeparator @@ -220,13 +220,16 @@ 2 - 10, 245 + 10, 246 + + + 4, 5, 4, 5 294, 24 - 4 + 7 ucrNewColName @@ -241,7 +244,7 @@ 3 - 273, 153 + 267, 165 133, 20 @@ -268,7 +271,7 @@ 410, 52 - 5 + 8 ucrBase @@ -289,7 +292,7 @@ 6, 13 - 452, 333 + 420, 333 10, 10 @@ -328,7 +331,7 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 273, 50 + 267, 60 0, 0, 0, 0 From 21e847cb711f77aca965c13453a0e7b42b8f7457 Mon Sep 17 00:00:00 2001 From: Lily Clements Date: Fri, 21 Aug 2020 13:59:34 +0100 Subject: [PATCH 055/277] dlgPolynomials design --- instat/dlgPolynomials.resx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/instat/dlgPolynomials.resx b/instat/dlgPolynomials.resx index 741601bc972..3e6f40bbefe 100644 --- a/instat/dlgPolynomials.resx +++ b/instat/dlgPolynomials.resx @@ -123,7 +123,7 @@ - 258, 93 + 248, 93 45, 13 @@ -259,7 +259,7 @@ 3 - 258, 119 + 248, 119 120, 98 @@ -283,7 +283,7 @@ 1 - 328, 90 + 318, 90 50, 20 @@ -306,8 +306,11 @@ 10, 222 + + 4, 5, 4, 5 + - 254, 24 + 358, 24 6 @@ -361,7 +364,7 @@ True - 258, 45 + 248, 45 93, 13 @@ -418,7 +421,7 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 258, 60 + 248, 60 0, 0, 0, 0 From 0b873946b7e043a61cbee22c894b94d05925b12e Mon Sep 17 00:00:00 2001 From: Lily Clements Date: Fri, 21 Aug 2020 14:05:15 +0100 Subject: [PATCH 056/277] dlgPermuteColumn design changes --- instat/dlgPermuteColumn.resx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/instat/dlgPermuteColumn.resx b/instat/dlgPermuteColumn.resx index 4d5c020036b..0290af232a2 100644 --- a/instat/dlgPermuteColumn.resx +++ b/instat/dlgPermuteColumn.resx @@ -195,7 +195,7 @@ 0 - 363, 88 + 359, 88 50, 20 @@ -216,7 +216,7 @@ 1 - 363, 117 + 359, 117 50, 20 @@ -237,10 +237,14 @@ 2 - 10, 199 + 10, 196 + + + + 4, 5, 4, 5 - 294, 24 + 336, 24 7 @@ -269,7 +273,6 @@ 10, 10 - 0, 0, 0, 0 From f62f58e3821778aed0be0086be5d0be25acbb2e1 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 10:39:40 +0300 Subject: [PATCH 057/277] Proper setting of the prefix names to the calculator save control --- instat/dlgCalculator.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 06b4f3012a5..c2ea0da234e 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -44,7 +44,6 @@ Public Class dlgCalculator End Sub Private Sub SetDefaults() - ucrCalc.ucrSaveResultInto.SetPrefix("Calc") ucrCalc.ucrInputCalOptions.SetName("Basic") ucrCalc.Reset() ucrCalc.chkShowParameters.Checked = False @@ -72,10 +71,10 @@ Public Class dlgCalculator ucrBase.clsRsyntax.AddToBeforeCodes(clsAttach) ucrBase.clsRsyntax.AddToAfterCodes(clsDetach) ucrBase.clsRsyntax.SetCommandString("") + ucrCalc.ucrSaveResultInto.SetPrefix("Calc") ucrCalc.ucrSaveResultInto.SetSaveTypeAsColumn() ucrCalc.ucrSaveResultInto.SetIsTextBox() ucrCalc.ucrSaveResultInto.SetLabelText("Save Result Into:") - ucrCalc.ucrSaveResultInto.SetAssignToBooleans(bTempAssignToIsPrefix:=True) ucrCalc.ucrSaveResultInto.SetDataFrameSelector(ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames) ucrCalc.ucrSelectorForCalculations.Reset() ucrCalc.ucrTryCalculator.StrvecOutputRequired() From 27958d633168b91839192daac74d797287be616e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 11:01:17 +0300 Subject: [PATCH 058/277] Proper setting of the save control to the calculator --- instat/dlgCalculator.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index c2ea0da234e..6ef5c2785c3 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -46,6 +46,8 @@ Public Class dlgCalculator Private Sub SetDefaults() ucrCalc.ucrInputCalOptions.SetName("Basic") ucrCalc.Reset() + ucrCalc.ucrSelectorForCalculations.Reset() + ucrCalc.ucrSaveResultInto.Reset() ucrCalc.chkShowParameters.Checked = False ucrCalc.ucrSaveResultInto.SetRCode(ucrBase.clsRsyntax.clsBaseCommandString) SaveResults() @@ -76,7 +78,6 @@ Public Class dlgCalculator ucrCalc.ucrSaveResultInto.SetIsTextBox() ucrCalc.ucrSaveResultInto.SetLabelText("Save Result Into:") ucrCalc.ucrSaveResultInto.SetDataFrameSelector(ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames) - ucrCalc.ucrSelectorForCalculations.Reset() ucrCalc.ucrTryCalculator.StrvecOutputRequired() End Sub From 0ebde8882dbce30a5a848844829cb181018e80ba Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 11:33:55 +0300 Subject: [PATCH 059/277] Resizing the save control on the calculator --- instat/ucrCalculator.Designer.vb | 12 +- instat/ucrCalculator.resx | 12255 +++++++++++++++++++---------- 2 files changed, 8022 insertions(+), 4245 deletions(-) diff --git a/instat/ucrCalculator.Designer.vb b/instat/ucrCalculator.Designer.vb index f93bdc5e3ac..209feee5350 100644 --- a/instat/ucrCalculator.Designer.vb +++ b/instat/ucrCalculator.Designer.vb @@ -388,11 +388,11 @@ Partial Class ucrCalculator Me.cmdD = New System.Windows.Forms.Button() Me.cmdCp = New System.Windows.Forms.Button() Me.cmdBr2 = New System.Windows.Forms.Button() + Me.ucrSaveResultInto = New instat.ucrSave() Me.ucrTryCalculator = New instat.ucrTry() Me.ucrInputCalOptions = New instat.ucrInputComboBox() Me.ucrSelectorForCalculations = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverForCalculation = New instat.ucrReceiverExpression() - Me.ucrSaveResultInto = New instat.ucrSave() Me.grpBasic.SuspendLayout() Me.grpDates.SuspendLayout() Me.grpTransform.SuspendLayout() @@ -2841,6 +2841,11 @@ Partial Class ucrCalculator Me.cmdBr2.Name = "cmdBr2" Me.cmdBr2.UseVisualStyleBackColor = True ' + 'ucrSaveResultInto + ' + resources.ApplyResources(Me.ucrSaveResultInto, "ucrSaveResultInto") + Me.ucrSaveResultInto.Name = "ucrSaveResultInto" + ' 'ucrTryCalculator ' resources.ApplyResources(Me.ucrTryCalculator, "ucrTryCalculator") @@ -2870,11 +2875,6 @@ Partial Class ucrCalculator Me.ucrReceiverForCalculation.strNcFilePath = "" Me.ucrReceiverForCalculation.ucrSelector = Nothing ' - 'ucrSaveResultInto - ' - resources.ApplyResources(Me.ucrSaveResultInto, "ucrSaveResultInto") - Me.ucrSaveResultInto.Name = "ucrSaveResultInto" - ' 'ucrCalculator ' resources.ApplyResources(Me, "$this") diff --git a/instat/ucrCalculator.resx b/instat/ucrCalculator.resx index d776b325127..fac14925a82 100644 --- a/instat/ucrCalculator.resx +++ b/instat/ucrCalculator.resx @@ -127,13 +127,10 @@ - 8, 10 - - - 2, 0, 2, 0 + 11, 12 - 58, 13 + 77, 17 119 @@ -157,10 +154,13 @@ NoControl - 311, 228 + 415, 281 + + + 4, 4, 4, 4 - 75, 23 + 100, 28 182 @@ -187,10 +187,13 @@ NoControl - 70, 41 + 93, 50 + + + 4, 4, 4, 4 - 109, 17 + 141, 21 181 @@ -210,24 +213,6 @@ 16 - - NoControl - - - 151, 71 - - - 2, 3, 2, 3 - - - 49, 60 - - - 190 - - - Clear - cmdClear @@ -240,27 +225,6 @@ 0 - - Microsoft Sans Serif, 12pt - - - NoControl - - - 3, 100 - - - 2, 3, 2, 3 - - - 38, 30 - - - 138 - - - , - cmdComma @@ -273,24 +237,6 @@ 1 - - NoControl - - - 77, 100 - - - 2, 3, 2, 3 - - - 38, 30 - - - 136 - - - ( ) - cmdBrackets @@ -303,27 +249,6 @@ 2 - - Microsoft Sans Serif, 14.25pt - - - NoControl - - - 151, 42 - - - 2, 3, 2, 3 - - - 49, 30 - - - 133 - - - ^ - cmdPower @@ -336,27 +261,6 @@ 3 - - Microsoft Sans Serif, 14.25pt - - - NoControl - - - 114, 13 - - - 2, 3, 2, 3 - - - 38, 30 - - - 131 - - - / - cmdDivide @@ -369,27 +273,6 @@ 4 - - Microsoft Sans Serif, 14.25pt - - - NoControl - - - 114, 100 - - - 2, 3, 2, 3 - - - 38, 30 - - - 130 - - - + - cmdPlus @@ -402,27 +285,6 @@ 5 - - Microsoft Sans Serif, 14.25pt - - - NoControl - - - 114, 71 - - - 2, 3, 2, 3 - - - 38, 30 - - - 129 - - - - - cmdMinus @@ -435,27 +297,6 @@ 6 - - Microsoft Sans Serif, 14.25pt - - - NoControl - - - 114, 42 - - - 2, 3, 2, 3 - - - 38, 30 - - - 128 - - - * - cmdMultiply @@ -468,27 +309,6 @@ 7 - - Microsoft Sans Serif, 14.25pt - - - NoControl - - - 151, 13 - - - 2, 3, 2, 3 - - - 49, 30 - - - 127 - - - . - cmdDot @@ -501,24 +321,6 @@ 8 - - NoControl - - - 77, 13 - - - 2, 3, 2, 3 - - - 38, 30 - - - 126 - - - 9 - cmd9 @@ -531,24 +333,6 @@ 9 - - NoControl - - - 40, 13 - - - 2, 3, 2, 3 - - - 38, 30 - - - 125 - - - 8 - cmd8 @@ -561,24 +345,6 @@ 10 - - NoControl - - - 3, 13 - - - 2, 3, 2, 3 - - - 38, 30 - - - 124 - - - 7 - cmd7 @@ -591,24 +357,6 @@ 11 - - NoControl - - - 77, 42 - - - 2, 3, 2, 3 - - - 38, 30 - - - 123 - - - 6 - cmd6 @@ -621,24 +369,6 @@ 12 - - NoControl - - - 40, 42 - - - 2, 3, 2, 3 - - - 38, 30 - - - 122 - - - 5 - cmd5 @@ -651,24 +381,6 @@ 13 - - NoControl - - - 3, 42 - - - 2, 3, 2, 3 - - - 38, 30 - - - 121 - - - 4 - cmd4 @@ -681,26 +393,8 @@ 14 - - NoControl - - - 77, 71 - - - 2, 3, 2, 3 - - - 38, 30 - - - 120 - - - 3 - - - cmd3 + + cmd3 System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -711,24 +405,6 @@ 15 - - NoControl - - - 40, 71 - - - 2, 3, 2, 3 - - - 38, 30 - - - 119 - - - 2 - cmd2 @@ -741,24 +417,6 @@ 16 - - NoControl - - - 40, 100 - - - 2, 3, 2, 3 - - - 38, 30 - - - 118 - - - 0 - cmd0 @@ -771,24 +429,6 @@ 17 - - NoControl - - - 3, 71 - - - 2, 3, 2, 3 - - - 38, 30 - - - 117 - - - 1 - cmd1 @@ -802,16 +442,16 @@ 18 - 223, 66 + 297, 81 - 2, 3, 2, 3 + 3, 4, 3, 4 - 2, 3, 2, 3 + 3, 4, 3, 4 - 205, 134 + 273, 165 179 @@ -831,4964 +471,7904 @@ 18 - + NoControl - - 122, 158 + + 201, 87 - - 60, 30 + + 3, 4, 3, 4 - - 157 + + 65, 74 - - quarter + + 190 - - cmdQuarter + + Clear - + + cmdClear + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 0 - + + Microsoft Sans Serif, 12pt + + NoControl - - 63, 158 + + 4, 123 - - 60, 30 + + 3, 4, 3, 4 - - 156 + + 51, 37 - - d_in_m + + 138 - - cmdD_In_M + + , - + + cmdComma + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 1 - + NoControl - - 4, 158 + + 103, 123 - - 60, 30 + + 3, 4, 3, 4 - - 155 + + 51, 37 - - am + + 136 - - cmdAm + + ( ) - + + cmdBrackets + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 2 - + + Microsoft Sans Serif, 14.25pt + + NoControl - - 122, 129 + + 201, 52 - - 60, 30 + + 3, 4, 3, 4 - - 154 + + 65, 37 - - sec + + 133 - - cmdSec + + ^ - + + cmdPower + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 3 - + + Microsoft Sans Serif, 14.25pt + + NoControl - - 4, 129 + + 152, 16 - - 60, 30 + + 3, 4, 3, 4 - - 153 + + 51, 37 - - hour + + 131 - - cmdHour + + / - + + cmdDivide + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 4 - + + Microsoft Sans Serif, 14.25pt + + NoControl - - 63, 129 + + 152, 123 - - 60, 30 + + 3, 4, 3, 4 - - 152 + + 51, 37 - - min + + 130 - - cmdminutes + + + - + + cmdPlus + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 5 - - NoControl + + Microsoft Sans Serif, 14.25pt - - 4, 71 + + NoControl - - 2, 3, 2, 3 + + 152, 87 - - 60, 30 + + 3, 4, 3, 4 - - 151 + + 51, 37 - - dmy + + 129 - - cmdDmy + + - - + + cmdMinus + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 6 - + + Microsoft Sans Serif, 14.25pt + + NoControl - - 122, 100 + + 152, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 150 + + 128 - - dek + + * - - cmdDek + + cmdMultiply - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 7 - + + Microsoft Sans Serif, 14.25pt + + NoControl - - 122, 13 + + 201, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 65, 37 - - 145 + + 127 - - day + + . - - cmdDay + + cmdDot - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 8 - + NoControl - - 63, 13 + + 103, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 144 + + 126 - - month + + 9 - - cmdMonth + + cmd9 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 9 - + NoControl - - 4, 13 + + 53, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 143 + + 125 - - year + + 8 - - cmdYear + + cmd8 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 10 - + NoControl - - 122, 42 + + 4, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 142 + + 124 - - date + + 7 - - cmdDate + + cmd7 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 11 - + NoControl - - 63, 42 + + 103, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 141 + + 123 - - yday + + 6 - - cmdYday + + cmd6 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 12 - + NoControl - - 4, 42 + + 53, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 140 + + 122 - - wday + + 5 - - cmdWday + + cmd5 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 13 - + NoControl - - 122, 71 + + 4, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 139 + + 121 - - mdy + + 4 - - cmdMdy + + cmd4 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 14 - + NoControl - - 63, 71 + + 103, 87 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 138 + + 120 - - ymd + + 3 - - cmdYmd + + cmd3 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 15 - + NoControl - - 63, 100 + + 53, 87 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 137 + + 119 - - doy + + 2 - - cmdDoy + + cmd2 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 16 - + NoControl - - 4, 100 + + 53, 123 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 51, 37 - - 136 + + 118 - - leap + + 0 - - cmdLeap + + cmd0 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpBasic - + 17 - - 434, 61 - - - 188, 192 - - - 188 - - - Dates + + NoControl - - grpDates + + 4, 87 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 3, 4, 3, 4 - - $this + + 51, 37 - - 14 + + 117 - - NoControl + + 1 - - 187, 161 + + cmd1 - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 197 + + grpBasic - - nasplin + + 18 - - cmdNasplin + + cmdQuarter - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - + 0 - - NoControl - - - 125, 161 + + cmdD_In_M - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 196 + + grpDates - - naapprox + + 1 - - cmdNaapprox + + cmdAm - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform - - - 1 + + grpDates - - NoControl + + 2 - - 64, 161 + + cmdSec - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 195 + + grpDates - - naest + + 3 - - cmdNaest + + cmdHour - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform - - - 2 + + grpDates - - NoControl + + 4 - - 2, 161 + + cmdminutes - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 194 + + grpDates - - nafill + + 5 - - cmdNafill + + cmdDmy - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform - - - 3 + + grpDates - - NoControl + + 6 - - 2, 102 + + cmdDek - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 193 + + grpDates - - movmin + + 7 - - cmdMovmin + + cmdDay - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 4 + + 8 - - NoControl + + cmdMonth - - 2, 132 - - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 192 + + grpDates - - r_rank + + 9 - - cmdRowRank + + cmdYear - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform - - - 5 + + grpDates - - NoControl + + 10 - - 64, 102 + + cmdDate - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 191 + + grpDates - - diff + + 11 - - cmdDiff + + cmdYday - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform - - - 6 + + grpDates - - NoControl + + 12 - - 187, 102 + + cmdWday - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 190 + + grpDates - - cumdist + + 13 - - cmdCumdist + + cmdMdy - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 7 + + 14 - - NoControl + + cmdYmd - - 125, 73 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 62, 30 + + grpDates - - 189 + + 15 - - movmean + + cmdDoy - - cmdmovemean + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + grpDates + + + 16 + + + cmdLeap + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 8 + + 17 - - NoControl + + 579, 75 - - 125, 44 + + 4, 4, 4, 4 - - 62, 30 + + 4, 4, 4, 4 - + + 251, 236 + + 188 - - cummean + + Dates - - cmdCumMean + + grpDates - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + $this - - 9 + + 14 - + NoControl - - 125, 102 + + 163, 194 - - 62, 30 + + 4, 4, 4, 4 - - 187 + + 80, 37 - - ntile + + 157 - - cmdNtile + + quarter - + + cmdQuarter + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 10 + + 0 - + NoControl - - 187, 73 + + 84, 194 - - 62, 30 + + 4, 4, 4, 4 - - 186 + + 80, 37 - - movmed + + 156 - - cmMovMed + + d_in_m - + + cmdD_In_M + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 11 + + 1 - + NoControl - - 187, 132 + + 5, 194 - - 62, 30 + + 4, 4, 4, 4 - - 185 + + 80, 37 - - m_rank + + 155 - - cmdMRank + + am - + + cmdAm + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 12 + + 2 - + NoControl - - 125, 132 + + 163, 159 - - 62, 30 + + 4, 4, 4, 4 - - 184 + + 80, 37 - - d_rank + + 154 - - cmdDRank + + sec - + + cmdSec + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 13 + + 3 - + NoControl - - 2, 73 + + 5, 159 - - 62, 30 + + 4, 4, 4, 4 - - 183 + + 80, 37 - - movmax + + 153 - - cmdMovMax + + hour - + + cmdHour + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 14 + + 4 - + NoControl - - 64, 73 + + 84, 159 - - 62, 30 + + 4, 4, 4, 4 - - 182 + + 80, 37 - - movsum + + 152 - - cmdMovSum + + min - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + cmdminutes - - grpTransform + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 15 + + grpDates - - Microsoft Sans Serif, 8.25pt + + 5 - + NoControl - - 64, 132 + + 5, 87 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 80, 37 - - 181 + + 151 - - % rank + + dmy - - cmdpercentrank + + cmdDmy - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 16 + + 6 - + NoControl - - 64, 44 + + 163, 123 - - 62, 30 + + 3, 4, 3, 4 - - 180 + + 80, 37 - - cumsum + + 150 - - cmdcumsum + + dek - + + cmdDek + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 17 + + 7 - + NoControl - - 187, 44 + + 163, 16 - - 62, 30 + + 3, 4, 3, 4 - - 179 + + 80, 37 - - cummin + + 145 - - cmdcummin + + day - + + cmdDay + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 18 + + 8 - + NoControl - - 2, 44 + + 84, 16 - - 62, 30 + + 3, 4, 3, 4 - - 178 + + 80, 37 - - cummax + + 144 - - cmdcummax + + month - + + cmdMonth + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 19 + + 9 - + NoControl - - 187, 15 + + 5, 16 - - 62, 30 + + 3, 4, 3, 4 - - 177 + + 80, 37 - - pmin + + 143 - - cmdPMin + + year - + + cmdYear + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 20 + + 10 - + NoControl - - 125, 15 + + 163, 52 - - 62, 30 + + 3, 4, 3, 4 - - 176 + + 80, 37 - - pmax + + 142 - - cmdpmax + + date - + + cmdDate + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 21 + + 11 - + NoControl - - 64, 15 + + 84, 52 - - 62, 30 + + 3, 4, 3, 4 - - 175 + + 80, 37 - - lead + + 141 - - cmdLead + + yday - + + cmdYday + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 22 + + 12 - + NoControl - - 2, 15 + + 5, 52 - - 62, 30 + + 3, 4, 3, 4 - - 174 + + 80, 37 - - lag + + 140 - - cmdLag + + wday - + + cmdWday + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpDates - - 23 + + 13 - - 431, 64 + + NoControl - - 256, 204 + + 163, 87 - - 189 + + 3, 4, 3, 4 - - Transform + + 80, 37 - - grpTransform + + 139 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mdy - - $this + + cmdMdy - - 9 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Microsoft Sans Serif, 8.25pt + + grpDates - + + 14 + + NoControl - - 231, 101 + + 84, 87 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 56, 30 + + 80, 37 - - 182 + + 138 - - kurtosis + + ymd - - cmdKurtosis + + cmdYmd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpDates - - 0 + + 15 - + NoControl - - 231, 42 + + 84, 123 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 56, 30 + + 80, 37 - - 180 + + 137 - - mode1 + + doy - - cmdMode1 + + cmdDoy - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpDates - - 1 + + 16 - + NoControl - - 176, 42 + + 5, 123 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 56, 30 + + 80, 37 - - 179 + + 136 - - mode + + leap - - cmdMode + + cmdLeap - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpDates - - 2 + + 17 - - NoControl + + cmdNasplin - - 120, 130 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 3, 2, 3 + + grpTransform - - 56, 30 + + 0 - - 178 + + cmdNaapprox - - first + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdFirst + + grpTransform - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 1 - - grpSummary + + cmdNaest - - 3 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + grpTransform - - 176, 130 + + 2 - - 2, 3, 2, 3 + + cmdNafill - - 56, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 177 + + grpTransform - - last + + 3 - - cmdLast + + cmdMovmin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - + 4 - - NoControl - - - 231, 130 - - - 2, 3, 2, 3 + + cmdRowRank - - 56, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 176 + + grpTransform - - nth + + 5 - - cmdnth + + cmdDiff - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 5 + + 6 - - NoControl + + cmdCumdist - - 65, 159 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 3, 2, 3 + + grpTransform - - 56, 30 + + 7 - - 175 + + cmdmovemean - - cor + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdCor + + grpTransform - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 8 - - grpSummary + + cmdCumMean - - 6 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + grpTransform - - 121, 159 + + 9 - - 2, 3, 2, 3 + + cmdNtile - - 56, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 174 + + grpTransform - - cov + + 10 - - cmdCov + + cmMovMed - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 7 + + 11 - - Microsoft Sans Serif, 8.25pt + + cmdMRank - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 176, 72 + + grpTransform - - 2, 3, 2, 3 + + 12 - - 56, 30 + + cmdDRank - - 173 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - mad + + grpTransform - - cmdMad + + 13 - + + cmdMovMax + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 8 + + 14 - - Microsoft Sans Serif, 8.25pt + + cmdMovSum - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 120, 101 + + grpTransform - - 2, 3, 2, 3 + + 15 - - 56, 30 + + cmdpercentrank - - 172 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - mc + + grpTransform - - cmdMc + + 16 - + + cmdcumsum + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 9 + + 17 - - Microsoft Sans Serif, 8.25pt + + cmdcummin - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 64, 130 + + grpTransform - - 2, 3, 2, 3 + + 18 - - 56, 30 + + cmdcummax - - 171 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - propn + + grpTransform - - cmdPropn + + 19 - + + cmdPMin + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 10 + + 20 - - Microsoft Sans Serif, 8.25pt + + cmdpmax - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 64, 101 + + grpTransform - - 2, 3, 2, 3 + + 21 - - 56, 30 + + cmdLead - - 170 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cv - - - cmdCv + + grpTransform - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 22 - - grpSummary + + cmdLag - - 11 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Microsoft Sans Serif, 8.25pt + + grpTransform - - NoControl + + 23 - - 176, 101 + + 575, 79 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 4, 4, 4, 4 - - 169 + + 341, 251 - - skew + + 189 - - cmdSkew + + Transform - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + grpTransform - - grpSummary + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 12 + + $this - - Microsoft Sans Serif, 8.25pt + + 9 - + NoControl - - 2, 130 + + 249, 198 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 63, 30 + + 83, 37 - - 168 + + 197 - - anyDup + + nasplin - - cmdAnyDup + + cmdNasplin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 13 + + 0 - + NoControl - - 2, 101 + + 167, 198 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 63, 30 + + 83, 37 - - 167 + + 196 - - distinct + + naapprox - - cmdDistinct + + cmdNaapprox - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 14 + + 1 - + NoControl - - 2, 72 + + 85, 198 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 63, 30 + + 83, 37 - - 166 + + 195 - - non miss + + naest - - cmdNonMiss + + cmdNaest - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary - - - 15 + + grpTransform - - Microsoft Sans Serif, 8.25pt + + 2 - + NoControl - - 231, 72 + + 3, 198 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 165 + + 194 - - IQR + + nafill - - cmdIQR + + cmdNafill - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary - - - 16 + + grpTransform - - Microsoft Sans Serif, 8.25pt + + 3 - + NoControl - - 176, 159 + + 3, 126 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 164 + + 193 - - quantile + + movmin - - cmdQuantile + + cmdMovmin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary - - - 17 + + grpTransform - - Microsoft Sans Serif, 8.25pt + + 4 - + NoControl - - 231, 13 + + 3, 162 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 163 + + 192 - - range + + r_rank - - cmdRange + + cmdRowRank - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 18 + + 5 - + NoControl - - 120, 72 + + 85, 126 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 160 + + 191 - - sd + + diff - - cmdSd + + cmdDiff - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary - - - 19 + + grpTransform - - Microsoft Sans Serif, 8.25pt + + 6 - + NoControl - - 120, 42 + + 249, 126 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 158 + + 190 - - median + + cumdist - - cmdMedian + + cmdCumdist - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 20 + + 7 - + NoControl - - 120, 13 + + 167, 90 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 155 + + 189 - - min + + movmean - - cmdMin + + cmdmovemean - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 21 + + 8 - + NoControl - - 176, 13 + + 167, 54 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 154 + + 188 - - max + + cummean - - cmdMax + + cmdCumMean - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary - - - 22 + + grpTransform - - Microsoft Sans Serif, 8.25pt + + 9 - + NoControl - - 64, 42 + + 167, 126 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 153 + + 187 - - mean + + ntile - - cmdMean + + cmdNtile - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 23 + + 10 - + NoControl - - 2, 42 + + 249, 90 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 63, 30 + + 83, 37 - - 149 + + 186 - - miss + + movmed - - cmdMiss + + cmMovMed - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary - - - 24 + + grpTransform - - Microsoft Sans Serif, 8.25pt + + 11 - + NoControl - - 2, 13 + + 249, 162 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 63, 30 + + 83, 37 - - 148 + + 185 - - length + + m_rank - - cmdLength + + cmdMRank - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 25 + + 12 - + NoControl - - 64, 13 + + 167, 162 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 150 + + 184 - - sum + + d_rank - - cmdSum + + cmdDRank - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 26 + + 13 - + NoControl - - 64, 72 + + 3, 90 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 56, 30 + + 83, 37 - - 159 + + 183 - - var + + movmax - - cmdVar + + cmdMovMax - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSummary + + grpTransform - - 27 + + 14 - - 431, 64 + + NoControl - - 2, 3, 2, 3 + + 85, 90 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 291, 193 + + 83, 37 - - 185 + + 182 - - Summary + + movsum - - grpSummary + + cmdMovSum - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + grpTransform - - 8 + + 15 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 152, 42 + + 85, 162 - - 52, 30 + + 3, 4, 3, 4 - - 207 + + 83, 37 - - FALSE + + 181 - - cmdFalse + + % rank - + + cmdpercentrank + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpTransform - - 0 + + 16 - + NoControl - - 152, 13 + + 85, 54 - - 52, 30 + + 4, 4, 4, 4 - - 206 + + 83, 37 - - TRUE + + 180 - - cmdTrue + + cumsum - + + cmdcumsum + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpTransform - - 1 + + 17 - + NoControl - - 118, 71 + + 249, 54 - - 2, 2, 2, 2 + + 4, 4, 4, 4 - - 50, 30 + + 83, 37 - - 205 + + 179 - - [[ ]] + + cummin - - cmdDoubleSqrBrackets + + cmdcummin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpTransform - - 2 + + 18 - + NoControl - - 78, 100 + + 3, 54 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 45, 30 + + 83, 37 - - 204 + + 178 - - %in% + + cummax - - cmdIn + + cmdcummax - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpTransform - - 3 + + 19 - + NoControl - - 196, 100 + + 249, 18 - - 52, 30 + + 4, 4, 4, 4 - - 203 + + 83, 37 - - which + + 177 - - cmdWhich + + pmin - + + cmdPMin + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpTransform - - 4 + + 20 - + NoControl - - 159, 100 + + 167, 18 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 38, 30 + + 83, 37 - - 202 + + 176 - - NA + + pmax - - cmdNA + + cmdpmax - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpTransform - - 5 + + 21 - + NoControl - - 186, 158 + + 85, 18 - - 62, 30 + + 4, 4, 4, 4 - - 201 + + 83, 37 - - near + + 175 - - cmdNear + + lead - + + cmdLead + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpTransform - - 6 + + 22 - + NoControl - - 186, 129 + + 3, 18 - - 62, 30 + + 4, 4, 4, 4 - - 200 + + 83, 37 - - between + + 174 - - cmdBetween + + lag - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + cmdLag - - grpLogical + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 7 + + grpTransform - - NoControl + + 23 - - 186, 187 + + cmdKurtosis - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 199 + + grpSummary - - is false + + 0 - - cmdIsFalse + + cmdMode1 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 8 + + grpSummary - - NoControl + + 1 - - 4, 187 + + cmdMode - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 198 + + grpSummary - - any + + 2 - - cmdAny + + cmdFirst - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 9 + + grpSummary - - NoControl + + 3 - - 65, 187 + + cmdLast - - 58, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 197 + + grpSummary - - all + + 4 - - cmdAll + + cmdnth - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 10 + + grpSummary - - NoControl + + 5 - - 122, 187 + + cmdCor - - 65, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 196 + + grpSummary - - is true + + 6 - - cmdIsTrue + + cmdCov - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 11 + + grpSummary - - NoControl + + 7 - - 4, 158 + + cmdMad - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 195 + + grpSummary - - is.na + + 8 - - cmdIsNa + + cmdMc - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 12 + + grpSummary - - NoControl + + 9 - - 65, 158 + + cmdPropn - - 58, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 194 + + grpSummary - - !is.na + + 10 - - cmdNotIsNa + + cmdCv - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 13 + + grpSummary - - NoControl + + 11 - - 122, 158 + + cmdSkew - - 65, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 193 + + grpSummary - - duplicated + + 12 - - cmdDuplicate + + cmdAnyDup - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 14 + + grpSummary - - NoControl + + 13 - - 4, 129 + + cmdDistinct - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 192 + + grpSummary - - ifelse + + 14 - - cmdIfelse + + cmdNonMiss - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - + 15 - - NoControl - - - 65, 129 + + cmdIQR - - 58, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 191 + + grpSummary - - match + + 16 - - cmdmatch + + cmdQuantile - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 16 + + grpSummary - - NoControl + + 17 - - 122, 129 + + cmdRange - - 65, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 190 + + grpSummary - - when + + 18 - - cmdwhen + + cmdSd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 17 - - - NoControl + + grpSummary - - 167, 71 + + 19 - - 2, 3, 2, 3 + + cmdMedian - - 40, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 139 + + grpSummary - - ( + + 20 - - cmdOpeningBracket + + cmdMin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 18 + + 21 - - Microsoft Sans Serif, 15.75pt + + cmdMax - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 41, 71 + + grpSummary - - 2, 3, 2, 3 + + 22 - - 38, 30 + + cmdMean - - 139 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - : + + grpSummary - - cmdColon + + 23 - + + cmdMiss + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 19 + + 24 - - NoControl + + cmdLength - - 115, 13 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 3, 2, 3 + + grpSummary - - 38, 30 + + 25 - - 138 + + cmdSum - - >= + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdGreaterOrEqualsTo + + grpSummary - + + 26 + + + cmdVar + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 20 + + 27 - - NoControl + + 575, 79 - - 206, 71 + + 3, 4, 3, 4 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 42, 30 + + 388, 238 - - 137 + + 185 - - ) + + Summary - - cmdClossingBracket + + grpSummary - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + $this - - 21 + + 8 - - Microsoft Sans Serif, 9.75pt + + Microsoft Sans Serif, 8.25pt - + NoControl - - 115, 42 + + 308, 124 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 137 + + 182 - - && + + kurtosis - - cmdAnd + + cmdKurtosis - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 22 + + grpSummary - - Microsoft Sans Serif, 12pt + + 0 - + NoControl - - 122, 100 + + 308, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 135 + + 180 - - " " + + mode1 - - cmdQuotes + + cmdMode1 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 23 + + 1 - + NoControl - - 78, 71 + + 235, 52 - - 2, 2, 2, 2 + + 3, 4, 3, 4 - - 42, 30 + + 75, 37 - - 134 + + 179 - - [ ] + + mode - - cmdSquareBrackets + + cmdMode - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 24 + + 2 - + NoControl - - 41, 100 + + 160, 160 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 135 + + 178 - - %/% + + first - - cmdIntegerDivision + + cmdFirst - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 25 + + 3 - + NoControl - - 4, 100 + + 235, 160 - - 2, 2, 2, 2 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 134 + + 177 - - %% + + last - - cmdModulas + + cmdLast - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 26 + + 4 - + NoControl - - 78, 13 + + 308, 160 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 133 + + 176 - - > + + nth - - cmdGreater + + cmdnth - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 27 + + 5 - + NoControl - - 41, 13 + + 87, 196 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 132 + + 175 - - <= + + cor - - cmdLesserOrEqualsTo + + cmdCor - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 28 + + 6 - + NoControl - - 4, 13 + + 161, 196 - - 2, 2, 2, 2 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 131 + + 174 - - < + + cov - - cmdLesser + + cmdCov - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 29 + + 7 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 78, 42 + + 235, 89 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 130 + + 173 - - | + + mad - - cmdOr + + cmdMad - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 30 + + 8 - - Microsoft Sans Serif, 12pt + + Microsoft Sans Serif, 8.25pt - + NoControl - - 4, 71 + + 160, 124 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 129 + + 172 - - ! + + mc - - cmdNot + + cmdMc - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 31 + + 9 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 41, 42 + + 85, 160 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 128 + + 171 - - != + + propn - - cmdNotEqualsTo + + cmdPropn - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 32 + + 10 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 4, 42 + + 85, 124 - - 2, 2, 2, 2 + + 3, 4, 3, 4 - - 38, 30 + + 75, 37 - - 127 + + 170 - - == + + cv - - cmdEquivalent + + cmdCv - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 33 + + 11 - - 430, 66 + + Microsoft Sans Serif, 8.25pt - - 2, 3, 2, 3 + + NoControl - - 2, 3, 2, 3 + + 235, 124 - - 253, 220 + + 3, 4, 3, 4 - - 183 + + 75, 37 - - Logical and Symbols + + 169 - - grpLogical + + skew - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + cmdSkew - - $this + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 6 + + grpSummary - + + 12 + + Microsoft Sans Serif, 8.25pt - + NoControl - - 180, 132 + + 3, 160 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 84, 37 - - 160 + + 168 - - starts + + anyDup - - cmdStarts + + cmdAnyDup - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 0 + + grpSummary - - Microsoft Sans Serif, 8.25pt + + 13 - + NoControl - - 121, 132 + + 3, 124 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 84, 37 - - 159 + + 167 - - replace2 + + distinct - - cmdReplace2 + + cmdDistinct - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 1 + + grpSummary - - Microsoft Sans Serif, 8.25pt + + 14 - + NoControl - - 62, 132 + + 3, 89 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 84, 37 - - 158 + + 166 - - replace + + non miss - - cmdReplace + + cmdNonMiss - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpSummary - - 2 + + 15 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 179, 102 + + 308, 89 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 157 + + 165 - - remove2 + + IQR - - cmdRemove2 + + cmdIQR - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpSummary - - 3 + + 16 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 120, 102 + + 235, 196 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 156 + + 164 - - remove + + quantile - - cmdRemove1 + + cmdQuantile - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpSummary - - 4 + + 17 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 61, 102 + + 308, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 155 + + 163 - - locate2 + + range - - cmdLocate2 + + cmdRange - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 5 + + grpSummary - - Microsoft Sans Serif, 8.25pt + + 18 - + NoControl - - 238, 73 + + 160, 89 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 154 + + 160 - - extract2 + + sd - - cmdExtract2 + + cmdSd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpSummary - - 6 + + 19 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 120, 73 + + 160, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 152 + + 158 - - end + + median - - cmdEnd + + cmdMedian - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 7 + + grpSummary - - Microsoft Sans Serif, 8.25pt + + 20 - + NoControl - - 238, 44 + + 160, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 151 + + 155 - - encode + + min - - cmdEncodeb + + cmdMin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 8 + + grpSummary - - Microsoft Sans Serif, 8.25pt + + 21 - + NoControl - - 238, 15 + + 235, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 150 + + 154 - - squish + + max - - cmdSquishb + + cmdMax - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpSummary - - 9 + + 22 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 238, 102 + + 85, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 149 + + 153 - - split + + mean - - cmdSplit + + cmdMean - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 10 + + grpSummary - - Microsoft Sans Serif, 8.25pt + + 23 - + NoControl - - 179, 44 + + 3, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 84, 37 - - 148 + + 149 - - combine + + miss - - cmdCombine + + cmdMiss - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpSummary - - 11 + + 24 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 61, 73 + + 3, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 84, 37 - - 147 + + 148 - - detect + + length - - cmdDetect + + cmdLength - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 12 + + grpSummary - - Microsoft Sans Serif, 8.25pt + + 25 - + NoControl - - 179, 15 + + 85, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 146 + + 150 - - trim + + sum - - cmdTrim + + cmdSum - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 13 + + grpSummary - - Microsoft Sans Serif, 8.25pt + + 26 - + NoControl - - 120, 15 + + 85, 89 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 60, 30 + + 75, 37 - - 142 + + 159 - - title + + var - - cmdTitle + + cmdVar - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpSummary - - 14 + + 27 - - Microsoft Sans Serif, 8.25pt + + cmdFalse - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 61, 15 + + grpLogical - - 2, 3, 2, 3 + + 0 - - 60, 30 + + cmdTrue - - 141 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - lower + + grpLogical - - cmdLower + + 1 - + + cmdDoubleSqrBrackets + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 15 + + 2 - - Microsoft Sans Serif, 8.25pt + + cmdIn - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 15 + + grpLogical - - 2, 3, 2, 3 + + 3 - - 60, 30 + + cmdWhich - - 140 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - upper + + grpLogical - - cmdUpper + + 4 - + + cmdNA + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 16 + + 5 - - Microsoft Sans Serif, 8.25pt + + cmdNear - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 120, 44 + + grpLogical - - 2, 3, 2, 3 + + 6 - - 60, 30 + + cmdBetween - - 139 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - sort + + grpLogical - - cmdSort + + 7 - + + cmdIsFalse + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 17 + + 8 - - Microsoft Sans Serif, 8.25pt + + cmdAny - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 61, 44 + + grpLogical - - 2, 3, 2, 3 + + 9 - - 60, 30 + + cmdAll - - 138 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - order + + grpLogical - - cmdOrder + + 10 - + + cmdIsTrue + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 18 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 2, 44 + + 11 - - 2, 3, 2, 3 + + cmdIsNa - - 60, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 137 + + grpLogical - - pad + + 12 - - cmdPad + + cmdNotIsNa - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 19 + + 13 - - Microsoft Sans Serif, 8.25pt + + cmdDuplicate - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 179, 73 + + grpLogical - - 2, 3, 2, 3 + + 14 - - 60, 30 + + cmdIfelse - - 136 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - extract + + grpLogical - - cmdExtract + + 15 - + + cmdmatch + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 20 + + 16 - - Microsoft Sans Serif, 8.25pt + + cmdwhen - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 73 + + grpLogical - - 2, 3, 2, 3 + + 17 - - 60, 30 + + cmdOpeningBracket - - 134 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - count + + grpLogical - - cmdCountstrings + + 18 - + + cmdColon + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 21 + + 19 - - Microsoft Sans Serif, 8.25pt + + cmdGreaterOrEqualsTo - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 102 + + grpLogical - - 2, 3, 2, 3 + + 20 - - 60, 30 + + cmdClossingBracket - - 133 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - locate + + grpLogical - - cmdLocate + + 21 - + + cmdAnd + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - + 22 - - Microsoft Sans Serif, 8.25pt + + cmdQuotes - - 434, 63 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 301, 162 + + grpLogical - - 186 + + 23 - - Strings (Character Columns) + + cmdSquareBrackets - - grpStrings + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + grpLogical - - $this + + 24 - - 13 + + cmdIntegerDivision - - Microsoft Sans Serif, 8.25pt + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + grpLogical - - 248, 102 + + 25 - - 2, 3, 2, 3 + + cmdModulas - - 62, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 176 + + grpLogical - - qnbin + + 26 - - cmdQnbin + + cmdGreater - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpLogical - - 0 + + 27 - - Microsoft Sans Serif, 8.25pt + + cmdLesserOrEqualsTo - - NoControl + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 187, 102 + + grpLogical - - 2, 3, 2, 3 + + 28 - - 62, 30 + + cmdLesser - - 175 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - qpois + + grpLogical - - cmdQpois + + 29 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + cmdOr - - grpProbabilty + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 30 - - NoControl + + cmdNot - - 125, 102 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 3, 2, 3 + + grpLogical - - 62, 30 + + 31 - - 174 + + cmdNotEqualsTo - - qbinom + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdQbinom + + grpLogical - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 32 - - grpProbabilty + + cmdEquivalent - - 2 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Microsoft Sans Serif, 8.25pt + + grpLogical - - NoControl + + 33 - - 64, 102 + + 573, 81 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 3, 4, 3, 4 - - 173 + + 337, 271 - - qbirth + + 183 - - cmdQbirth + + Logical and Symbols - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + grpLogical - - grpProbabilty + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + $this - - Microsoft Sans Serif, 8.25pt + + 6 - + NoControl - - 2, 102 + + 203, 52 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 69, 37 - - 172 + + 207 - - qbeta + + FALSE - - cmdQbeta + + cmdFalse - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 4 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 0 - + NoControl - - 248, 73 + + 203, 16 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 69, 37 - - 171 + + 206 - - pnbin + + TRUE - - cmdPnbin + + cmdTrue - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 5 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 1 - + NoControl - - 187, 73 + + 157, 87 - - 2, 3, 2, 3 + + 3, 2, 3, 2 - - 62, 30 + + 67, 37 - - 170 + + 205 - - ppois + + [[ ]] - - cmdPpois + + cmdDoubleSqrBrackets - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 6 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 2 - + NoControl - - 125, 73 + + 104, 123 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 60, 37 - - 169 + + 204 - - pbinom + + %in% - - cmdPbinom + + cmdIn - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 7 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 3 - + NoControl - - 64, 73 + + 261, 123 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 69, 37 - - 168 + + 203 - - pbirth + + which - - cmdPbirth + + cmdWhich - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 8 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 4 - + NoControl - - 2, 73 + + 212, 123 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 51, 37 - - 167 + + 202 - - pbeta + + NA - - cmdPbeta + + cmdNA - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 9 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 5 - + NoControl - - 248, 44 + + 248, 194 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 83, 37 - - 166 + + 201 - - qgamma + + near - - cmdQgamma + + cmdNear - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 10 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 6 - + NoControl - - 248, 15 + + 248, 159 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 83, 37 - - 165 + + 200 - - pgamma + + between - - cmdPgamma + + cmdBetween - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 11 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 7 - + NoControl - - 187, 132 + + 248, 230 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 83, 37 - - 163 + + 199 - - gamma + + is false - - cmdGamma + + cmdIsFalse - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 12 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 8 - + NoControl - - 125, 161 + + 5, 230 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 83, 37 - - 159 + + 198 - - lbeta + + any - - cmdLbeta + + cmdAny - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 13 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 9 - + NoControl - - 187, 44 + + 87, 230 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 77, 37 - - 162 + + 197 - - qf + + all - - cmdqF + + cmdAll - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 14 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 10 - + NoControl - - 2, 132 + + 163, 230 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 87, 37 - - 154 + + 196 - - fact + + is true - - cmdFact + + cmdIsTrue - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 15 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 11 - + NoControl - - 64, 132 + + 5, 194 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 83, 37 - - 161 + + 195 - - choose + + is.na - - cmdChoose + + cmdIsNa - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 16 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 12 - + NoControl - - 187, 15 + + 87, 194 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 77, 37 - - 156 + + 194 - - pf + + !is.na - - cmdPf + + cmdNotIsNa - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 17 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 13 - + NoControl - - 125, 15 + + 163, 194 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 87, 37 - - 155 + + 193 - - pchisq + + duplicated - - cmdPChisq + + cmdDuplicate - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 18 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 14 - + NoControl - - 187, 161 + + 5, 159 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 83, 37 - - 152 + + 192 - - lgamma + + ifelse - - cmdLgamma + + cmdIfelse - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 19 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 15 - + NoControl - - 2, 15 + + 87, 159 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 77, 37 - - 148 + + 191 - - pnorm + + match - - cmdPnorm + + cmdmatch - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 20 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 16 - + NoControl - - 125, 44 + + 163, 159 - - 2, 3, 2, 3 + + 4, 4, 4, 4 - - 62, 30 + + 87, 37 - - 160 + + 190 - - qchisq + + when - - cmdQchisq + + cmdwhen - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 21 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 17 - + NoControl - - 64, 44 + + 223, 87 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 53, 37 - - 158 + + 139 - - qt + + ( - - cmdQt + + cmdOpeningBracket - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpLogical - - 22 + + 18 - - Microsoft Sans Serif, 8.25pt + + Microsoft Sans Serif, 15.75pt - + NoControl - - 2, 44 + + 55, 87 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 51, 37 - - 157 + + 139 - - qnorm + + : - - cmdQnorm + + cmdColon - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 23 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 19 - + NoControl - - 64, 15 + + 153, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 51, 37 - - 153 + + 138 - - pt + + >= - - cmdPt + + cmdGreaterOrEqualsTo - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 24 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 20 - + NoControl - - 64, 161 + + 275, 87 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 56, 37 - - 151 + + 137 - - lchoose + + ) - - cmdLchoose + + cmdClossingBracket - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpLogical - - 25 + + 21 - - Microsoft Sans Serif, 8.25pt + + Microsoft Sans Serif, 9.75pt - + NoControl - - 2, 161 + + 153, 52 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 51, 37 - - 150 + + 137 - - lfact + + && - - cmdLfact + + cmdAnd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpLogical - - 26 + + 22 - - Microsoft Sans Serif, 8.25pt + + Microsoft Sans Serif, 12pt - + NoControl - - 248, 161 + + 163, 123 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 51, 37 - - 149 + + 135 - - trigamma + + " " - - cmdTrigamma + + cmdQuotes - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpLogical - - 27 + + 23 - - Microsoft Sans Serif, 8.25pt + + NoControl - + + 104, 87 + + + 3, 2, 3, 2 + + + 56, 37 + + + 134 + + + [ ] + + + cmdSquareBrackets + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLogical + + + 24 + + NoControl - - 125, 132 + + 55, 123 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 51, 37 - - 149 + + 135 - - beta + + %/% - - cmdBeta + + cmdIntegerDivision - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpLogical - - 28 + + 25 - - Microsoft Sans Serif, 8.25pt + + NoControl - + + 5, 123 + + + 3, 2, 3, 2 + + + 51, 37 + + + 134 + + + %% + + + cmdModulas + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLogical + + + 26 + + NoControl - - 248, 132 + + 104, 16 - - 2, 3, 2, 3 + + 3, 4, 3, 4 - - 62, 30 + + 51, 37 - - 164 + + 133 - - digamma + + > - - cmdDigamma + + cmdGreater - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpLogical - - 29 + + 27 + + + NoControl + + + 55, 16 + + + 3, 4, 3, 4 + + + 51, 37 + + + 132 + + + <= + + + cmdLesserOrEqualsTo + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLogical + + + 28 + + + NoControl + + + 5, 16 + + + 3, 2, 3, 2 + + + 51, 37 + + + 131 + + + < + + + cmdLesser + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLogical + + + 29 + + + NoControl + + + 104, 52 + + + 3, 4, 3, 4 + + + 51, 37 + + + 130 + + + | + + + cmdOr + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLogical + + + 30 + + + Microsoft Sans Serif, 12pt + + + NoControl + + + 5, 87 + + + 3, 4, 3, 4 + + + 51, 37 + + + 129 + + + ! + + + cmdNot + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLogical + + + 31 + + + NoControl + + + 55, 52 + + + 3, 4, 3, 4 + + + 51, 37 + + + 128 + + + != + + + cmdNotEqualsTo + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLogical + + + 32 + + + NoControl + + + 5, 52 + + + 3, 2, 3, 2 + + + 51, 37 + + + 127 + + + == + + + cmdEquivalent + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLogical + + + 33 + + + cmdStarts + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 0 + + + cmdReplace2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 1 + + + cmdReplace + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 2 + + + cmdRemove2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 3 + + + cmdRemove1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 4 + + + cmdLocate2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 5 + + + cmdExtract2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 6 + + + cmdEnd + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 7 + + + cmdEncodeb + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 8 + + + cmdSquishb + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 9 + + + cmdSplit + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 10 + + + cmdCombine + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 11 + + + cmdDetect + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 12 + + + cmdTrim + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 13 + + + cmdTitle + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 14 + + + cmdLower + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 15 + + + cmdUpper + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 16 + + + cmdSort + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 17 + + + cmdOrder + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 18 + + + cmdPad + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 19 + + + cmdExtract + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 20 + + + cmdCountstrings + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 21 + + + cmdLocate + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 22 + + + Microsoft Sans Serif, 8.25pt + + + 579, 78 + + + 4, 4, 4, 4 + + + 4, 4, 4, 4 + + + 401, 199 + + + 186 + + + Strings (Character Columns) + + + grpStrings + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 13 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 240, 162 + + + 3, 4, 3, 4 + + + 80, 37 + + + 160 + + + starts + + + cmdStarts + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 0 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 161, 162 + + + 3, 4, 3, 4 + + + 80, 37 + + + 159 + + + replace2 + + + cmdReplace2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 1 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 83, 162 + + + 3, 4, 3, 4 + + + 80, 37 + + + 158 + + + replace + + + cmdReplace + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 2 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 239, 126 + + + 3, 4, 3, 4 + + + 80, 37 + + + 157 + + + remove2 + + + cmdRemove2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 3 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 160, 126 + + + 3, 4, 3, 4 + + + 80, 37 + + + 156 + + + remove + + + cmdRemove1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 4 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 81, 126 + + + 3, 4, 3, 4 + + + 80, 37 + + + 155 + + + locate2 + + + cmdLocate2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 5 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 317, 90 + + + 3, 4, 3, 4 + + + 80, 37 + + + 154 + + + extract2 + + + cmdExtract2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 6 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 160, 90 + + + 3, 4, 3, 4 + + + 80, 37 + + + 152 + + + end + + + cmdEnd + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 7 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 317, 54 + + + 3, 4, 3, 4 + + + 80, 37 + + + 151 + + + encode + + + cmdEncodeb + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 8 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 317, 18 + + + 3, 4, 3, 4 + + + 80, 37 + + + 150 + + + squish + + + cmdSquishb + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 9 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 317, 126 + + + 3, 4, 3, 4 + + + 80, 37 + + + 149 + + + split + + + cmdSplit + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 10 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 239, 54 + + + 3, 4, 3, 4 + + + 80, 37 + + + 148 + + + combine + + + cmdCombine + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 11 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 81, 90 + + + 3, 4, 3, 4 + + + 80, 37 + + + 147 + + + detect + + + cmdDetect + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 12 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 239, 18 + + + 3, 4, 3, 4 + + + 80, 37 + + + 146 + + + trim + + + cmdTrim + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 13 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 160, 18 + + + 3, 4, 3, 4 + + + 80, 37 + + + 142 + + + title + + + cmdTitle + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 14 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 81, 18 + + + 3, 4, 3, 4 + + + 80, 37 + + + 141 + + + lower + + + cmdLower + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 15 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 18 + + + 3, 4, 3, 4 + + + 80, 37 + + + 140 + + + upper + + + cmdUpper + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 16 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 160, 54 + + + 3, 4, 3, 4 + + + 80, 37 + + + 139 + + + sort + + + cmdSort + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 17 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 81, 54 + + + 3, 4, 3, 4 + + + 80, 37 + + + 138 + + + order + + + cmdOrder + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 18 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 54 + + + 3, 4, 3, 4 + + + 80, 37 + + + 137 + + + pad + + + cmdPad + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 19 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 239, 90 + + + 3, 4, 3, 4 + + + 80, 37 + + + 136 + + + extract + + + cmdExtract + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 20 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 90 + + + 3, 4, 3, 4 + + + 80, 37 + + + 134 + + + count + + + cmdCountstrings + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 21 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 126 + + + 3, 4, 3, 4 + + + 80, 37 + + + 133 + + + locate + + + cmdLocate + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpStrings + + + 22 + + + cmdQnbin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 0 + + + cmdQpois + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 1 + + + cmdQbinom + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 2 + + + cmdQbirth + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 3 + + + cmdQbeta + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 4 + + + cmdPnbin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 5 + + + cmdPpois + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 6 + + + cmdPbinom + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 7 + + + cmdPbirth + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 8 + + + cmdPbeta + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 9 + + + cmdQgamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 10 + + + cmdPgamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 11 + + + cmdGamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 12 + + + cmdLbeta + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 13 + + + cmdqF + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 14 + + + cmdFact + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 15 + + + cmdChoose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 16 + + + cmdPf + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 17 + + + cmdPChisq + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 18 + + + cmdLgamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 19 + + + cmdPnorm + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 20 + + + cmdQchisq + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 21 + + + cmdQt + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 22 + + + cmdQnorm + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 23 + + + cmdPt + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 24 + + + cmdLchoose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 25 + + + cmdLfact + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 26 + + + cmdTrigamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 27 + + + cmdBeta + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 28 + + + cmdDigamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 29 + + + 577, 81 + + + 4, 4, 4, 4 + + + 4, 4, 4, 4 + + + 421, 239 + + + 187 + + + Probability + + + grpProbabilty + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 331, 126 + + + 3, 4, 3, 4 + + + 83, 37 + + + 176 + + + qnbin + + + cmdQnbin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 0 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 249, 126 + + + 3, 4, 3, 4 + + + 83, 37 + + + 175 + + + qpois + + + cmdQpois + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 1 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 167, 126 + + + 3, 4, 3, 4 + + + 83, 37 + + + 174 + + + qbinom + + + cmdQbinom + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 2 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 85, 126 + + + 3, 4, 3, 4 + + + 83, 37 + + + 173 + + + qbirth + + + cmdQbirth + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 3 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 126 + + + 3, 4, 3, 4 + + + 83, 37 + + + 172 + + + qbeta + + + cmdQbeta + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 4 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 331, 90 + + + 3, 4, 3, 4 + + + 83, 37 + + + 171 + + + pnbin + + + cmdPnbin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 5 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 249, 90 + + + 3, 4, 3, 4 + + + 83, 37 + + + 170 + + + ppois + + + cmdPpois + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 6 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 167, 90 + + + 3, 4, 3, 4 + + + 83, 37 + + + 169 + + + pbinom + + + cmdPbinom + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 7 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 85, 90 + + + 3, 4, 3, 4 + + + 83, 37 + + + 168 + + + pbirth + + + cmdPbirth + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 8 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 90 + + + 3, 4, 3, 4 + + + 83, 37 + + + 167 + + + pbeta + + + cmdPbeta + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 9 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 331, 54 + + + 3, 4, 3, 4 + + + 83, 37 + + + 166 + + + qgamma + + + cmdQgamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 10 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 331, 18 + + + 3, 4, 3, 4 + + + 83, 37 + + + 165 + + + pgamma + + + cmdPgamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 11 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 249, 162 + + + 3, 4, 3, 4 + + + 83, 37 + + + 163 + + + gamma + + + cmdGamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 12 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 167, 198 + + + 3, 4, 3, 4 + + + 83, 37 + + + 159 + + + lbeta + + + cmdLbeta + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 13 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 249, 54 + + + 3, 4, 3, 4 + + + 83, 37 + + + 162 + + + qf + + + cmdqF + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 14 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 162 + + + 3, 4, 3, 4 + + + 83, 37 + + + 154 + + + fact + + + cmdFact + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 15 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 85, 162 + + + 3, 4, 3, 4 + + + 83, 37 + + + 161 + + + choose + + + cmdChoose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 16 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 249, 18 + + + 3, 4, 3, 4 + + + 83, 37 + + + 156 + + + pf + + + cmdPf + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 17 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 167, 18 + + + 3, 4, 3, 4 + + + 83, 37 + + + 155 + + + pchisq + + + cmdPChisq + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 18 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 249, 198 + + + 3, 4, 3, 4 + + + 83, 37 + + + 152 + + + lgamma + + + cmdLgamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 19 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 18 + + + 3, 4, 3, 4 + + + 83, 37 + + + 148 + + + pnorm + + + cmdPnorm + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 20 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 167, 54 + + + 3, 4, 3, 4 + + + 83, 37 + + + 160 + + + qchisq + + + cmdQchisq + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 21 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 85, 54 + + + 3, 4, 3, 4 + + + 83, 37 + + + 158 + + + qt + + + cmdQt + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 22 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 54 + + + 3, 4, 3, 4 + + + 83, 37 + + + 157 + + + qnorm + + + cmdQnorm + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 23 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 85, 18 + + + 3, 4, 3, 4 + + + 83, 37 + + + 153 + + + pt + + + cmdPt + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 24 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 85, 198 + + + 3, 4, 3, 4 + + + 83, 37 + + + 151 + + + lchoose + + + cmdLchoose + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 25 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 3, 198 + + + 3, 4, 3, 4 + + + 83, 37 + + + 150 + + + lfact + + + cmdLfact + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 26 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 331, 198 + + + 3, 4, 3, 4 + + + 83, 37 + + + 149 + + + trigamma + + + cmdTrigamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 27 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 167, 162 + + + 3, 4, 3, 4 + + + 83, 37 + + + 149 + + + beta + + + cmdBeta + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 28 + + + Microsoft Sans Serif, 8.25pt + + + NoControl + + + 331, 162 + + + 3, 4, 3, 4 + + + 83, 37 + + + 164 + + + digamma + + + cmdDigamma + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpProbabilty + + + 29 + + + cmdAtan2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 0 + + + cmdLogistic + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 1 + + + cmdLogit + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 2 + + + cmdSign + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 3 + + + cmdRound + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 4 + + + cmdSiginf + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 5 + + + cmdAbs + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 6 + + + cmdExp + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 7 + + + cmdDeg + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 8 + + + cmdTrunc + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 9 + + + cmdAtan + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 10 + + + cmdTan + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 11 + + + cmdLogTen + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 12 + + + cmdRad + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 13 + + + cmdFloor + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 14 + + + cmdAsin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 15 + + + cmdSin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 16 + + + cmdLog + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 17 + + + cmdPi + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 18 + + + cmdCeiling + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 19 + + + cmdAcos + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 20 + + + cmdCos + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 21 + + + cmdSqrt + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpMaths + + + 22 + + + 575, 79 + + + 3, 4, 3, 4 - - 433, 66 + + 3, 4, 3, 4 - - 316, 194 + + 341, 206 - - 187 + + 184 - - Probability + + Maths - - grpProbabilty + + grpMaths - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 10 + + 7 NoControl - 153, 131 + 204, 161 + + + 4, 4, 4, 4 - 51, 30 + 68, 37 151 @@ -5812,10 +8392,13 @@ NoControl - 103, 131 + 137, 161 + + + 4, 4, 4, 4 - 51, 30 + 68, 37 149 @@ -5839,10 +8422,13 @@ NoControl - 52, 131 + 69, 161 + + + 4, 4, 4, 4 - 51, 30 + 68, 37 148 @@ -5866,13 +8452,13 @@ NoControl - 203, 102 + 271, 126 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 147 @@ -5899,13 +8485,13 @@ NoControl - 153, 102 + 204, 126 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 146 @@ -5932,13 +8518,13 @@ NoControl - 103, 102 + 137, 126 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 145 @@ -5962,13 +8548,13 @@ NoControl - 52, 102 + 69, 126 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 144 @@ -5992,13 +8578,13 @@ NoControl - 2, 102 + 3, 126 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 143 @@ -6022,13 +8608,13 @@ NoControl - 203, 72 + 271, 89 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 142 @@ -6055,13 +8641,13 @@ NoControl - 153, 72 + 204, 89 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 141 @@ -6085,13 +8671,13 @@ NoControl - 103, 72 + 137, 89 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 140 @@ -6115,13 +8701,13 @@ NoControl - 52, 72 + 69, 89 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 139 @@ -6148,13 +8734,13 @@ NoControl - 2, 72 + 3, 89 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 138 @@ -6178,13 +8764,13 @@ NoControl - 203, 43 + 271, 53 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 137 @@ -6211,13 +8797,13 @@ NoControl - 153, 43 + 204, 53 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 136 @@ -6241,13 +8827,13 @@ NoControl - 103, 43 + 137, 53 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 135 @@ -6271,13 +8857,13 @@ NoControl - 52, 43 + 69, 53 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 134 @@ -6301,13 +8887,13 @@ NoControl - 2, 43 + 3, 53 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 133 @@ -6331,13 +8917,13 @@ NoControl - 203, 14 + 271, 17 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 132 @@ -6364,13 +8950,13 @@ NoControl - 153, 14 + 204, 17 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 131 @@ -6394,13 +8980,13 @@ NoControl - 103, 14 + 137, 17 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 130 @@ -6424,13 +9010,13 @@ NoControl - 52, 14 + 69, 17 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 129 @@ -6454,13 +9040,13 @@ NoControl - 2, 14 + 3, 17 - 2, 3, 2, 3 + 3, 4, 3, 4 - 51, 30 + 68, 37 128 @@ -6480,36 +9066,6 @@ 22 - - 431, 64 - - - 2, 3, 2, 3 - - - 2, 3, 2, 3 - - - 256, 167 - - - 184 - - - Maths - - - grpMaths - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 7 - 17, 17 @@ -6520,10 +9076,13 @@ NoControl - 257, 306 + 343, 377 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 53 @@ -6550,10 +9109,13 @@ NoControl - 173, 306 + 231, 377 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 52 @@ -6580,10 +9142,13 @@ NoControl - 89, 306 + 119, 377 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 51 @@ -6610,10 +9175,13 @@ NoControl - 5, 306 + 7, 377 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 50 @@ -6640,10 +9208,13 @@ NoControl - 341, 277 + 455, 341 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 49 @@ -6670,10 +9241,13 @@ NoControl - 257, 277 + 343, 341 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 48 @@ -6700,10 +9274,13 @@ NoControl - 173, 277 + 231, 341 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 47 @@ -6730,10 +9307,13 @@ NoControl - 89, 277 + 119, 341 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 46 @@ -6760,10 +9340,13 @@ NoControl - 5, 277 + 7, 341 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 45 @@ -6790,10 +9373,13 @@ NoControl - 341, 248 + 455, 305 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 44 @@ -6820,10 +9406,13 @@ NoControl - 257, 248 + 343, 305 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 43 @@ -6850,10 +9439,13 @@ NoControl - 173, 248 + 231, 305 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 42 @@ -6880,10 +9472,13 @@ NoControl - 89, 248 + 119, 305 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 41 @@ -6910,10 +9505,13 @@ NoControl - 5, 248 + 7, 305 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 40 @@ -6940,10 +9538,13 @@ NoControl - 341, 219 + 455, 270 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 39 @@ -6970,10 +9571,13 @@ NoControl - 257, 219 + 343, 270 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 38 @@ -7000,10 +9604,13 @@ NoControl - 173, 219 + 231, 270 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 37 @@ -7030,10 +9637,13 @@ NoControl - 89, 219 + 119, 270 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 36 @@ -7060,10 +9670,13 @@ NoControl - 5, 219 + 7, 270 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 35 @@ -7090,10 +9703,13 @@ NoControl - 341, 189 + 455, 233 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 34 @@ -7120,10 +9736,13 @@ NoControl - 257, 189 + 343, 233 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 33 @@ -7150,10 +9769,13 @@ NoControl - 89, 189 + 119, 233 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 31 @@ -7180,10 +9802,13 @@ NoControl - 5, 189 + 7, 233 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 30 @@ -7210,10 +9835,13 @@ NoControl - 341, 160 + 455, 197 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 29 @@ -7240,10 +9868,13 @@ NoControl - 257, 160 + 343, 197 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 28 @@ -7270,10 +9901,13 @@ NoControl - 173, 160 + 231, 197 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 27 @@ -7300,10 +9934,13 @@ NoControl - 89, 160 + 119, 197 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 26 @@ -7330,10 +9967,13 @@ NoControl - 5, 160 + 7, 197 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 25 @@ -7360,10 +10000,13 @@ NoControl - 341, 102 + 455, 126 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 19 @@ -7390,10 +10033,13 @@ NoControl - 257, 102 + 343, 126 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 18 @@ -7420,10 +10066,13 @@ NoControl - 173, 102 + 231, 126 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 17 @@ -7450,10 +10099,13 @@ NoControl - 89, 102 + 119, 126 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 16 @@ -7480,10 +10132,13 @@ NoControl - 5, 102 + 7, 126 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 15 @@ -7510,10 +10165,13 @@ NoControl - 341, 72 + 455, 89 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 14 @@ -7540,10 +10198,13 @@ NoControl - 257, 72 + 343, 89 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 13 @@ -7570,10 +10231,13 @@ NoControl - 173, 72 + 231, 89 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 12 @@ -7600,10 +10264,13 @@ NoControl - 89, 72 + 119, 89 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 11 @@ -7630,10 +10297,13 @@ NoControl - 5, 72 + 7, 89 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 10 @@ -7660,10 +10330,13 @@ NoControl - 341, 43 + 455, 53 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 9 @@ -7690,10 +10363,13 @@ NoControl - 257, 43 + 343, 53 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 8 @@ -7720,10 +10396,13 @@ NoControl - 173, 43 + 231, 53 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 7 @@ -7750,10 +10429,13 @@ NoControl - 89, 43 + 119, 53 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 6 @@ -7780,58 +10462,226 @@ NoControl - 5, 43 + 7, 53 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 5 - - children + + children + + + cmdChildren + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 44 + + + Microsoft Sans Serif, 6.25pt + + + NoControl + + + 343, 161 + + + 4, 4, 4, 4 + + + 113, 37 + + + 23 + + + height + + + cmdHeight + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 51 + + + cmdLinkert7 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 0 + + + cmdLikert + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 22 + + + cmdCar + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 45 + + + cmdAnswer + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 46 + + + cmdPet + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 47 + + + cmdAnimal + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 48 + + + cmdAge + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 49 + + + cmdIncome + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 50 + + + cmdHair + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 52 + + + cmdGroup + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpWakefield + + + 53 - - cmdChildren + + cmdGrade - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpWakefield - - 44 + + 54 - - Microsoft Sans Serif, 6.25pt + + 573, 78 - - NoControl + + 4, 4, 4, 4 - - 257, 131 + + 4, 4, 4, 4 - - 85, 30 + + 579, 425 - - 23 + + 191 - - height + + Wakefield - - cmdHeight + + grpWakefield - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpWakefield + + $this - - 51 + + 5 Microsoft Sans Serif, 6.25pt @@ -7840,10 +10690,13 @@ NoControl - 341, 306 + 455, 377 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 54 @@ -7870,10 +10723,13 @@ NoControl - 173, 189 + 231, 233 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 32 @@ -7900,10 +10756,13 @@ NoControl - 341, 14 + 455, 17 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 4 @@ -7930,10 +10789,13 @@ NoControl - 257, 14 + 343, 17 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 3 @@ -7960,10 +10822,13 @@ NoControl - 173, 14 + 231, 17 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 2 @@ -7990,10 +10855,13 @@ NoControl - 89, 14 + 119, 17 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 1 @@ -8020,10 +10888,13 @@ NoControl - 5, 14 + 7, 17 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 0 @@ -8050,10 +10921,13 @@ NoControl - 341, 131 + 455, 161 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 24 @@ -8080,10 +10954,13 @@ NoControl - 173, 131 + 231, 161 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 22 @@ -8110,10 +10987,13 @@ NoControl - 89, 131 + 119, 161 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 21 @@ -8140,10 +11020,13 @@ NoControl - 5, 131 + 7, 161 + + + 4, 4, 4, 4 - 85, 30 + 113, 37 20 @@ -8163,41 +11046,239 @@ 54 - - 430, 63 + + cmdCircular + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 0 + + + cmdCircQuantile + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 1 + + + cmdCircMax + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 2 + + + cmdA1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 3 + + + cmdAngVar + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 4 + + + cmdCircRho + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 5 + + + cmdCircQ3 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 6 + + + cmdCircQ1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 7 + + + cmdCircMin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 8 + + + cmdAngDev + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 9 + + + cmdCircVar + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 10 + + + cmdCircSd + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 11 + + + cmdCircRange + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 12 + + + cmdMedianHL + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 13 + + + cmdCircMedian + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 14 + + + cmdCircMean + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 15 + + + 573, 75 + + + 3, 2, 3, 2 + + + 3, 2, 3, 2 - - 434, 345 + + 331, 190 - - 191 + + 192 - - Wakefield + + Circular - - grpWakefield + + grpCircular - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 5 + + 4 NoControl - 2, 18 + 3, 22 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 15 @@ -8221,13 +11302,13 @@ NoControl - 121, 81 + 161, 100 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 13 @@ -8251,13 +11332,13 @@ NoControl - 180, 113 + 240, 139 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 10 @@ -8281,13 +11362,13 @@ NoControl - 2, 81 + 3, 100 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 8 @@ -8311,13 +11392,13 @@ NoControl - 62, 81 + 83, 100 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 6 @@ -8341,13 +11422,13 @@ NoControl - 180, 81 + 240, 100 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 14 @@ -8371,13 +11452,13 @@ NoControl - 121, 113 + 161, 139 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 12 @@ -8401,13 +11482,13 @@ NoControl - 62, 113 + 83, 139 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 11 @@ -8431,13 +11512,13 @@ NoControl - 2, 113 + 3, 139 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 9 @@ -8461,13 +11542,13 @@ NoControl - 121, 50 + 161, 62 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 7 @@ -8491,13 +11572,13 @@ NoControl - 180, 50 + 240, 62 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 5 @@ -8511,203 +11592,443 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpCircular + + grpCircular + + + 10 + + + NoControl + + + 83, 62 + + + 3, 2, 3, 2 + + + 80, 39 + + + 4 + + + sd + + + cmdCircSd + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 11 + + + NoControl + + + 3, 62 + + + 3, 2, 3, 2 + + + 80, 39 + + + 3 + + + range + + + cmdCircRange + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 12 + + + NoControl + + + 240, 22 + + + 3, 2, 3, 2 + + + 80, 39 + + + 2 + + + medianHL + + + cmdMedianHL + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 13 + + + NoControl + + + 161, 22 + + + 3, 2, 3, 2 + + + 80, 39 + + + 1 + + + median + + + cmdCircMedian + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 14 + + + NoControl + + + 83, 22 + + + 3, 2, 3, 2 + + + 80, 39 + + + 0 + + + mean + + + cmdCircMean + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpCircular + + + 15 + + + cmdShuffle + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor + + + 0 + + + cmdShift + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor + + + 1 + + + cmdReverse + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor + + + 2 + + + cmdReorder + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor + + + 3 + + + cmdRelevel + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor + + + 4 + + + cmdRecode + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor + + + 5 + + + cmdOther + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor + + + 6 + + + cmdFmatch + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor - - 10 + + 7 - - NoControl + + cmdLump - - 62, 50 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 2, 2, 2 + + grpFactor - - 60, 32 + + 8 - - 4 + + cmdInseq - - sd + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdCircSd + + grpFactor - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 9 - - grpCircular + + cmdInfreq - - 11 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + grpFactor - - 2, 50 + + 10 - - 2, 2, 2, 2 + + cmdInorder - - 60, 32 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + grpFactor - - range + + 11 - - cmdCircRange + + cmdAdd_na - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpCircular + + grpFactor - + 12 - - NoControl - - - 180, 18 - - - 2, 2, 2, 2 + + cmdExpand - - 60, 32 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2 + + grpFactor - - medianHL + + 13 - - cmdMedianHL + + cmdDrop - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpCircular + + grpFactor - - 13 + + 14 - - NoControl + + cmdCross - - 121, 18 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 2, 2, 2 + + grpFactor - - 60, 32 + + 15 - - 1 + + cmdCollapse - - median + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdCircMedian + + grpFactor - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 16 - - grpCircular + + cmdLabelled - - 14 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + grpFactor - - 62, 18 + + 17 - - 2, 2, 2, 2 + + cmdFactor - - 60, 32 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + grpFactor - - mean + + 18 - - cmdCircMean + + cmdAnon - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpCircular + + grpFactor - - 15 + + 19 - - 430, 61 + + 573, 75 - - 2, 2, 2, 2 + + 3, 2, 3, 2 - - 2, 2, 2, 2 + + 3, 2, 3, 2 - - 248, 154 + + 331, 226 - - 192 + + 191 - - Circular + + Factor - - grpCircular + + grpFactor - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 4 + + 3 NoControl - 182, 143 + 243, 176 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 210 @@ -8731,13 +12052,13 @@ NoControl - 123, 143 + 164, 176 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 209 @@ -8761,13 +12082,13 @@ NoControl - 64, 143 + 85, 176 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 208 @@ -8791,13 +12112,13 @@ NoControl - 4, 143 + 5, 176 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 207 @@ -8821,13 +12142,13 @@ NoControl - 182, 111 + 243, 137 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 206 @@ -8851,13 +12172,13 @@ NoControl - 123, 111 + 164, 137 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 205 @@ -8881,13 +12202,13 @@ NoControl - 64, 111 + 85, 137 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 204 @@ -8911,13 +12232,13 @@ NoControl - 4, 111 + 5, 137 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 203 @@ -8941,13 +12262,13 @@ NoControl - 182, 80 + 243, 98 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 202 @@ -8971,13 +12292,13 @@ NoControl - 123, 80 + 164, 98 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 201 @@ -9001,13 +12322,13 @@ NoControl - 64, 80 + 85, 98 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 200 @@ -9031,13 +12352,13 @@ NoControl - 4, 80 + 5, 98 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 199 @@ -9061,13 +12382,13 @@ NoControl - 182, 48 + 243, 59 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 198 @@ -9091,13 +12412,13 @@ NoControl - 123, 48 + 164, 59 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 197 @@ -9121,13 +12442,13 @@ NoControl - 64, 48 + 85, 59 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 196 @@ -9151,13 +12472,13 @@ NoControl - 4, 48 + 5, 59 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 195 @@ -9181,13 +12502,13 @@ NoControl - 182, 16 + 243, 20 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 194 @@ -9211,13 +12532,13 @@ NoControl - 123, 16 + 164, 20 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 193 @@ -9241,13 +12562,13 @@ NoControl - 4, 16 + 5, 20 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 191 @@ -9264,80 +12585,128 @@ grpFactor - - 18 + + 18 + + + NoControl + + + 85, 20 + + + 3, 2, 3, 2 + + + 80, 39 + + + 192 + + + anon + + + cmdAnon + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpFactor + + + 19 + + + cmdRegex + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpModifier + + + 0 + + + cmdFixed + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + grpModifier - - 64, 16 + + 1 - - 2, 2, 2, 2 + + cmdCollate - - 60, 32 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 192 + + grpModifier - - anon + + 2 - - cmdAnon + + cmdBoundary - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpFactor + + grpModifier - - 19 + + 3 - - 430, 61 + + 579, 278 - - 2, 2, 2, 2 + + 3, 2, 3, 2 - - 2, 2, 2, 2 + + 3, 2, 3, 2 - - 248, 184 + + 341, 65 - - 191 + + 192 - - Factor + + Modifier - - grpFactor + + grpModifier - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 3 + + 12 NoControl - 188, 13 + 251, 16 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 3 @@ -9361,13 +12730,13 @@ NoControl - 126, 13 + 168, 16 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 2 @@ -9391,13 +12760,13 @@ NoControl - 64, 13 + 85, 16 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 1 @@ -9421,13 +12790,13 @@ NoControl - 2, 13 + 3, 16 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 0 @@ -9447,47 +12816,227 @@ 3 - - 434, 226 + + cmdOr3 - - 2, 2, 2, 2 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 2, 2, 2 + + grpSymbols - - 256, 53 + + 0 + + + cmdEscape + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 1 + + + cmdPlusZero + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 2 + + + cmdZero + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 3 + + + cmdPlusOne + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 4 + + + cmdZeroOrOne + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 5 + + + cmdNumbers + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 6 + + + cmdNot1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 7 + + + cmdOr2 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 8 + + + cmdOr1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 9 + + + cmdSpace + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 10 + + + cmdDigit + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 11 + + + cmdEnd1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 12 + + + cmdbegin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 13 + + + cmdAny1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 14 + + + 577, 347 + + + 3, 2, 3, 2 + + + 3, 2, 3, 2 + + + 421, 138 - - 192 + + 193 - - Modifier + + Symbols - - grpModifier + + grpSymbols - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 12 + + 11 NoControl - 127, 46 + 169, 57 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 16 @@ -9511,13 +13060,13 @@ NoControl - 189, 75 + 252, 92 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 14 @@ -9541,13 +13090,13 @@ NoControl - 251, 75 + 335, 92 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 15 @@ -9571,13 +13120,13 @@ NoControl - 127, 75 + 169, 92 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 13 @@ -9601,13 +13150,13 @@ NoControl - 64, 75 + 85, 92 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 12 @@ -9631,13 +13180,13 @@ NoControl - 2, 75 + 3, 92 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 11 @@ -9661,13 +13210,13 @@ NoControl - 251, 46 + 335, 57 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 10 @@ -9691,13 +13240,13 @@ NoControl - 64, 46 + 85, 57 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 8 @@ -9721,13 +13270,13 @@ NoControl - 189, 46 + 252, 57 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 9 @@ -9751,13 +13300,13 @@ NoControl - 2, 46 + 3, 57 - 2, 2, 2, 2 + 3, 2, 3, 2 - 63, 30 + 84, 37 7 @@ -9780,194 +13329,446 @@ NoControl - - 251, 16 + + 335, 20 + + + 3, 2, 3, 2 + + + 84, 37 + + + 6 + + + \s space + + + cmdSpace + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 10 + + + NoControl + + + 252, 20 + + + 3, 2, 3, 2 + + + 84, 37 + + + 5 + + + \d digit + + + cmdDigit + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 11 + + + NoControl + + + 169, 20 + + + 3, 2, 3, 2 + + + 84, 37 + + + 4 + + + $ end + + + cmdEnd1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 12 + + + NoControl + + + 85, 20 + + + 3, 2, 3, 2 + + + 84, 37 + + + 3 + + + ^ begin + + + cmdbegin + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 13 + + + NoControl + + + 3, 20 + + + 3, 2, 3, 2 + + + 84, 37 + + + 2 + + + . any + + + cmdAny1 + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpSymbols + + + 14 + + + cmdVE + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 0 + + + cmdSsq + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 1 + + + cmdRsr + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 2 + + + cmdRSD + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 3 + + + cmdRPearson + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 4 + + + cmdRNSE + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 5 + + + cmdRmse + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 6 + + + cmdRd + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 7 + + + cmdPbiasfde + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHydroGOF + + + 8 - - 2, 2, 2, 2 + + cmdPbias - - 63, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 6 + + grpHydroGOF - - \s space + + 9 - - cmdSpace + + cmdNSE - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSymbols + + grpHydroGOF - + 10 - - NoControl + + cmdNrmse - - 189, 16 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 2, 2, 2 + + grpHydroGOF - - 63, 30 + + 11 - - 5 + + cmdMse - - \d digit + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdDigit + + grpHydroGOF - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 12 - - grpSymbols + + cmdmNSE - - 11 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + grpHydroGOF - - 127, 16 + + 13 - - 2, 2, 2, 2 + + cmdMe - - 63, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 4 + + grpHydroGOF - - $ end + + 14 - - cmdEnd1 + + cmdMd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSymbols + + grpHydroGOF - - 12 + + 15 - - NoControl + + cmdMae - - 64, 16 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2, 2, 2, 2 + + grpHydroGOF - - 63, 30 + + 16 - - 3 + + cmdKGE - - ^ begin + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdbegin + + grpHydroGOF - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17 - - grpSymbols + + cmdD - - 13 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - NoControl + + grpHydroGOF - - 2, 16 + + 18 - - 2, 2, 2, 2 + + cmdCp - - 63, 30 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 2 + + grpHydroGOF - - . any + + 19 - - cmdAny1 + + cmdBr2 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpSymbols + + grpHydroGOF - - 14 + + 20 - - 433, 282 + + 569, 75 - - 2, 2, 2, 2 + + 3, 2, 3, 2 - - 2, 2, 2, 2 + + 3, 2, 3, 2 - - 316, 112 + + 244, 302 - - 193 + + 195 - - Symbols + + hydroGOF - - grpSymbols + + grpHydroGOF - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 11 + + 1 NoControl - 120, 206 + 160, 254 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 20 @@ -9991,13 +13792,13 @@ NoControl - 61, 206 + 81, 254 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 19 @@ -10021,13 +13822,13 @@ NoControl - 2, 206 + 3, 254 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 18 @@ -10051,13 +13852,13 @@ NoControl - 120, 175 + 160, 215 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 17 @@ -10081,13 +13882,13 @@ NoControl - 61, 175 + 81, 215 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 16 @@ -10111,13 +13912,13 @@ NoControl - 2, 175 + 3, 215 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 15 @@ -10141,13 +13942,13 @@ NoControl - 120, 143 + 160, 176 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 14 @@ -10171,13 +13972,13 @@ NoControl - 61, 143 + 81, 176 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 13 @@ -10201,13 +14002,13 @@ NoControl - 2, 143 + 3, 176 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 12 @@ -10231,13 +14032,13 @@ NoControl - 120, 111 + 160, 137 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 11 @@ -10261,13 +14062,13 @@ NoControl - 61, 111 + 81, 137 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 10 @@ -10291,13 +14092,13 @@ NoControl - 2, 111 + 3, 137 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 9 @@ -10321,13 +14122,13 @@ NoControl - 120, 80 + 160, 98 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 8 @@ -10351,13 +14152,13 @@ NoControl - 61, 80 + 81, 98 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 7 @@ -10381,13 +14182,13 @@ NoControl - 2, 80 + 3, 98 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 6 @@ -10411,13 +14212,13 @@ NoControl - 120, 48 + 160, 59 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 5 @@ -10441,13 +14242,13 @@ NoControl - 61, 48 + 81, 59 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 4 @@ -10471,13 +14272,13 @@ NoControl - 2, 48 + 3, 59 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 3 @@ -10501,13 +14302,13 @@ NoControl - 120, 16 + 160, 20 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 2 @@ -10531,13 +14332,13 @@ NoControl - 61, 16 + 81, 20 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 1 @@ -10561,13 +14362,13 @@ NoControl - 2, 16 + 3, 20 - 2, 2, 2, 2 + 3, 2, 3, 2 - 60, 32 + 80, 39 0 @@ -10587,41 +14388,38 @@ 20 - - 427, 61 - - - 2, 2, 2, 2 - - - 2, 2, 2, 2 + + 15, 383 - - 183, 245 + + 5, 6, 5, 6 - - 195 + + 410, 27 - - hydroGOF + + 196 - - grpHydroGOF + + ucrSaveResultInto - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 1 + + 0 - 1, 256 + 1, 315 + + + 5, 5, 5, 5 - 396, 33 + 528, 41 194 @@ -10639,13 +14437,13 @@ 2 - 226, 41 + 301, 50 - 2, 3, 2, 3 + 3, 4, 3, 4 - 137, 22 + 183, 27 180 @@ -10663,13 +14461,13 @@ 17 - 0, 64 + 0, 79 0, 0, 0, 0 - 210, 181 + 280, 223 173 @@ -10687,13 +14485,13 @@ 19 - 70, 6 + 93, 7 - 2, 3, 2, 3 + 3, 4, 3, 4 - 391, 29 + 521, 36 120 @@ -10710,30 +14508,6 @@ 20 - - 11, 311 - - - 4, 5, 4, 5 - - - 327, 21 - - - 196 - - - ucrSaveResultInto - - - instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 0 - True @@ -10741,10 +14515,13 @@ 41 - 6, 13 + 8, 16 + + + 4, 4, 4, 4 - 878, 457 + 1171, 562 ttCalculator From 134ac0ceaaceee111ae4f9282480cd0973fb4a60 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 13:42:14 +0300 Subject: [PATCH 060/277] Minor edit --- instat/sdgCalculationsSummmary.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/sdgCalculationsSummmary.vb b/instat/sdgCalculationsSummmary.vb index 660e7b9c3a9..220db82210d 100644 --- a/instat/sdgCalculationsSummmary.vb +++ b/instat/sdgCalculationsSummmary.vb @@ -64,7 +64,6 @@ Public Class sdgCalculationsSummmary ucrCalcSummary.ucrReceiverForCalculation.bAttachedToPrimaryDataFrame = False 'temp until working - ucrCalcSummary.chkSaveResultInto.Visible = False ucrCalcSummary.ucrSaveResultInto.Visible = False 'ucrCalcSummary.ucrTryModelling.Visible = False From b111b5ed3e30d0d36d1aca91f788e1ee0559b8d7 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 16:07:51 +0300 Subject: [PATCH 061/277] Adding plot to the option in cumulative/exceedance and Two Variable graph dialogs --- instat/dlgCumulativeDistribution.resx | 4 ++-- instat/dlgDescribeTwoVarGraph.resx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/instat/dlgCumulativeDistribution.resx b/instat/dlgCumulativeDistribution.resx index 3c862126241..d943fcbd767 100644 --- a/instat/dlgCumulativeDistribution.resx +++ b/instat/dlgCumulativeDistribution.resx @@ -157,13 +157,13 @@ 10, 247 - 120, 25 + 119, 23 5 - Options + Plot Options cmdPlotOptions diff --git a/instat/dlgDescribeTwoVarGraph.resx b/instat/dlgDescribeTwoVarGraph.resx index 4a887a215b1..3624cad8d6a 100644 --- a/instat/dlgDescribeTwoVarGraph.resx +++ b/instat/dlgDescribeTwoVarGraph.resx @@ -126,14 +126,14 @@ 10, 197 - 120, 23 + 119, 23 5 - Options + Plot Options cmdOptions From 43f8bf0eb3a697c4d1c3f2d77be31f6feceeadd5 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 16:33:14 +0300 Subject: [PATCH 062/277] Setting autofill for the maximum temperature receiver --- instat/dlgClimaticCheckDataTemperature.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgClimaticCheckDataTemperature.vb b/instat/dlgClimaticCheckDataTemperature.vb index b6637a6e69a..c23356abbde 100644 --- a/instat/dlgClimaticCheckDataTemperature.vb +++ b/instat/dlgClimaticCheckDataTemperature.vb @@ -107,6 +107,7 @@ Public Class dlgClimaticCheckDataTemperature ucrReceiverElement1.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) ucrReceiverElement1.SetParameterIsString() ucrReceiverElement1.bWithQuotes = False + ucrReceiverElement1.bAutoFill = True ucrReceiverElement1.SetMeAsReceiver() ucrReceiverElement2.Selector = ucrSelectorTemperature From 9ad56c690f8a257a35b5d134be5501195fc69dc3 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 16:34:18 +0300 Subject: [PATCH 063/277] Setting autofill for the Mininum temperature receiver --- instat/dlgClimaticCheckDataTemperature.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgClimaticCheckDataTemperature.vb b/instat/dlgClimaticCheckDataTemperature.vb index c23356abbde..cf60c8ecb84 100644 --- a/instat/dlgClimaticCheckDataTemperature.vb +++ b/instat/dlgClimaticCheckDataTemperature.vb @@ -113,6 +113,7 @@ Public Class dlgClimaticCheckDataTemperature ucrReceiverElement2.Selector = ucrSelectorTemperature ucrReceiverElement2.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) ucrReceiverElement2.SetParameterIsString() + ucrReceiverElement2.bAutoFill = True ucrReceiverElement2.bWithQuotes = False 'Checkboxes for options From b52ac4d7cfead17ebc3d842178305273e6769433 Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 17:42:37 +0300 Subject: [PATCH 064/277] Setting the autofil for tmax --- instat/dlgClimaticCheckDataTemperature.vb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/instat/dlgClimaticCheckDataTemperature.vb b/instat/dlgClimaticCheckDataTemperature.vb index cf60c8ecb84..4863e9d9a07 100644 --- a/instat/dlgClimaticCheckDataTemperature.vb +++ b/instat/dlgClimaticCheckDataTemperature.vb @@ -614,6 +614,16 @@ Public Class dlgClimaticCheckDataTemperature strCurrDataFrame = Chr(34) & ucrSelectorTemperature.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34) End Sub + Private Sub AutoFillTemColumns() + Dim StrTmaxCol As String + Dim StrTmin As String + Dim StrDataFrame As String + + StrDataFrame = ucrSelectorTemperature.ucrAvailableDataFrames.cboAvailableDataFrames.Text + StrTmaxCol = frmMain.clsRLink.GetClimaticColumnOfType(StrDataFrame, "tmax_label") + + End Sub + Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged GroupByOptions() End Sub From 545eb45a29bc0bd15a114b6ae489f640256205ed Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 17:43:41 +0300 Subject: [PATCH 065/277] Setting an autofill for the minimum temperature --- instat/dlgClimaticCheckDataTemperature.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgClimaticCheckDataTemperature.vb b/instat/dlgClimaticCheckDataTemperature.vb index 4863e9d9a07..0aa2c18c7c0 100644 --- a/instat/dlgClimaticCheckDataTemperature.vb +++ b/instat/dlgClimaticCheckDataTemperature.vb @@ -616,11 +616,12 @@ Public Class dlgClimaticCheckDataTemperature Private Sub AutoFillTemColumns() Dim StrTmaxCol As String - Dim StrTmin As String + Dim StrTminCol As String Dim StrDataFrame As String StrDataFrame = ucrSelectorTemperature.ucrAvailableDataFrames.cboAvailableDataFrames.Text StrTmaxCol = frmMain.clsRLink.GetClimaticColumnOfType(StrDataFrame, "tmax_label") + StrTminCol = frmMain.clsRLink.GetClimaticColumnOfType(StrDataFrame, "tmin_label") End Sub From ec5a17066e8d7f4d42704c7f351aa8b8bc4bd12e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 17:49:48 +0300 Subject: [PATCH 066/277] Setting of an autofill for both tmax and tmin receivers --- instat/dlgClimaticCheckDataTemperature.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instat/dlgClimaticCheckDataTemperature.vb b/instat/dlgClimaticCheckDataTemperature.vb index 0aa2c18c7c0..a36bbbf49aa 100644 --- a/instat/dlgClimaticCheckDataTemperature.vb +++ b/instat/dlgClimaticCheckDataTemperature.vb @@ -623,6 +623,11 @@ Public Class dlgClimaticCheckDataTemperature StrTmaxCol = frmMain.clsRLink.GetClimaticColumnOfType(StrDataFrame, "tmax_label") StrTminCol = frmMain.clsRLink.GetClimaticColumnOfType(StrDataFrame, "tmin_label") + If StrTmaxCol <> "" AndAlso StrTminCol <> "" Then + ucrReceiverElement1.Add(StrTmaxCol, StrDataFrame) + ucrReceiverElement2.Add(StrTminCol, StrDataFrame) + End If + End Sub Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged From 34de7f26e114c53f0cf14c7889c04090de67753e Mon Sep 17 00:00:00 2001 From: Wycklife Date: Mon, 24 Aug 2020 23:14:25 +0300 Subject: [PATCH 067/277] Setting an autofill for both tmax and tmin receivers --- instat/dlgClimaticCheckDataTemperature.vb | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/instat/dlgClimaticCheckDataTemperature.vb b/instat/dlgClimaticCheckDataTemperature.vb index a36bbbf49aa..f8be048aacb 100644 --- a/instat/dlgClimaticCheckDataTemperature.vb +++ b/instat/dlgClimaticCheckDataTemperature.vb @@ -107,12 +107,14 @@ Public Class dlgClimaticCheckDataTemperature ucrReceiverElement1.SetParameter(New RParameter("x", 0, bNewIncludeArgumentName:=False)) ucrReceiverElement1.SetParameterIsString() ucrReceiverElement1.bWithQuotes = False + ucrReceiverElement1.SetClimaticType("temp_max") ucrReceiverElement1.bAutoFill = True ucrReceiverElement1.SetMeAsReceiver() ucrReceiverElement2.Selector = ucrSelectorTemperature ucrReceiverElement2.SetParameter(New RParameter("x", 1, bNewIncludeArgumentName:=False)) ucrReceiverElement2.SetParameterIsString() + ucrReceiverElement2.SetClimaticType("temp_min") ucrReceiverElement2.bAutoFill = True ucrReceiverElement2.bWithQuotes = False @@ -614,22 +616,6 @@ Public Class dlgClimaticCheckDataTemperature strCurrDataFrame = Chr(34) & ucrSelectorTemperature.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34) End Sub - Private Sub AutoFillTemColumns() - Dim StrTmaxCol As String - Dim StrTminCol As String - Dim StrDataFrame As String - - StrDataFrame = ucrSelectorTemperature.ucrAvailableDataFrames.cboAvailableDataFrames.Text - StrTmaxCol = frmMain.clsRLink.GetClimaticColumnOfType(StrDataFrame, "tmax_label") - StrTminCol = frmMain.clsRLink.GetClimaticColumnOfType(StrDataFrame, "tmin_label") - - If StrTmaxCol <> "" AndAlso StrTminCol <> "" Then - ucrReceiverElement1.Add(StrTmaxCol, StrDataFrame) - ucrReceiverElement2.Add(StrTminCol, StrDataFrame) - End If - - End Sub - Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged GroupByOptions() End Sub From e94d398ca5554af19de30e2a67291dbd3a80e4f2 Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Tue, 25 Aug 2020 09:20:46 +0200 Subject: [PATCH 068/277] Update instat/dlgDescribeTwoVarGraph.resx --- instat/dlgDescribeTwoVarGraph.resx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgDescribeTwoVarGraph.resx b/instat/dlgDescribeTwoVarGraph.resx index 3624cad8d6a..3bd0c2d02a7 100644 --- a/instat/dlgDescribeTwoVarGraph.resx +++ b/instat/dlgDescribeTwoVarGraph.resx @@ -133,7 +133,7 @@ 5 - Plot Options + Plot Options cmdOptions @@ -804,4 +804,4 @@ 5 - \ No newline at end of file + From 838524ca1a8fd92facd4f18ae96d103332d8eb84 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Tue, 25 Aug 2020 19:53:20 +0300 Subject: [PATCH 069/277] Changes for the ucrSave and resetting bug --- instat/dlgDisplayDailyData.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index e7cb61a3d83..a01d441efc7 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -220,7 +220,7 @@ Public Class dlgDisplayDailyData ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboMissing, ucrChkMissing}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboTrace, ucrChkTrace}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboZero, ucrChkZero}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlFrequencyDisplay.AddToLinkedControls(ucrChkSum, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencyDisplay.AddToLinkedControls(ucrChkSum, {rdoTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls(ucrSaveGraph, {rdoGraph, rdoGraphByYear}, bNewLinkedHideIfParameterMissing:=True) ucrChkNumberOfColumns.AddToLinkedControls(ucrNudNumberOfColumns, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) ucrNudNumberOfColumns.SetLinkedDisplayControl(lblNumberOfColumns) @@ -258,6 +258,7 @@ Public Class dlgDisplayDailyData clsLabelWrapGenFunction = New RFunction ucrNudNumberOfColumns.SetText("1") + ucrSaveGraph.Reset() clsStationElemFacetOperator.SetOperation("~") @@ -359,6 +360,8 @@ Public Class dlgDisplayDailyData ucrReceiverDate.AddAdditionalCodeParameterPair(clsDisplayDailyTable, New RParameter("date_col", 2), iAdditionalPairNo:=1) ucrReceiverDate.AddAdditionalCodeParameterPair(clsIdVarsFunction, New RParameter("date", iNewPosition:=1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) + ucrSelectorDisplayDailyClimaticData.AddAdditionalCodeParameterPair(clsDisplayDailyGraphFunction, New RParameter("data_name", 0), iAdditionalPairNo:=1) + ucrChkSum.SetRCode(clsConcFunction, bReset) ucrChkMax.SetRCode(clsConcFunction, bReset) ucrChkMin.SetRCode(clsConcFunction, bReset) @@ -453,7 +456,6 @@ Public Class dlgDisplayDailyData End Sub Private Sub ucrSelectorDisplayDailyClimaticData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorDisplayDailyClimaticData.ControlValueChanged, ucrReceiverStations.ControlValueChanged - clsDisplayDailyGraphFunction.AddParameter("data_name", Chr(34) & ucrSelectorDisplayDailyClimaticData.ucrAvailableDataFrames.strCurrDataFrame & Chr(34), iPosition:=0) StackingFunction() End Sub '''-------------------------------------------------------------------------------------------- From 8bc2b8124ac833edff4f839047bd475a4876f1e2 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 26 Aug 2020 16:41:28 +0300 Subject: [PATCH 070/277] Update instat/clsPopup.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/clsPopup.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/clsPopup.vb b/instat/clsPopup.vb index 0ddd0c73dff..05b3e692a6d 100644 --- a/instat/clsPopup.vb +++ b/instat/clsPopup.vb @@ -14,7 +14,8 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . Public Class clsPopup - 'event raised when the contents control loses focus. Indeicates that the popup is closing + ''' Event raised when the contents control loses focus. + ''' This indicates that the popup is closing. Public Event Closing() Private ReadOnly frm As Form From 4e025966dc9db9838f60b997bbd84d98062de289 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 26 Aug 2020 17:07:58 +0300 Subject: [PATCH 071/277] proposed comments additions and formatting --- instat/clsPopup.vb | 42 +++++++++++++++++++++++++++++++++++++----- instat/dlgEnter.vb | 5 +++++ 2 files changed, 42 insertions(+), 5 deletions(-) diff --git a/instat/clsPopup.vb b/instat/clsPopup.vb index 05b3e692a6d..b831f20acec 100644 --- a/instat/clsPopup.vb +++ b/instat/clsPopup.vb @@ -13,19 +13,51 @@ ' ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . + +'''-------------------------------------------------------------------------------------------- +''' +''' An object of this class represents a popup component that's used and displayed as a control. +''' +''' +''' set contents control of the popup +''' +''' +''' set size of the popup +''' +''' +''' specify the display position of the popup relative to the owner. Default is top +''' +''' +''' attach the owner control and show the popup +''' +''' +''' +'''-------------------------------------------------------------------------------------------- Public Class clsPopup - ''' Event raised when the contents control loses focus. - ''' This indicates that the popup is closing. + ''' + ''' Event raised when the contents control loses focus. + ''' This indicates that the popup is closing. + ''' Public Event Closing() + ''' + ''' Container used as the 'frame' of the popup component + ''' Private ReadOnly frm As Form - 'specifies if the popup should hide automatically on lost focus or not + + ''' + ''' specifies if the popup should hide automatically on lost focus or not + ''' Public Property AutoHide As Boolean - 'specifies the position of the popup relative to the owner(control) + ''' + ''' specifies the position of the popup relative to the owner(control) + ''' Public Property Position As PopupPosition - 'enumeration of allowable popup positions + ''' + ''' enumeration of allowable popup positions + ''' Public Enum PopupPosition Top Below diff --git a/instat/dlgEnter.vb b/instat/dlgEnter.vb index 87cbdf59609..05181d4d519 100644 --- a/instat/dlgEnter.vb +++ b/instat/dlgEnter.vb @@ -291,6 +291,11 @@ Public Class dlgEnter SaveResults() End Sub + ''' + ''' displays a popup with example commands just above the input receiver + ''' + ''' + ''' Private Sub btnExample_Click(sender As Object, e As EventArgs) Handles btnExample.Click Dim objPopup As New clsPopup Dim lstView As New ListView With { From ed5d93c0c98652cfc6272e49e562b83a07b26963 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 26 Aug 2020 18:34:07 +0300 Subject: [PATCH 072/277] comments additions and if statement replacements --- instat/dlgFromLibrary.vb | 68 +++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 32 deletions(-) diff --git a/instat/dlgFromLibrary.vb b/instat/dlgFromLibrary.vb index 6fdeeaa2921..b8eec57d14f 100644 --- a/instat/dlgFromLibrary.vb +++ b/instat/dlgFromLibrary.vb @@ -14,7 +14,6 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . -Imports instat Imports instat.Translations Imports RDotNet @@ -237,6 +236,10 @@ Public Class dlgFromLibrary SetParameterValues() End Sub + ''' + ''' sets the R parameters and functions used by the main import function + ''' in importing datasets of different R types + ''' Private Sub SetParameterValues() Dim strSelectedDataName As String Dim strVecOutput As CharacterVector @@ -262,37 +265,38 @@ Public Class dlgFromLibrary Dim clsListFunction As New RFunction 'defines the list function. list(x=x) Dim clsListParameterFunction As New RFunction 'defines the function that act as list parameters e.g list(y=fortify.zoo(x)) clsListFunction.SetRCommand("list") - If strRClass = "zoo" Then - 'this is the recommended command for converting zoo object types to data frames. - 'In R-Instat the data.frame doesn't convert this object type well. See issue #5649 - clsListParameterFunction.SetPackageName("zoo") - clsListParameterFunction.SetRCommand("fortify.zoo") - clsListParameterFunction.AddParameter("model", strParameterValue:=strSelectedDataName) - clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) - ElseIf strRClass = "spatialpolygonsdataframe" Then - 'for some reason, objects of this type have to be explicitly coerced to data.frame - 'before being imported by import R-Instat function - clsListParameterFunction.SetRCommand("data.frame") - clsListParameterFunction.AddParameter("x", strParameterValue:=strSelectedDataName) - clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) - ElseIf strRClass = "dgcmatrix" OrElse strRClass = "dscmatrix" Then - 'this if block is used for dgcmatrix,dscmatrix. - 'The R summary() function returns an object of type data.frame if given a matrix. Used here to coerce it to data.frame - 'todo. this needs to be investigated further on the best(correct) command for coercing this type of data. - 'the data.frame command is unable to coerce data of this class type hence it's own block form the matrix command - clsListParameterFunction.SetRCommand("summary") - clsListParameterFunction.AddParameter("object", strParameterValue:=strSelectedDataName) - clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) - ElseIf strRClass = "matrix" Then - 'this if block is used for matrix type - 'this has been done in it's own block in anticipation of a correct way of coercing matrix to data frame - 'currently this command loses data(some columns) of the matrix once it's coerced. See issue #5649 - clsListParameterFunction.SetRCommand("data.frame") - clsListParameterFunction.AddParameter("x", strParameterValue:=strSelectedDataName) - clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) - Else - clsListFunction.AddParameter(ucrNewDataFrameName.GetText, strParameterValue:=strSelectedDataName) - End If + Select Case strRClass + Case "zoo" + 'this is the recommended command for converting zoo object types to data frames. + 'In R-Instat the data.frame doesn't convert this object type well. See issue #5649 + clsListParameterFunction.SetPackageName("zoo") + clsListParameterFunction.SetRCommand("fortify.zoo") + clsListParameterFunction.AddParameter("model", strParameterValue:=strSelectedDataName) + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) + Case "spatialpolygonsdataframe" + 'for some reason, objects of this type have to be explicitly coerced to data.frame + 'before being imported by import R-Instat function + clsListParameterFunction.SetRCommand("data.frame") + clsListParameterFunction.AddParameter("x", strParameterValue:=strSelectedDataName) + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) + Case "dgcmatrix", "dscmatrix" + 'this if block is used for dgcmatrix,dscmatrix. + 'The R summary() function returns an object of type data.frame if given a matrix. Used here to coerce it to data.frame + 'todo. this needs to be investigated further on the best(correct) command for coercing this type of data. + 'the data.frame command is unable to coerce data of this class type hence it's own block form the matrix command + clsListParameterFunction.SetRCommand("summary") + clsListParameterFunction.AddParameter("object", strParameterValue:=strSelectedDataName) + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) + Case "matrix" + 'this if block is used for matrix type + 'this has been done in it's own block in anticipation of a correct way of coercing matrix to data frame + 'currently this command loses data(some columns) of the matrix once it's coerced. See issue #5649 + clsListParameterFunction.SetRCommand("data.frame") + clsListParameterFunction.AddParameter("x", strParameterValue:=strSelectedDataName) + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, clsRFunctionParameter:=clsListParameterFunction) + Case Else + clsListFunction.AddParameter(ucrNewDataFrameName.GetText, strParameterValue:=strSelectedDataName) + End Select clsImportFunction.AddParameter("data_tables", clsRFunctionParameter:=clsListFunction) End If End Sub From 280cdce750cbc601194fa4cf2c2d4179ce0abdd0 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 27 Aug 2020 12:50:06 +0300 Subject: [PATCH 073/277] Removing unused code --- instat/dlgCalculator.vb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 6ef5c2785c3..8d7793b5709 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -18,8 +18,6 @@ Imports instat.Translations Imports RDotNet Public Class dlgCalculator - Dim strCalcHistory As List(Of String) - Dim dataset As DataFrame Dim clsAttach As New RFunction Dim clsDetach As New RFunction Public bFirstLoad As Boolean = True @@ -87,7 +85,7 @@ Public Class dlgCalculator End Sub Private Sub SaveResults() - If ucrCalc.ucrSaveResultInto.Iscomplete Then + If ucrCalc.ucrSaveResultInto.IsComplete Then ucrBase.clsRsyntax.SetAssignTo(ucrCalc.ucrSaveResultInto.GetText(), strTempColumn:=ucrCalc.ucrSaveResultInto.GetText(), strTempDataframe:=ucrCalc.ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.Text) ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = True ucrBase.clsRsyntax.iCallType = 0 From 1648ac9bfc1dfe199ae8c802fd150b2280e921d9 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 27 Aug 2020 16:53:58 +0300 Subject: [PATCH 074/277] Calculator designer improvements --- instat/dlgCalculator.resx | 21 +- instat/dlgCalculator.vb | 18 +- instat/ucrCalculator.resx | 11486 ++++++++++++------------------------ 3 files changed, 3885 insertions(+), 7640 deletions(-) diff --git a/instat/dlgCalculator.resx b/instat/dlgCalculator.resx index 4cf0dbc2027..20cb163f830 100644 --- a/instat/dlgCalculator.resx +++ b/instat/dlgCalculator.resx @@ -119,14 +119,14 @@ - 17, 537 + 1, 372 - 5, 5, 5, 5 + 4, 4, 4, 4 - 547, 64 + 410, 52 @@ -145,13 +145,13 @@ 0 - 16, 6 + 12, 5 - 5, 5, 5, 5 + 4, 4, 4, 4 - 657, 441 + 493, 358 174 @@ -172,13 +172,16 @@ True - 8, 16 + 6, 13 - 689, 611 + 517, 429 + + + NoControl - 3, 4, 3, 4 + 2, 3, 2, 3 CenterScreen diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 8d7793b5709..77a190bb27e 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -23,12 +23,14 @@ Public Class dlgCalculator Public bFirstLoad As Boolean = True Public iHelpCalcID As Integer Private iBasicWidth As Integer + Private iBaseY As Integer Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) If bFirstLoad Then InitialiseDialog() iBasicWidth = Me.Width + iBaseY = ucrBase.Location.Y SetDefaults() bFirstLoad = False Else @@ -118,32 +120,46 @@ Public Class dlgCalculator Select Case ucrCalc.ucrInputCalOptions.GetText Case "Maths" Me.Size = New System.Drawing.Size(iBasicWidth * 1.38, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Logical and Symbols" Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Summary" Me.Size = New System.Drawing.Size(iBasicWidth * 1.43, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Strings (Character Columns)" Me.Size = New System.Drawing.Size(iBasicWidth * 1.47, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Factor" Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Probability" Me.Size = New System.Drawing.Size(iBasicWidth * 1.5, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Dates" Me.Size = New System.Drawing.Size(iBasicWidth * 1.3, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Transform" Me.Size = New System.Drawing.Size(iBasicWidth * 1.35, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Circular" Me.Size = New System.Drawing.Size(iBasicWidth * 1.36, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Wakefield" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, Me.Height * 1.1) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY + 60) Case "Modifier" Me.Size = New Size(iBasicWidth * 1.39, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Symbols" Me.Size = New Size(iBasicWidth * 2.56, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "hydroGOF" Me.Size = New System.Drawing.Size(iBasicWidth * 1.27, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case Else Me.Size = New System.Drawing.Size(iBasicWidth, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) End Select End Sub diff --git a/instat/ucrCalculator.resx b/instat/ucrCalculator.resx index fac14925a82..5d9c6a7a913 100644 --- a/instat/ucrCalculator.resx +++ b/instat/ucrCalculator.resx @@ -127,10 +127,13 @@ - 11, 12 + 8, 10 + + + 2, 0, 2, 0 - 77, 17 + 58, 13 119 @@ -154,13 +157,10 @@ NoControl - 415, 281 - - - 4, 4, 4, 4 + 311, 228 - 100, 28 + 75, 23 182 @@ -187,13 +187,10 @@ NoControl - 93, 50 - - - 4, 4, 4, 4 + 70, 41 - 141, 21 + 109, 17 181 @@ -213,6 +210,24 @@ 16 + + NoControl + + + 151, 71 + + + 2, 3, 2, 3 + + + 49, 60 + + + 190 + + + Clear + cmdClear @@ -225,6 +240,27 @@ 0 + + Microsoft Sans Serif, 12pt + + + NoControl + + + 3, 100 + + + 2, 3, 2, 3 + + + 38, 30 + + + 138 + + + , + cmdComma @@ -237,6 +273,24 @@ 1 + + NoControl + + + 77, 100 + + + 2, 3, 2, 3 + + + 38, 30 + + + 136 + + + ( ) + cmdBrackets @@ -249,6 +303,27 @@ 2 + + Microsoft Sans Serif, 14.25pt + + + NoControl + + + 151, 42 + + + 2, 3, 2, 3 + + + 49, 30 + + + 133 + + + ^ + cmdPower @@ -261,6 +336,27 @@ 3 + + Microsoft Sans Serif, 14.25pt + + + NoControl + + + 114, 13 + + + 2, 3, 2, 3 + + + 38, 30 + + + 131 + + + / + cmdDivide @@ -273,6 +369,27 @@ 4 + + Microsoft Sans Serif, 14.25pt + + + NoControl + + + 114, 100 + + + 2, 3, 2, 3 + + + 38, 30 + + + 130 + + + + + cmdPlus @@ -285,6 +402,27 @@ 5 + + Microsoft Sans Serif, 14.25pt + + + NoControl + + + 114, 71 + + + 2, 3, 2, 3 + + + 38, 30 + + + 129 + + + - + cmdMinus @@ -297,6 +435,27 @@ 6 + + Microsoft Sans Serif, 14.25pt + + + NoControl + + + 114, 42 + + + 2, 3, 2, 3 + + + 38, 30 + + + 128 + + + * + cmdMultiply @@ -309,6 +468,27 @@ 7 + + Microsoft Sans Serif, 14.25pt + + + NoControl + + + 151, 13 + + + 2, 3, 2, 3 + + + 49, 30 + + + 127 + + + . + cmdDot @@ -321,6 +501,24 @@ 8 + + NoControl + + + 77, 13 + + + 2, 3, 2, 3 + + + 38, 30 + + + 126 + + + 9 + cmd9 @@ -333,6 +531,24 @@ 9 + + NoControl + + + 40, 13 + + + 2, 3, 2, 3 + + + 38, 30 + + + 125 + + + 8 + cmd8 @@ -345,6 +561,24 @@ 10 + + NoControl + + + 3, 13 + + + 2, 3, 2, 3 + + + 38, 30 + + + 124 + + + 7 + cmd7 @@ -357,6 +591,24 @@ 11 + + NoControl + + + 77, 42 + + + 2, 3, 2, 3 + + + 38, 30 + + + 123 + + + 6 + cmd6 @@ -369,6 +621,24 @@ 12 + + NoControl + + + 40, 42 + + + 2, 3, 2, 3 + + + 38, 30 + + + 122 + + + 5 + cmd5 @@ -381,6 +651,24 @@ 13 + + NoControl + + + 3, 42 + + + 2, 3, 2, 3 + + + 38, 30 + + + 121 + + + 4 + cmd4 @@ -393,8 +681,26 @@ 14 - - cmd3 + + NoControl + + + 77, 71 + + + 2, 3, 2, 3 + + + 38, 30 + + + 120 + + + 3 + + + cmd3 System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 @@ -405,6 +711,24 @@ 15 + + NoControl + + + 40, 71 + + + 2, 3, 2, 3 + + + 38, 30 + + + 119 + + + 2 + cmd2 @@ -417,6 +741,24 @@ 16 + + NoControl + + + 40, 100 + + + 2, 3, 2, 3 + + + 38, 30 + + + 118 + + + 0 + cmd0 @@ -429,6 +771,24 @@ 17 + + NoControl + + + 3, 71 + + + 2, 3, 2, 3 + + + 38, 30 + + + 117 + + + 1 + cmd1 @@ -442,16 +802,16 @@ 18 - 297, 81 + 223, 66 - 3, 4, 3, 4 + 2, 3, 2, 3 - 3, 4, 3, 4 + 2, 3, 2, 3 - 273, 165 + 205, 134 179 @@ -471,6596 +831,3941 @@ 18 - + NoControl - - 201, 87 - - - 3, 4, 3, 4 + + 122, 158 - - 65, 74 + + 60, 30 - - 190 + + 157 - - Clear + + quarter - - cmdClear + + cmdQuarter - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 0 - - Microsoft Sans Serif, 12pt - - + NoControl - - 4, 123 - - - 3, 4, 3, 4 + + 63, 158 - - 51, 37 + + 60, 30 - - 138 + + 156 - - , + + d_in_m - - cmdComma + + cmdD_In_M - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 1 - + NoControl - - 103, 123 - - - 3, 4, 3, 4 + + 4, 158 - - 51, 37 + + 60, 30 - - 136 + + 155 - - ( ) + + am - - cmdBrackets + + cmdAm - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 2 - - Microsoft Sans Serif, 14.25pt - - + NoControl - - 201, 52 - - - 3, 4, 3, 4 + + 122, 129 - - 65, 37 + + 60, 30 - - 133 + + 154 - - ^ + + sec - - cmdPower + + cmdSec - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 3 - - Microsoft Sans Serif, 14.25pt - - + NoControl - - 152, 16 - - - 3, 4, 3, 4 + + 4, 129 - - 51, 37 + + 60, 30 - - 131 + + 153 - - / + + hour - - cmdDivide + + cmdHour - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 4 - - Microsoft Sans Serif, 14.25pt - - + NoControl - - 152, 123 - - - 3, 4, 3, 4 + + 63, 129 - - 51, 37 + + 60, 30 - - 130 + + 152 - - + + + min - - cmdPlus + + cmdminutes - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 5 - - Microsoft Sans Serif, 14.25pt - - + NoControl - - 152, 87 + + 4, 71 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 129 + + 151 - - - + + dmy - - cmdMinus + + cmdDmy - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 6 - - Microsoft Sans Serif, 14.25pt - - + NoControl - - 152, 52 + + 122, 100 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 128 + + 150 - - * + + dek - - cmdMultiply + + cmdDek - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 7 - - Microsoft Sans Serif, 14.25pt - - + NoControl - - 201, 16 + + 122, 13 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 65, 37 + + 60, 30 - - 127 + + 145 - - . + + day - - cmdDot + + cmdDay - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 8 - + NoControl - - 103, 16 + + 63, 13 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 126 + + 144 - - 9 + + month - - cmd9 + + cmdMonth - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 9 - + NoControl - - 53, 16 + + 4, 13 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 125 + + 143 - - 8 + + year - - cmd8 + + cmdYear - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 10 - + NoControl - - 4, 16 + + 122, 42 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 124 + + 142 - - 7 + + date - - cmd7 + + cmdDate - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 11 - + NoControl - - 103, 52 + + 63, 42 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 123 + + 141 - - 6 + + yday - - cmd6 + + cmdYday - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 12 - + NoControl - - 53, 52 + + 4, 42 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 122 + + 140 - - 5 + + wday - - cmd5 + + cmdWday - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 13 - + NoControl - - 4, 52 + + 122, 71 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 121 + + 139 - - 4 + + mdy - - cmd4 + + cmdMdy - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 14 - + NoControl - - 103, 87 + + 63, 71 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 120 + + 138 - - 3 + + ymd - - cmd3 + + cmdYmd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 15 - + NoControl - - 53, 87 + + 63, 100 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 119 + + 137 - - 2 + + doy - - cmd2 + + cmdDoy - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 16 - + NoControl - - 53, 123 + + 4, 100 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 60, 30 - - 118 + + 136 - - 0 + + leap - - cmd0 + + cmdLeap - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpBasic + + grpDates - + 17 - - NoControl - - - 4, 87 + + 434, 61 - - 3, 4, 3, 4 + + 188, 192 - - 51, 37 + + 188 - - 117 + + Dates - - 1 + + grpDates - - cmd1 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - grpBasic + + 14 - - 18 + + NoControl - - cmdQuarter + + 187, 161 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 30 - - grpDates + + 197 - - 0 + + nasplin - - cmdD_In_M + + cmdNasplin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 1 + + 0 - - cmdAm + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 125, 161 - - grpDates + + 62, 30 - - 2 + + 196 - - cmdSec + + naapprox - + + cmdNaapprox + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 3 + + 1 - - cmdHour + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 64, 161 - - grpDates + + 62, 30 - - 4 + + 195 - - cmdminutes + + naest - + + cmdNaest + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 5 + + 2 - - cmdDmy + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 161 - - grpDates + + 62, 30 - - 6 + + 194 - - cmdDek + + nafill - + + cmdNafill + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 7 + + 3 - - cmdDay + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 102 - - grpDates + + 62, 30 - - 8 + + 193 - - cmdMonth + + movmin - + + cmdMovmin + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 9 + + 4 - - cmdYear + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 132 - - grpDates + + 62, 30 - - 10 + + 192 - - cmdDate + + r_rank - + + cmdRowRank + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 11 + + 5 - - cmdYday + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 64, 102 - - grpDates + + 62, 30 - - 12 + + 191 - - cmdWday + + diff - + + cmdDiff + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 13 + + 6 - - cmdMdy + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 187, 102 - - grpDates + + 62, 30 - - 14 + + 190 - - cmdYmd + + cumdist - + + cmdCumdist + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 15 + + 7 - - cmdDoy + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 125, 73 - - grpDates + + 62, 30 - - 16 + + 189 - - cmdLeap + + movmean - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + cmdmovemean - - grpDates + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17 + + grpTransform - - 579, 75 + + 8 - - 4, 4, 4, 4 + + NoControl - - 4, 4, 4, 4 + + 125, 44 - - 251, 236 + + 62, 30 - + 188 - - Dates + + cummean - - grpDates + + cmdCumMean - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + grpTransform - - 14 + + 9 - + NoControl - - 163, 194 - - - 4, 4, 4, 4 + + 125, 102 - - 80, 37 + + 62, 30 - - 157 + + 187 - - quarter + + ntile - - cmdQuarter + + cmdNtile - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 0 + + 10 - + NoControl - - 84, 194 - - - 4, 4, 4, 4 + + 187, 73 - - 80, 37 + + 62, 30 - - 156 + + 186 - - d_in_m + + movmed - - cmdD_In_M + + cmMovMed - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 1 + + 11 - + NoControl - - 5, 194 - - - 4, 4, 4, 4 + + 187, 132 - - 80, 37 + + 62, 30 - - 155 + + 185 - - am + + m_rank - - cmdAm + + cmdMRank - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 2 + + 12 - + NoControl - - 163, 159 + + 125, 132 - - 4, 4, 4, 4 + + 62, 30 - - 80, 37 - - - 154 + + 184 - - sec + + d_rank - - cmdSec + + cmdDRank - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 3 + + 13 - + NoControl - - 5, 159 - - - 4, 4, 4, 4 + + 2, 73 - - 80, 37 + + 62, 30 - - 153 + + 183 - - hour + + movmax - - cmdHour + + cmdMovMax - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 4 + + 14 - + NoControl - - 84, 159 - - - 4, 4, 4, 4 + + 64, 73 - - 80, 37 + + 62, 30 - - 152 + + 182 - - min + + movsum - - cmdminutes + + cmdMovSum - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 5 + + 15 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 5, 87 + + 64, 132 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 62, 30 - - 151 + + 181 - - dmy + + % rank - - cmdDmy + + cmdpercentrank - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 6 + + 16 - + NoControl - - 163, 123 - - - 3, 4, 3, 4 + + 64, 44 - - 80, 37 + + 62, 30 - - 150 + + 180 - - dek + + cumsum - - cmdDek + + cmdcumsum - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 7 + + 17 - + NoControl - - 163, 16 - - - 3, 4, 3, 4 + + 187, 44 - - 80, 37 + + 62, 30 - - 145 + + 179 - - day + + cummin - - cmdDay + + cmdcummin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 8 + + 18 - + NoControl - - 84, 16 - - - 3, 4, 3, 4 + + 2, 44 - - 80, 37 + + 62, 30 - - 144 + + 178 - - month + + cummax - - cmdMonth + + cmdcummax - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 9 + + 19 - + NoControl - - 5, 16 - - - 3, 4, 3, 4 + + 187, 15 - - 80, 37 + + 62, 30 - - 143 + + 177 - - year + + pmin - - cmdYear + + cmdPMin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 10 + + 20 - + NoControl - - 163, 52 - - - 3, 4, 3, 4 + + 125, 15 - - 80, 37 + + 62, 30 - - 142 + + 176 - - date + + pmax - - cmdDate + + cmdpmax - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 11 + + 21 - + NoControl - - 84, 52 - - - 3, 4, 3, 4 + + 64, 15 - - 80, 37 + + 62, 30 - - 141 + + 175 - - yday + + lead - - cmdYday + + cmdLead - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpTransform - - 12 + + 22 - + NoControl - - 5, 52 - - - 3, 4, 3, 4 + + 2, 15 - - 80, 37 + + 62, 30 - - 140 + + 174 - - wday + + lag - - cmdWday + + cmdLag - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates - - - 13 + + grpTransform - - NoControl + + 23 - - 163, 87 + + 431, 64 - - 3, 4, 3, 4 + + 256, 204 - - 80, 37 + + 189 - - 139 + + Transform - - mdy + + grpTransform - - cmdMdy + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - grpDates + + 9 - - 14 + + Microsoft Sans Serif, 8.25pt - + NoControl - - 84, 87 + + 231, 101 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 56, 30 - - 138 + + 182 - - ymd + + kurtosis - - cmdYmd + + cmdKurtosis - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpSummary - - 15 + + 0 - + NoControl - - 84, 123 + + 231, 42 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 56, 30 - - 137 + + 180 - - doy + + mode1 - - cmdDoy + + cmdMode1 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates + + grpSummary - - 16 + + 1 - + NoControl - - 5, 123 + + 176, 42 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 56, 30 - - 136 + + 179 - - leap + + mode - - cmdLeap + + cmdMode - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDates - - - 17 - - - cmdNasplin + + grpSummary - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2 - - grpTransform + + NoControl - - 0 + + 120, 130 - - cmdNaapprox + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 56, 30 - - grpTransform + + 178 - - 1 + + first - - cmdNaest + + cmdFirst - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpTransform + + grpSummary - - 2 + + 3 - - cmdNafill + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 176, 130 - - grpTransform + + 2, 3, 2, 3 - - 3 + + 56, 30 - - cmdMovmin + + 177 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + last - - grpTransform - - - 4 - - - cmdRowRank - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 5 - - - cmdDiff - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 6 - - - cmdCumdist - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 7 - - - cmdmovemean - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 8 - - - cmdCumMean - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 9 - - - cmdNtile - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 10 - - - cmMovMed - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 11 - - - cmdMRank - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 12 - - - cmdDRank - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 13 - - - cmdMovMax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 14 - - - cmdMovSum - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 15 - - - cmdpercentrank - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 16 - - - cmdcumsum - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 17 - - - cmdcummin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 18 - - - cmdcummax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 19 - - - cmdPMin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 20 - - - cmdpmax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 21 - - - cmdLead - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 22 - - - cmdLag - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 23 - - - 575, 79 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 341, 251 - - - 189 - - - Transform - - - grpTransform - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 9 - - - NoControl - - - 249, 198 - - - 4, 4, 4, 4 - - - 83, 37 - - - 197 - - - nasplin - - - cmdNasplin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 0 - - - NoControl - - - 167, 198 - - - 4, 4, 4, 4 - - - 83, 37 - - - 196 - - - naapprox - - - cmdNaapprox - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 1 - - - NoControl - - - 85, 198 - - - 4, 4, 4, 4 - - - 83, 37 - - - 195 - - - naest - - - cmdNaest - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 2 - - - NoControl - - - 3, 198 - - - 4, 4, 4, 4 - - - 83, 37 - - - 194 - - - nafill - - - cmdNafill - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 3 - - - NoControl - - - 3, 126 - - - 4, 4, 4, 4 - - - 83, 37 - - - 193 - - - movmin - - - cmdMovmin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 4 - - - NoControl - - - 3, 162 - - - 4, 4, 4, 4 - - - 83, 37 - - - 192 - - - r_rank - - - cmdRowRank - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 5 - - - NoControl - - - 85, 126 - - - 4, 4, 4, 4 - - - 83, 37 - - - 191 - - - diff - - - cmdDiff - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 6 - - - NoControl - - - 249, 126 - - - 4, 4, 4, 4 - - - 83, 37 - - - 190 - - - cumdist - - - cmdCumdist - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 7 - - - NoControl - - - 167, 90 - - - 4, 4, 4, 4 - - - 83, 37 - - - 189 - - - movmean - - - cmdmovemean - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 8 - - - NoControl - - - 167, 54 - - - 4, 4, 4, 4 - - - 83, 37 - - - 188 - - - cummean - - - cmdCumMean - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 9 - - - NoControl - - - 167, 126 - - - 4, 4, 4, 4 - - - 83, 37 - - - 187 - - - ntile - - - cmdNtile - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 10 - - - NoControl - - - 249, 90 - - - 4, 4, 4, 4 - - - 83, 37 - - - 186 - - - movmed - - - cmMovMed - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 11 - - - NoControl - - - 249, 162 - - - 4, 4, 4, 4 - - - 83, 37 - - - 185 - - - m_rank - - - cmdMRank - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 12 - - - NoControl - - - 167, 162 - - - 4, 4, 4, 4 - - - 83, 37 - - - 184 - - - d_rank - - - cmdDRank - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 13 - - - NoControl - - - 3, 90 - - - 4, 4, 4, 4 - - - 83, 37 - - - 183 - - - movmax - - - cmdMovMax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 14 - - - NoControl - - - 85, 90 - - - 4, 4, 4, 4 - - - 83, 37 - - - 182 - - - movsum - - - cmdMovSum - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 15 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 85, 162 - - - 3, 4, 3, 4 - - - 83, 37 - - - 181 - - - % rank - - - cmdpercentrank - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 16 - - - NoControl - - - 85, 54 - - - 4, 4, 4, 4 - - - 83, 37 - - - 180 - - - cumsum - - - cmdcumsum - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 17 - - - NoControl - - - 249, 54 - - - 4, 4, 4, 4 - - - 83, 37 - - - 179 - - - cummin - - - cmdcummin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 18 - - - NoControl - - - 3, 54 - - - 4, 4, 4, 4 - - - 83, 37 - - - 178 - - - cummax - - - cmdcummax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 19 - - - NoControl - - - 249, 18 - - - 4, 4, 4, 4 - - - 83, 37 - - - 177 - - - pmin - - - cmdPMin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 20 - - - NoControl - - - 167, 18 - - - 4, 4, 4, 4 - - - 83, 37 - - - 176 - - - pmax - - - cmdpmax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 21 - - - NoControl - - - 85, 18 - - - 4, 4, 4, 4 - - - 83, 37 - - - 175 - - - lead - - - cmdLead - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 22 - - - NoControl - - - 3, 18 - - - 4, 4, 4, 4 - - - 83, 37 - - - 174 - - - lag - - - cmdLag - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpTransform - - - 23 - - - cmdKurtosis - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 0 - - - cmdMode1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 1 - - - cmdMode - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 2 - - - cmdFirst - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 3 - - - cmdLast - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 4 - - - cmdnth - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 5 - - - cmdCor - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 6 - - - cmdCov - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 7 - - - cmdMad - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 8 - - - cmdMc - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 9 - - - cmdPropn - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 10 - - - cmdCv - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 11 - - - cmdSkew - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 12 - - - cmdAnyDup - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 13 - - - cmdDistinct - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 14 - - - cmdNonMiss - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 15 - - - cmdIQR - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 16 - - - cmdQuantile - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 17 - - - cmdRange - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 18 - - - cmdSd - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 19 - - - cmdMedian - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 20 - - - cmdMin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 21 - - - cmdMax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 22 - - - cmdMean - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 23 - - - cmdMiss - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 24 - - - cmdLength - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 25 - - - cmdSum - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 26 - - - cmdVar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 27 - - - 575, 79 - - - 3, 4, 3, 4 - - - 3, 4, 3, 4 - - - 388, 238 - - - 185 - - - Summary - - - grpSummary - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 8 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 308, 124 - - - 3, 4, 3, 4 - - - 75, 37 - - - 182 - - - kurtosis - - - cmdKurtosis - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 0 - - - NoControl - - - 308, 52 - - - 3, 4, 3, 4 - - - 75, 37 - - - 180 - - - mode1 - - - cmdMode1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 1 - - - NoControl - - - 235, 52 - - - 3, 4, 3, 4 - - - 75, 37 - - - 179 - - - mode - - - cmdMode - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 2 - - - NoControl - - - 160, 160 - - - 3, 4, 3, 4 - - - 75, 37 - - - 178 - - - first - - - cmdFirst - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 3 - - - NoControl - - - 235, 160 - - - 3, 4, 3, 4 - - - 75, 37 - - - 177 - - - last - - - cmdLast - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 4 - - - NoControl - - - 308, 160 - - - 3, 4, 3, 4 - - - 75, 37 - - - 176 - - - nth - - - cmdnth - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 5 - - - NoControl - - - 87, 196 - - - 3, 4, 3, 4 - - - 75, 37 - - - 175 - - - cor - - - cmdCor - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 6 - - - NoControl - - - 161, 196 - - - 3, 4, 3, 4 - - - 75, 37 - - - 174 - - - cov - - - cmdCov - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 7 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 235, 89 - - - 3, 4, 3, 4 - - - 75, 37 - - - 173 - - - mad - - - cmdMad - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 8 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 160, 124 - - - 3, 4, 3, 4 - - - 75, 37 - - - 172 - - - mc - - - cmdMc - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 9 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 85, 160 - - - 3, 4, 3, 4 - - - 75, 37 - - - 171 - - - propn - - - cmdPropn - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 10 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 85, 124 - - - 3, 4, 3, 4 - - - 75, 37 - - - 170 - - - cv - - - cmdCv - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 11 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 235, 124 - - - 3, 4, 3, 4 - - - 75, 37 - - - 169 - - - skew - - - cmdSkew - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 12 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 3, 160 - - - 3, 4, 3, 4 - - - 84, 37 - - - 168 - - - anyDup - - - cmdAnyDup - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 13 - - - NoControl - - - 3, 124 - - - 3, 4, 3, 4 - - - 84, 37 - - - 167 - - - distinct - - - cmdDistinct - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 14 - - - NoControl - - - 3, 89 - - - 3, 4, 3, 4 - - - 84, 37 - - - 166 - - - non miss - - - cmdNonMiss - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 15 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 308, 89 - - - 3, 4, 3, 4 - - - 75, 37 - - - 165 - - - IQR - - - cmdIQR - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 16 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 235, 196 - - - 3, 4, 3, 4 - - - 75, 37 - - - 164 - - - quantile - - - cmdQuantile - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 17 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 308, 16 - - - 3, 4, 3, 4 - - - 75, 37 - - - 163 - - - range - - - cmdRange - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 18 - - - NoControl - - - 160, 89 - - - 3, 4, 3, 4 - - - 75, 37 - - - 160 - - - sd - - - cmdSd - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 19 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 160, 52 - - - 3, 4, 3, 4 - - - 75, 37 - - - 158 - - - median - - - cmdMedian - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 20 - - - NoControl - - - 160, 16 - - - 3, 4, 3, 4 - - - 75, 37 - - - 155 - - - min - - - cmdMin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 21 - - - NoControl - - - 235, 16 - - - 3, 4, 3, 4 - - - 75, 37 - - - 154 - - - max - - - cmdMax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 22 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 85, 52 - - - 3, 4, 3, 4 - - - 75, 37 - - - 153 - - - mean - - - cmdMean - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 23 - - - NoControl - - - 3, 52 - - - 3, 4, 3, 4 - - - 84, 37 - - - 149 - - - miss - - - cmdMiss - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 24 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 3, 16 - - - 3, 4, 3, 4 - - - 84, 37 - - - 148 - - - length - - - cmdLength - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 25 - - - NoControl - - - 85, 16 - - - 3, 4, 3, 4 - - - 75, 37 - - - 150 - - - sum - - - cmdSum - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 26 - - - NoControl - - - 85, 89 - - - 3, 4, 3, 4 - - - 75, 37 - - - 159 - - - var - - - cmdVar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSummary - - - 27 - - - cmdFalse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 0 - - - cmdTrue - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 1 - - - cmdDoubleSqrBrackets - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 2 - - - cmdIn - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 3 - - - cmdWhich - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 4 - - - cmdNA - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 5 - - - cmdNear - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 6 - - - cmdBetween - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 7 - - - cmdIsFalse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 8 - - - cmdAny - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 9 - - - cmdAll - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 10 - - - cmdIsTrue - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 11 - - - cmdIsNa - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 12 - - - cmdNotIsNa - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 13 - - - cmdDuplicate - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 14 - - - cmdIfelse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 15 - - - cmdmatch - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 16 - - - cmdwhen - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 17 - - - cmdOpeningBracket - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 18 - - - cmdColon - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 19 - - - cmdGreaterOrEqualsTo - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLogical - - - 20 - - - cmdClossingBracket + + cmdLast - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 21 - - - cmdAnd + + grpSummary - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 4 - - grpLogical + + NoControl - - 22 + + 231, 130 - - cmdQuotes + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 56, 30 - - grpLogical + + 176 - - 23 + + nth - - cmdSquareBrackets + + cmdnth - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 24 - - - cmdIntegerDivision + + grpSummary - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5 - - grpLogical + + NoControl - - 25 + + 65, 159 - - cmdModulas + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 56, 30 - - grpLogical + + 175 - - 26 + + cor - - cmdGreater + + cmdCor - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 27 - - - cmdLesserOrEqualsTo + + grpSummary - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 6 - - grpLogical + + NoControl - - 28 + + 121, 159 - - cmdLesser + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 56, 30 - - grpLogical + + 174 - - 29 + + cov - - cmdOr + + cmdCov - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 30 + + grpSummary - - cmdNot + + 7 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpLogical + + NoControl - - 31 + + 176, 72 - - cmdNotEqualsTo + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 56, 30 - - grpLogical + + 173 - - 32 + + mad - - cmdEquivalent + + cmdMad - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 33 - - - 573, 81 - - - 3, 4, 3, 4 - - - 3, 4, 3, 4 - - - 337, 271 - - - 183 - - - Logical and Symbols - - - grpLogical - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + grpSummary - - $this + + 8 - - 6 + + Microsoft Sans Serif, 8.25pt - + NoControl - - 203, 52 + + 120, 101 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 69, 37 + + 56, 30 - - 207 + + 172 - - FALSE + + mc - - cmdFalse + + cmdMc - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 0 + + 9 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 203, 16 + + 64, 130 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 69, 37 + + 56, 30 - - 206 + + 171 - - TRUE + + propn - - cmdTrue + + cmdPropn - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 1 + + 10 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 157, 87 + + 64, 101 - - 3, 2, 3, 2 + + 2, 3, 2, 3 - - 67, 37 + + 56, 30 - - 205 + + 170 - - [[ ]] + + cv - - cmdDoubleSqrBrackets + + cmdCv - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 2 + + 11 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 104, 123 + + 176, 101 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 60, 37 + + 56, 30 - - 204 + + 169 - - %in% + + skew - - cmdIn + + cmdSkew - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 3 + + 12 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 261, 123 + + 2, 130 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 69, 37 + + 63, 30 - - 203 + + 168 - - which + + anyDup - - cmdWhich + + cmdAnyDup - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 4 + + 13 - + NoControl - - 212, 123 + + 2, 101 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 63, 30 - - 202 + + 167 - - NA + + distinct - - cmdNA + + cmdDistinct - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 5 + + 14 - + NoControl - - 248, 194 + + 2, 72 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 83, 37 + + 63, 30 - - 201 + + 166 - - near + + non miss - - cmdNear + + cmdNonMiss - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 6 + + 15 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 248, 159 + + 231, 72 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 83, 37 + + 56, 30 - - 200 + + 165 - - between + + IQR - - cmdBetween + + cmdIQR - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 7 + + 16 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 248, 230 + + 176, 159 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 83, 37 + + 56, 30 - - 199 + + 164 - - is false + + quantile - - cmdIsFalse + + cmdQuantile - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary + + + 17 - - 8 + + Microsoft Sans Serif, 8.25pt - + NoControl - - 5, 230 + + 231, 13 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 83, 37 + + 56, 30 - - 198 + + 163 - - any + + range - - cmdAny + + cmdRange - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 9 + + 18 - + NoControl - - 87, 230 + + 120, 72 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 77, 37 + + 56, 30 - - 197 + + 160 - - all + + sd - - cmdAll + + cmdSd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 10 + + 19 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 163, 230 + + 120, 42 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 87, 37 + + 56, 30 - - 196 + + 158 - - is true + + median - - cmdIsTrue + + cmdMedian - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 11 + + 20 - + NoControl - - 5, 194 + + 120, 13 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 83, 37 + + 56, 30 - - 195 + + 155 - - is.na + + min - - cmdIsNa + + cmdMin - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 12 + + 21 - + NoControl - - 87, 194 + + 176, 13 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 77, 37 + + 56, 30 - - 194 + + 154 - - !is.na + + max - - cmdNotIsNa + + cmdMax - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 13 + + 22 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 163, 194 + + 64, 42 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 87, 37 + + 56, 30 - - 193 + + 153 - - duplicated + + mean - - cmdDuplicate + + cmdMean - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 14 + + 23 - + NoControl - - 5, 159 + + 2, 42 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 83, 37 + + 63, 30 - - 192 + + 149 - - ifelse + + miss - - cmdIfelse + + cmdMiss - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 15 + + 24 - + + Microsoft Sans Serif, 8.25pt + + NoControl - - 87, 159 + + 2, 13 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 77, 37 + + 63, 30 - - 191 + + 148 - - match + + length - - cmdmatch + + cmdLength - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 16 + + 25 - + NoControl - - 163, 159 + + 64, 13 - - 4, 4, 4, 4 + + 2, 3, 2, 3 - - 87, 37 + + 56, 30 - - 190 + + 150 - - when + + sum - - cmdwhen + + cmdSum - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + grpSummary - - 17 + + 26 - + NoControl - - 223, 87 + + 64, 72 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 53, 37 + + 56, 30 - - 139 + + 159 - - ( + + var - - cmdOpeningBracket + + cmdVar - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical - - - 18 + + grpSummary - - Microsoft Sans Serif, 15.75pt + + 27 - - NoControl + + 431, 64 - - 55, 87 + + 2, 3, 2, 3 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 291, 193 - - 139 + + 185 - - : + + Summary - - cmdColon + + grpSummary - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpLogical + + $this - - 19 + + 8 - + NoControl - - 153, 16 - - - 3, 4, 3, 4 + + 152, 42 - - 51, 37 + + 52, 30 - - 138 + + 207 - - >= + + FALSE - - cmdGreaterOrEqualsTo + + cmdFalse - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 20 + + 0 - + NoControl - - 275, 87 - - - 3, 4, 3, 4 + + 152, 13 - - 56, 37 + + 52, 30 - - 137 + + 206 - - ) + + TRUE - - cmdClossingBracket + + cmdTrue - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 21 - - - Microsoft Sans Serif, 9.75pt + + 1 - + NoControl - - 153, 52 + + 118, 71 - - 3, 4, 3, 4 + + 2, 2, 2, 2 - - 51, 37 + + 50, 30 - - 137 + + 205 - - && + + [[ ]] - - cmdAnd + + cmdDoubleSqrBrackets - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 22 - - - Microsoft Sans Serif, 12pt + + 2 - + NoControl - - 163, 123 + + 78, 100 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 45, 30 - - 135 + + 204 - - " " + + %in% - - cmdQuotes + + cmdIn - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 23 + + 3 - + NoControl - - 104, 87 - - - 3, 2, 3, 2 + + 196, 100 - - 56, 37 + + 52, 30 - - 134 + + 203 - - [ ] + + which - - cmdSquareBrackets + + cmdWhich - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 24 + + 4 - + NoControl - - 55, 123 + + 159, 100 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 51, 37 + + 38, 30 - - 135 + + 202 - - %/% + + NA - - cmdIntegerDivision + + cmdNA - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 25 + + 5 - + NoControl - - 5, 123 - - - 3, 2, 3, 2 + + 186, 158 - - 51, 37 + + 62, 30 - - 134 + + 201 - - %% + + near - - cmdModulas + + cmdNear - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 26 + + 6 - + NoControl - - 104, 16 - - - 3, 4, 3, 4 + + 186, 129 - - 51, 37 + + 62, 30 - - 133 + + 200 - - > + + between - - cmdGreater + + cmdBetween - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 27 + + 7 - + NoControl - - 55, 16 - - - 3, 4, 3, 4 + + 186, 187 - - 51, 37 + + 62, 30 - - 132 + + 199 - - <= + + is false - - cmdLesserOrEqualsTo + + cmdIsFalse - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 28 + + 8 - + NoControl - - 5, 16 - - - 3, 2, 3, 2 + + 4, 187 - - 51, 37 + + 62, 30 - - 131 + + 198 - - < + + any - - cmdLesser + + cmdAny - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 29 + + 9 - + NoControl - - 104, 52 - - - 3, 4, 3, 4 + + 65, 187 - - 51, 37 + + 58, 30 - - 130 + + 197 - - | + + all - - cmdOr + + cmdAll - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 30 - - - Microsoft Sans Serif, 12pt + + 10 - + NoControl - - 5, 87 - - - 3, 4, 3, 4 + + 122, 187 - - 51, 37 + + 65, 30 - - 129 + + 196 - - ! + + is true - - cmdNot + + cmdIsTrue - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 31 + + 11 - + NoControl - - 55, 52 - - - 3, 4, 3, 4 + + 4, 158 - - 51, 37 + + 62, 30 - - 128 + + 195 - - != + + is.na - - cmdNotEqualsTo + + cmdIsNa - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 32 + + 12 - + NoControl - - 5, 52 - - - 3, 2, 3, 2 + + 65, 158 - - 51, 37 + + 58, 30 - - 127 + + 194 - - == + + !is.na - - cmdEquivalent + + cmdNotIsNa - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLogical - - 33 - - - cmdStarts - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpStrings + + 13 - - 0 + + NoControl - - cmdReplace2 + + 122, 158 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 65, 30 - - grpStrings + + 193 - - 1 + + duplicated - - cmdReplace + + cmdDuplicate - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 2 + + 14 - - cmdRemove2 + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 4, 129 - - grpStrings + + 62, 30 - - 3 + + 192 - - cmdRemove1 + + ifelse - + + cmdIfelse + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 4 + + 15 - - cmdLocate2 + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 65, 129 - - grpStrings + + 58, 30 - - 5 + + 191 - - cmdExtract2 + + match - + + cmdmatch + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 6 + + 16 - - cmdEnd + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 122, 129 - - grpStrings + + 65, 30 - - 7 + + 190 - - cmdEncodeb + + when - + + cmdwhen + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 8 + + 17 - - cmdSquishb + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 167, 71 - - grpStrings + + 2, 3, 2, 3 - - 9 + + 40, 30 - - cmdSplit + + 139 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ( - - grpStrings + + cmdOpeningBracket - - 10 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdCombine + + grpLogical - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 18 - - grpStrings + + Microsoft Sans Serif, 15.75pt - - 11 + + NoControl - - cmdDetect + + 41, 71 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 3, 2, 3 - - grpStrings + + 38, 30 - - 12 + + 139 - - cmdTrim + + : - + + cmdColon + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 13 + + 19 - - cmdTitle + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 115, 13 - - grpStrings + + 2, 3, 2, 3 - - 14 + + 38, 30 - - cmdLower + + 138 - + + >= + + + cmdGreaterOrEqualsTo + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 15 + + 20 - - cmdUpper + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 206, 71 - - grpStrings + + 2, 3, 2, 3 - - 16 + + 42, 30 - - cmdSort + + 137 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ) - - grpStrings + + cmdClossingBracket + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17 + + grpLogical - - cmdOrder + + 21 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 9.75pt - - grpStrings + + NoControl - - 18 + + 115, 42 - - cmdPad + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 38, 30 - - grpStrings + + 137 - - 19 + + && - - cmdExtract + + cmdAnd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 20 + + 22 - - cmdCountstrings + + Microsoft Sans Serif, 12pt - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - grpStrings + + 122, 100 - - 21 + + 2, 3, 2, 3 - - cmdLocate + + 38, 30 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 135 - - grpStrings + + " " - - 22 + + cmdQuotes - - Microsoft Sans Serif, 8.25pt + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 579, 78 + + grpLogical - - 4, 4, 4, 4 + + 23 - - 4, 4, 4, 4 + + NoControl - - 401, 199 + + 78, 71 - - 186 + + 2, 2, 2, 2 - - Strings (Character Columns) + + 42, 30 - - grpStrings + + 134 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + [ ] - - $this + + cmdSquareBrackets - - 13 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Microsoft Sans Serif, 8.25pt + + grpLogical - + + 24 + + NoControl - - 240, 162 + + 41, 100 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 38, 30 - - 160 + + 135 - - starts + + %/% - - cmdStarts + + cmdIntegerDivision - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 0 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 25 - + NoControl - - 161, 162 + + 4, 100 - - 3, 4, 3, 4 + + 2, 2, 2, 2 - - 80, 37 + + 38, 30 - - 159 + + 134 - - replace2 + + %% - - cmdReplace2 + + cmdModulas - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 1 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 26 - + NoControl - - 83, 162 + + 78, 13 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 38, 30 - - 158 + + 133 - - replace + + > - - cmdReplace + + cmdGreater - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 2 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 27 - + NoControl - - 239, 126 + + 41, 13 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 38, 30 - - 157 + + 132 - - remove2 + + <= - - cmdRemove2 + + cmdLesserOrEqualsTo - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 3 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 28 - + NoControl - - 160, 126 + + 4, 13 - - 3, 4, 3, 4 + + 2, 2, 2, 2 - - 80, 37 + + 38, 30 - - 156 + + 131 - - remove + + < - - cmdRemove1 + + cmdLesser - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 4 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 29 - + NoControl - - 81, 126 + + 78, 42 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 38, 30 - - 155 + + 130 - - locate2 + + | - - cmdLocate2 + + cmdOr - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + grpLogical - - 5 + + 30 - - Microsoft Sans Serif, 8.25pt + + Microsoft Sans Serif, 12pt - + NoControl - - 317, 90 + + 4, 71 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 38, 30 - - 154 + + 129 - - extract2 + + ! - - cmdExtract2 + + cmdNot - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 6 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 31 - + NoControl - - 160, 90 + + 41, 42 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 38, 30 - - 152 + + 128 - - end + + != - - cmdEnd + + cmdNotEqualsTo - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 7 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 32 - + NoControl - - 317, 54 + + 4, 42 - - 3, 4, 3, 4 + + 2, 2, 2, 2 - - 80, 37 + + 38, 30 - - 151 + + 127 - - encode + + == - - cmdEncodeb + + cmdEquivalent - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings - - - 8 + + grpLogical - - Microsoft Sans Serif, 8.25pt + + 33 - - NoControl + + 430, 66 - - 317, 18 + + 2, 3, 2, 3 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 253, 220 - - 150 + + 183 - - squish + + Logical and Symbols - - cmdSquishb + + grpLogical - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpStrings + + $this - - 9 + + 6 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 317, 126 + + 180, 132 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 149 + + 160 - - split + + starts - - cmdSplit + + cmdStarts - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 10 + + 0 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 239, 54 + + 121, 132 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 148 + + 159 - - combine + + replace2 - - cmdCombine + + cmdReplace2 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 11 + + 1 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 81, 90 + + 62, 132 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 147 + + 158 - - detect + + replace - - cmdDetect + + cmdReplace - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 12 + + 2 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 239, 18 + + 179, 102 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 146 + + 157 - - trim + + remove2 - - cmdTrim + + cmdRemove2 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 13 + + 3 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 160, 18 + + 120, 102 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 142 + + 156 - - title + + remove - - cmdTitle + + cmdRemove1 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 14 + + 4 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 81, 18 + + 61, 102 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 141 + + 155 - - lower + + locate2 - - cmdLower + + cmdLocate2 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 15 + + 5 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 3, 18 + + 238, 73 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 140 + + 154 - - upper + + extract2 - - cmdUpper + + cmdExtract2 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 16 + + 6 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 160, 54 + + 120, 73 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 139 + + 152 - - sort + + end - - cmdSort + + cmdEnd - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 17 + + 7 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 81, 54 + + 238, 44 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 138 + + 151 - - order + + encode - - cmdOrder + + cmdEncodeb - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 18 + + 8 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 3, 54 + + 238, 15 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 137 + + 150 - - pad + + squish - - cmdPad + + cmdSquishb - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 19 + + 9 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 239, 90 + + 238, 102 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 136 + + 149 - - extract + + split - - cmdExtract + + cmdSplit - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 20 + + 10 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 3, 90 + + 179, 44 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 134 + + 148 - - count + + combine - - cmdCountstrings + + cmdCombine - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 21 + + 11 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 3, 126 + + 61, 73 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 80, 37 + + 60, 30 - - 133 + + 147 - - locate + + detect - - cmdLocate + + cmdDetect - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpStrings - - 22 - - - cmdQnbin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 0 - - - cmdQpois + + 12 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 1 + + 179, 15 - - cmdQbinom + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 146 - - 2 + + trim - - cmdQbirth + + cmdTrim - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 3 + + grpStrings - - cmdQbeta + + 13 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 4 + + 120, 15 - - cmdPnbin + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 142 - - 5 + + title - - cmdPpois + + cmdTitle - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 6 + + grpStrings - - cmdPbinom + + 14 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 7 + + 61, 15 - - cmdPbirth + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 141 - - 8 + + lower - - cmdPbeta + + cmdLower - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 9 + + grpStrings - - cmdQgamma + + 15 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 10 + + 2, 15 - - cmdPgamma + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 140 - - 11 + + upper - - cmdGamma + + cmdUpper - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 12 + + grpStrings - - cmdLbeta + + 16 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 13 + + 120, 44 - - cmdqF + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 139 - - 14 + + sort - - cmdFact + + cmdSort - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 15 + + grpStrings - - cmdChoose + + 17 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 16 + + 61, 44 - - cmdPf + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 138 - - 17 + + order - - cmdPChisq + + cmdOrder - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpStrings - + 18 - - cmdLgamma - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 19 + + 2, 44 - - cmdPnorm + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 137 - - 20 + + pad - - cmdQchisq + + cmdPad - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 21 + + grpStrings - - cmdQt + + 19 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 22 + + 179, 73 - - cmdQnorm + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 136 - - 23 + + extract - - cmdPt + + cmdExtract - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty - - - 24 + + grpStrings - - cmdLchoose + + 20 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpProbabilty + + NoControl - - 25 + + 2, 73 - - cmdLfact + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 30 - - grpProbabilty + + 134 - - 26 + + count - - cmdTrigamma + + cmdCountstrings - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpProbabilty + + grpStrings - - 27 + + 21 - - cmdBeta + + Microsoft Sans Serif, 8.25pt - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - grpProbabilty + + 2, 102 - - 28 + + 2, 3, 2, 3 - - cmdDigamma + + 60, 30 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 133 - - grpProbabilty + + locate - - 29 + + cmdLocate - - 577, 81 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 4, 4, 4, 4 + + grpStrings - - 4, 4, 4, 4 + + 22 - - 421, 239 + + Microsoft Sans Serif, 8.25pt - - 187 + + 434, 63 - - Probability + + 301, 162 + + + 186 - - grpProbabilty + + Strings (Character Columns) - + + grpStrings + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 10 + + 13 Microsoft Sans Serif, 8.25pt @@ -7069,13 +4774,13 @@ NoControl - 331, 126 + 248, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 176 @@ -7102,13 +4807,13 @@ NoControl - 249, 126 + 187, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 175 @@ -7135,13 +4840,13 @@ NoControl - 167, 126 + 125, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 174 @@ -7168,13 +4873,13 @@ NoControl - 85, 126 + 64, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 173 @@ -7201,13 +4906,13 @@ NoControl - 3, 126 + 2, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 172 @@ -7234,13 +4939,13 @@ NoControl - 331, 90 + 248, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 171 @@ -7267,13 +4972,13 @@ NoControl - 249, 90 + 187, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 170 @@ -7300,13 +5005,13 @@ NoControl - 167, 90 + 125, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 169 @@ -7333,13 +5038,13 @@ NoControl - 85, 90 + 64, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 168 @@ -7366,13 +5071,13 @@ NoControl - 3, 90 + 2, 73 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 167 @@ -7399,13 +5104,13 @@ NoControl - 331, 54 + 248, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 166 @@ -7432,13 +5137,13 @@ NoControl - 331, 18 + 248, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 165 @@ -7465,13 +5170,13 @@ NoControl - 249, 162 + 187, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 163 @@ -7498,13 +5203,13 @@ NoControl - 167, 198 + 125, 161 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 159 @@ -7531,13 +5236,13 @@ NoControl - 249, 54 + 187, 44 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 162 @@ -7564,13 +5269,13 @@ NoControl - 3, 162 + 2, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 154 @@ -7597,13 +5302,13 @@ NoControl - 85, 162 + 64, 132 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 161 @@ -7630,745 +5335,460 @@ NoControl - 249, 18 + 187, 15 - 3, 4, 3, 4 + 2, 3, 2, 3 - 83, 37 + 62, 30 156 - pf - - - cmdPf - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 17 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 167, 18 - - - 3, 4, 3, 4 - - - 83, 37 - - - 155 - - - pchisq - - - cmdPChisq - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 18 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 249, 198 - - - 3, 4, 3, 4 - - - 83, 37 - - - 152 - - - lgamma - - - cmdLgamma - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 19 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 3, 18 - - - 3, 4, 3, 4 - - - 83, 37 - - - 148 - - - pnorm - - - cmdPnorm - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 20 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 167, 54 - - - 3, 4, 3, 4 - - - 83, 37 - - - 160 - - - qchisq - - - cmdQchisq - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 21 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 85, 54 - - - 3, 4, 3, 4 - - - 83, 37 - - - 158 - - - qt - - - cmdQt - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 22 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 3, 54 - - - 3, 4, 3, 4 - - - 83, 37 - - - 157 - - - qnorm - - - cmdQnorm - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 23 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 85, 18 - - - 3, 4, 3, 4 - - - 83, 37 - - - 153 - - - pt - - - cmdPt - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpProbabilty - - - 24 - - - Microsoft Sans Serif, 8.25pt - - - NoControl - - - 85, 198 - - - 3, 4, 3, 4 - - - 83, 37 - - - 151 - - - lchoose + pf - - cmdLchoose + + cmdPf - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpProbabilty - - 25 + + 17 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 3, 198 + + 125, 15 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 83, 37 + + 62, 30 - - 150 + + 155 - - lfact + + pchisq - - cmdLfact + + cmdPChisq - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpProbabilty - - 26 + + 18 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 331, 198 + + 187, 161 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 83, 37 + + 62, 30 - - 149 + + 152 - - trigamma + + lgamma - - cmdTrigamma + + cmdLgamma - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpProbabilty - - 27 + + 19 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 167, 162 + + 2, 15 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 83, 37 + + 62, 30 - - 149 + + 148 - - beta + + pnorm - - cmdBeta + + cmdPnorm - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpProbabilty - - 28 + + 20 - + Microsoft Sans Serif, 8.25pt - + NoControl - - 331, 162 + + 125, 44 - - 3, 4, 3, 4 + + 2, 3, 2, 3 - - 83, 37 + + 62, 30 - - 164 + + 160 - - digamma + + qchisq - - cmdDigamma + + cmdQchisq - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpProbabilty - - 29 - - - cmdAtan2 + + 21 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpMaths + + NoControl - - 0 + + 64, 44 - - cmdLogistic + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 30 - - grpMaths + + 158 - - 1 + + qt - - cmdLogit + + cmdQt - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpMaths - - - 2 + + grpProbabilty - - cmdSign + + 22 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpMaths + + NoControl - - 3 + + 2, 44 - - cmdRound + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 30 - - grpMaths + + 157 - - 4 + + qnorm - - cmdSiginf + + cmdQnorm - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpMaths - - - 5 + + grpProbabilty - - cmdAbs + + 23 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpMaths + + NoControl - - 6 + + 64, 15 - - cmdExp + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 30 - - grpMaths + + 153 - - 7 + + pt - - cmdDeg + + cmdPt - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpMaths - - - 8 + + grpProbabilty - - cmdTrunc + + 24 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpMaths + + NoControl - - 9 + + 64, 161 - - cmdAtan + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 30 - - grpMaths + + 151 - - 10 + + lchoose - - cmdTan + + cmdLchoose - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpMaths - - - 11 + + grpProbabilty - - cmdLogTen + + 25 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpMaths + + NoControl - - 12 + + 2, 161 - - cmdRad + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 30 - - grpMaths + + 150 - - 13 + + lfact - - cmdFloor + + cmdLfact - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpMaths - - - 14 + + grpProbabilty - - cmdAsin + + 26 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpMaths + + NoControl - - 15 + + 248, 161 - - cmdSin + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 30 - - grpMaths + + 149 - - 16 + + trigamma - - cmdLog + + cmdTrigamma - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpMaths - - - 17 + + grpProbabilty - - cmdPi + + 27 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Microsoft Sans Serif, 8.25pt - - grpMaths + + NoControl - - 18 + + 125, 132 - - cmdCeiling + + 2, 3, 2, 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 30 - - grpMaths + + 149 - - 19 + + beta - - cmdAcos + + cmdBeta - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpMaths + + grpProbabilty - - 20 + + 28 - - cmdCos + + Microsoft Sans Serif, 8.25pt - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + NoControl - - grpMaths + + 248, 132 - - 21 + + 2, 3, 2, 3 - - cmdSqrt + + 62, 30 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 164 - - grpMaths + + digamma - - 22 + + cmdDigamma - - 575, 79 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3, 4, 3, 4 + + grpProbabilty - - 3, 4, 3, 4 + + 29 - - 341, 206 + + 433, 66 - - 184 + + 316, 194 - - Maths + + 187 - - grpMaths + + Probability - + + grpProbabilty + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 7 + + 10 NoControl - 204, 161 - - - 4, 4, 4, 4 + 153, 131 - 68, 37 + 51, 30 151 @@ -8392,13 +5812,10 @@ NoControl - 137, 161 - - - 4, 4, 4, 4 + 103, 131 - 68, 37 + 51, 30 149 @@ -8422,13 +5839,10 @@ NoControl - 69, 161 - - - 4, 4, 4, 4 + 52, 131 - 68, 37 + 51, 30 148 @@ -8452,13 +5866,13 @@ NoControl - 271, 126 + 203, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 147 @@ -8485,13 +5899,13 @@ NoControl - 204, 126 + 153, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 146 @@ -8518,13 +5932,13 @@ NoControl - 137, 126 + 103, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 145 @@ -8548,13 +5962,13 @@ NoControl - 69, 126 + 52, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 144 @@ -8578,13 +5992,13 @@ NoControl - 3, 126 + 2, 102 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 143 @@ -8608,13 +6022,13 @@ NoControl - 271, 89 + 203, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 142 @@ -8641,13 +6055,13 @@ NoControl - 204, 89 + 153, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 141 @@ -8671,13 +6085,13 @@ NoControl - 137, 89 + 103, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 140 @@ -8701,13 +6115,13 @@ NoControl - 69, 89 + 52, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 139 @@ -8734,13 +6148,13 @@ NoControl - 3, 89 + 2, 72 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 138 @@ -8764,13 +6178,13 @@ NoControl - 271, 53 + 203, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 137 @@ -8797,13 +6211,13 @@ NoControl - 204, 53 + 153, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 136 @@ -8827,13 +6241,13 @@ NoControl - 137, 53 + 103, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 135 @@ -8857,13 +6271,13 @@ NoControl - 69, 53 + 52, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 134 @@ -8887,13 +6301,13 @@ NoControl - 3, 53 + 2, 43 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 133 @@ -8917,13 +6331,13 @@ NoControl - 271, 17 + 203, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 132 @@ -8950,13 +6364,13 @@ NoControl - 204, 17 + 153, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 131 @@ -8980,13 +6394,13 @@ NoControl - 137, 17 + 103, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 130 @@ -9010,13 +6424,13 @@ NoControl - 69, 17 + 52, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 129 @@ -9040,13 +6454,13 @@ NoControl - 3, 17 + 2, 14 - 3, 4, 3, 4 + 2, 3, 2, 3 - 68, 37 + 51, 30 128 @@ -9060,11 +6474,41 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + grpMaths + + + 22 + + + 431, 64 + + + 2, 3, 2, 3 + + + 2, 3, 2, 3 + + + 256, 167 + + + 184 + + + Maths + + grpMaths - - 22 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 7 17, 17 @@ -9076,13 +6520,10 @@ NoControl - 343, 377 - - - 4, 4, 4, 4 + 257, 306 - 113, 37 + 85, 30 53 @@ -9109,13 +6550,10 @@ NoControl - 231, 377 - - - 4, 4, 4, 4 + 173, 306 - 113, 37 + 85, 30 52 @@ -9142,13 +6580,10 @@ NoControl - 119, 377 - - - 4, 4, 4, 4 + 89, 306 - 113, 37 + 85, 30 51 @@ -9175,13 +6610,10 @@ NoControl - 7, 377 - - - 4, 4, 4, 4 + 5, 306 - 113, 37 + 85, 30 50 @@ -9208,13 +6640,10 @@ NoControl - 455, 341 - - - 4, 4, 4, 4 + 341, 277 - 113, 37 + 85, 30 49 @@ -9241,13 +6670,10 @@ NoControl - 343, 341 - - - 4, 4, 4, 4 + 257, 277 - 113, 37 + 85, 30 48 @@ -9274,13 +6700,10 @@ NoControl - 231, 341 - - - 4, 4, 4, 4 + 173, 277 - 113, 37 + 85, 30 47 @@ -9307,13 +6730,10 @@ NoControl - 119, 341 - - - 4, 4, 4, 4 + 89, 277 - 113, 37 + 85, 30 46 @@ -9340,13 +6760,10 @@ NoControl - 7, 341 - - - 4, 4, 4, 4 + 5, 277 - 113, 37 + 85, 30 45 @@ -9373,13 +6790,10 @@ NoControl - 455, 305 - - - 4, 4, 4, 4 + 341, 248 - 113, 37 + 85, 30 44 @@ -9406,13 +6820,10 @@ NoControl - 343, 305 - - - 4, 4, 4, 4 + 257, 248 - 113, 37 + 85, 30 43 @@ -9439,13 +6850,10 @@ NoControl - 231, 305 - - - 4, 4, 4, 4 + 173, 248 - 113, 37 + 85, 30 42 @@ -9472,13 +6880,10 @@ NoControl - 119, 305 - - - 4, 4, 4, 4 + 89, 248 - 113, 37 + 85, 30 41 @@ -9505,13 +6910,10 @@ NoControl - 7, 305 - - - 4, 4, 4, 4 + 5, 248 - 113, 37 + 85, 30 40 @@ -9538,13 +6940,10 @@ NoControl - 455, 270 - - - 4, 4, 4, 4 + 341, 219 - 113, 37 + 85, 30 39 @@ -9571,13 +6970,10 @@ NoControl - 343, 270 - - - 4, 4, 4, 4 + 257, 219 - 113, 37 + 85, 30 38 @@ -9604,13 +7000,10 @@ NoControl - 231, 270 - - - 4, 4, 4, 4 + 173, 219 - 113, 37 + 85, 30 37 @@ -9637,13 +7030,10 @@ NoControl - 119, 270 - - - 4, 4, 4, 4 + 89, 219 - 113, 37 + 85, 30 36 @@ -9670,13 +7060,10 @@ NoControl - 7, 270 - - - 4, 4, 4, 4 + 5, 219 - 113, 37 + 85, 30 35 @@ -9703,13 +7090,10 @@ NoControl - 455, 233 - - - 4, 4, 4, 4 + 341, 189 - 113, 37 + 85, 30 34 @@ -9736,13 +7120,10 @@ NoControl - 343, 233 - - - 4, 4, 4, 4 + 257, 189 - 113, 37 + 85, 30 33 @@ -9769,13 +7150,10 @@ NoControl - 119, 233 - - - 4, 4, 4, 4 + 89, 189 - 113, 37 + 85, 30 31 @@ -9802,13 +7180,10 @@ NoControl - 7, 233 - - - 4, 4, 4, 4 + 5, 189 - 113, 37 + 85, 30 30 @@ -9835,13 +7210,10 @@ NoControl - 455, 197 - - - 4, 4, 4, 4 + 341, 160 - 113, 37 + 85, 30 29 @@ -9868,13 +7240,10 @@ NoControl - 343, 197 - - - 4, 4, 4, 4 + 257, 160 - 113, 37 + 85, 30 28 @@ -9901,13 +7270,10 @@ NoControl - 231, 197 - - - 4, 4, 4, 4 + 173, 160 - 113, 37 + 85, 30 27 @@ -9934,13 +7300,10 @@ NoControl - 119, 197 - - - 4, 4, 4, 4 + 89, 160 - 113, 37 + 85, 30 26 @@ -9967,13 +7330,10 @@ NoControl - 7, 197 - - - 4, 4, 4, 4 + 5, 160 - 113, 37 + 85, 30 25 @@ -10000,13 +7360,10 @@ NoControl - 455, 126 - - - 4, 4, 4, 4 + 341, 102 - 113, 37 + 85, 30 19 @@ -10033,13 +7390,10 @@ NoControl - 343, 126 - - - 4, 4, 4, 4 + 257, 102 - 113, 37 + 85, 30 18 @@ -10066,13 +7420,10 @@ NoControl - 231, 126 - - - 4, 4, 4, 4 + 173, 102 - 113, 37 + 85, 30 17 @@ -10099,13 +7450,10 @@ NoControl - 119, 126 - - - 4, 4, 4, 4 + 89, 102 - 113, 37 + 85, 30 16 @@ -10132,13 +7480,10 @@ NoControl - 7, 126 - - - 4, 4, 4, 4 + 5, 102 - 113, 37 + 85, 30 15 @@ -10165,13 +7510,10 @@ NoControl - 455, 89 - - - 4, 4, 4, 4 + 341, 72 - 113, 37 + 85, 30 14 @@ -10198,13 +7540,10 @@ NoControl - 343, 89 - - - 4, 4, 4, 4 + 257, 72 - 113, 37 + 85, 30 13 @@ -10231,13 +7570,10 @@ NoControl - 231, 89 - - - 4, 4, 4, 4 + 173, 72 - 113, 37 + 85, 30 12 @@ -10264,13 +7600,10 @@ NoControl - 119, 89 - - - 4, 4, 4, 4 + 89, 72 - 113, 37 + 85, 30 11 @@ -10297,13 +7630,10 @@ NoControl - 7, 89 - - - 4, 4, 4, 4 + 5, 72 - 113, 37 + 85, 30 10 @@ -10330,13 +7660,10 @@ NoControl - 455, 53 - - - 4, 4, 4, 4 + 341, 43 - 113, 37 + 85, 30 9 @@ -10363,13 +7690,10 @@ NoControl - 343, 53 - - - 4, 4, 4, 4 + 257, 43 - 113, 37 + 85, 30 8 @@ -10396,13 +7720,10 @@ NoControl - 231, 53 - - - 4, 4, 4, 4 + 173, 43 - 113, 37 + 85, 30 7 @@ -10429,13 +7750,10 @@ NoControl - 119, 53 - - - 4, 4, 4, 4 + 89, 43 - 113, 37 + 85, 30 6 @@ -10462,13 +7780,10 @@ NoControl - 7, 53 - - - 4, 4, 4, 4 + 5, 43 - 113, 37 + 85, 30 5 @@ -10495,193 +7810,28 @@ NoControl - 343, 161 - - - 4, 4, 4, 4 + 257, 131 - 113, 37 + 85, 30 23 - - height - - - cmdHeight - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 51 - - - cmdLinkert7 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 0 - - - cmdLikert - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 22 - - - cmdCar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 45 - - - cmdAnswer - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 46 - - - cmdPet - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 47 - - - cmdAnimal - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 48 - - - cmdAge - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 49 - - - cmdIncome - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 50 - - - cmdHair - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 52 - - - cmdGroup - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 53 - - - cmdGrade - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpWakefield - - - 54 - - - 573, 78 - - - 4, 4, 4, 4 - - - 4, 4, 4, 4 - - - 579, 425 + + height - - 191 + + cmdHeight - - Wakefield + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpWakefield - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 + + 51 Microsoft Sans Serif, 6.25pt @@ -10690,13 +7840,10 @@ NoControl - 455, 377 - - - 4, 4, 4, 4 + 341, 306 - 113, 37 + 85, 30 54 @@ -10723,13 +7870,10 @@ NoControl - 231, 233 - - - 4, 4, 4, 4 + 173, 189 - 113, 37 + 85, 30 32 @@ -10756,13 +7900,10 @@ NoControl - 455, 17 - - - 4, 4, 4, 4 + 341, 14 - 113, 37 + 85, 30 4 @@ -10789,13 +7930,10 @@ NoControl - 343, 17 - - - 4, 4, 4, 4 + 257, 14 - 113, 37 + 85, 30 3 @@ -10822,13 +7960,10 @@ NoControl - 231, 17 - - - 4, 4, 4, 4 + 173, 14 - 113, 37 + 85, 30 2 @@ -10855,13 +7990,10 @@ NoControl - 119, 17 - - - 4, 4, 4, 4 + 89, 14 - 113, 37 + 85, 30 1 @@ -10888,13 +8020,10 @@ NoControl - 7, 17 - - - 4, 4, 4, 4 + 5, 14 - 113, 37 + 85, 30 0 @@ -10921,13 +8050,10 @@ NoControl - 455, 161 - - - 4, 4, 4, 4 + 341, 131 - 113, 37 + 85, 30 24 @@ -10954,13 +8080,10 @@ NoControl - 231, 161 - - - 4, 4, 4, 4 + 173, 131 - 113, 37 + 85, 30 22 @@ -10987,13 +8110,10 @@ NoControl - 119, 161 - - - 4, 4, 4, 4 + 89, 131 - 113, 37 + 85, 30 21 @@ -11020,13 +8140,10 @@ NoControl - 7, 161 - - - 4, 4, 4, 4 + 5, 131 - 113, 37 + 85, 30 20 @@ -11046,239 +8163,41 @@ 54 - - cmdCircular - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 0 - - - cmdCircQuantile - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 1 - - - cmdCircMax - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 2 - - - cmdA1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 3 - - - cmdAngVar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 4 - - - cmdCircRho - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 5 - - - cmdCircQ3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 6 - - - cmdCircQ1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 7 - - - cmdCircMin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 8 - - - cmdAngDev - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 9 - - - cmdCircVar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 10 - - - cmdCircSd - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 11 - - - cmdCircRange - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 12 - - - cmdMedianHL - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 13 - - - cmdCircMedian - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 14 - - - cmdCircMean - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 15 - - - 573, 75 - - - 3, 2, 3, 2 - - - 3, 2, 3, 2 - - - 331, 190 + + 430, 63 - - 192 + + 434, 345 - - Circular + + 191 - - grpCircular + + Wakefield - + + grpWakefield + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 4 + + 5 NoControl - 3, 22 + 2, 18 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 15 @@ -11302,13 +8221,13 @@ NoControl - 161, 100 + 121, 81 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 13 @@ -11332,13 +8251,13 @@ NoControl - 240, 139 + 180, 113 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 10 @@ -11362,13 +8281,13 @@ NoControl - 3, 100 + 2, 81 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 8 @@ -11392,13 +8311,13 @@ NoControl - 83, 100 + 62, 81 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 6 @@ -11422,13 +8341,13 @@ NoControl - 240, 100 + 180, 81 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 14 @@ -11452,13 +8371,13 @@ NoControl - 161, 139 + 121, 113 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 12 @@ -11482,13 +8401,13 @@ NoControl - 83, 139 + 62, 113 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 11 @@ -11512,13 +8431,13 @@ NoControl - 3, 139 + 2, 113 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 9 @@ -11542,13 +8461,13 @@ NoControl - 161, 62 + 121, 50 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 7 @@ -11572,13 +8491,13 @@ NoControl - 240, 62 + 180, 50 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 5 @@ -11587,448 +8506,208 @@ var - cmdCircVar - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 10 - - - NoControl - - - 83, 62 - - - 3, 2, 3, 2 - - - 80, 39 - - - 4 - - - sd - - - cmdCircSd - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 11 - - - NoControl - - - 3, 62 - - - 3, 2, 3, 2 - - - 80, 39 - - - 3 - - - range - - - cmdCircRange - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 12 - - - NoControl - - - 240, 22 - - - 3, 2, 3, 2 - - - 80, 39 - - - 2 - - - medianHL - - - cmdMedianHL - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 13 - - - NoControl - - - 161, 22 - - - 3, 2, 3, 2 - - - 80, 39 - - - 1 - - - median - - - cmdCircMedian - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 14 - - - NoControl - - - 83, 22 - - - 3, 2, 3, 2 - - - 80, 39 - - - 0 - - - mean - - - cmdCircMean - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpCircular - - - 15 - - - cmdShuffle - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 0 - - - cmdShift - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 1 - - - cmdReverse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 2 - - - cmdReorder - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 3 - - - cmdRelevel - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 4 - - - cmdRecode - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 5 - - - cmdOther - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 6 - - - cmdFmatch - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 7 - - - cmdLump + cmdCircVar - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpFactor + + grpCircular - - 8 + + 10 - - cmdInseq + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 50 - - grpFactor + + 2, 2, 2, 2 - - 9 + + 60, 32 - - cmdInfreq + + 4 - + + sd + + + cmdCircSd + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpFactor + + grpCircular - - 10 + + 11 - - cmdInorder + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 50 - - grpFactor + + 2, 2, 2, 2 - - 11 + + 60, 32 - - cmdAdd_na + + 3 - + + range + + + cmdCircRange + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpFactor + + grpCircular - + 12 - - cmdExpand + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 180, 18 - - grpFactor + + 2, 2, 2, 2 - - 13 + + 60, 32 - - cmdDrop + + 2 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + medianHL - - grpFactor + + cmdMedianHL - - 14 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdCross + + grpCircular - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 13 - - grpFactor + + NoControl - - 15 + + 121, 18 - - cmdCollapse + + 2, 2, 2, 2 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 32 - - grpFactor + + 1 - - 16 + + median - - cmdLabelled + + cmdCircMedian - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpFactor + + grpCircular - - 17 + + 14 - - cmdFactor + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 62, 18 - - grpFactor + + 2, 2, 2, 2 - - 18 + + 60, 32 - - cmdAnon + + 0 - + + mean + + + cmdCircMean + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpFactor + + grpCircular - - 19 + + 15 - - 573, 75 + + 430, 61 - - 3, 2, 3, 2 + + 2, 2, 2, 2 - - 3, 2, 3, 2 + + 2, 2, 2, 2 - - 331, 226 + + 248, 154 - - 191 + + 192 - - Factor + + Circular - - grpFactor + + grpCircular - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 3 + + 4 NoControl - 243, 176 + 182, 143 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 210 @@ -12052,13 +8731,13 @@ NoControl - 164, 176 + 123, 143 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 209 @@ -12082,13 +8761,13 @@ NoControl - 85, 176 + 64, 143 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 208 @@ -12112,13 +8791,13 @@ NoControl - 5, 176 + 4, 143 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 207 @@ -12142,13 +8821,13 @@ NoControl - 243, 137 + 182, 111 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 206 @@ -12172,13 +8851,13 @@ NoControl - 164, 137 + 123, 111 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 205 @@ -12202,13 +8881,13 @@ NoControl - 85, 137 + 64, 111 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 204 @@ -12232,13 +8911,13 @@ NoControl - 5, 137 + 4, 111 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 203 @@ -12262,13 +8941,13 @@ NoControl - 243, 98 + 182, 80 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 202 @@ -12292,13 +8971,13 @@ NoControl - 164, 98 + 123, 80 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 201 @@ -12322,13 +9001,13 @@ NoControl - 85, 98 + 64, 80 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 200 @@ -12352,13 +9031,13 @@ NoControl - 5, 98 + 4, 80 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 199 @@ -12382,13 +9061,13 @@ NoControl - 243, 59 + 182, 48 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 198 @@ -12412,13 +9091,13 @@ NoControl - 164, 59 + 123, 48 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 197 @@ -12442,13 +9121,13 @@ NoControl - 85, 59 + 64, 48 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 196 @@ -12472,13 +9151,13 @@ NoControl - 5, 59 + 4, 48 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 195 @@ -12502,13 +9181,13 @@ NoControl - 243, 20 + 182, 16 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 194 @@ -12532,13 +9211,13 @@ NoControl - 164, 20 + 123, 16 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 193 @@ -12562,13 +9241,13 @@ NoControl - 5, 20 + 4, 16 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 191 @@ -12591,122 +9270,74 @@ NoControl - - 85, 20 - - - 3, 2, 3, 2 - - - 80, 39 - - - 192 - - - anon - - - cmdAnon - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFactor - - - 19 - - - cmdRegex - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpModifier - - - 0 - - - cmdFixed - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpModifier - - - 1 + + 64, 16 - - cmdCollate + + 2, 2, 2, 2 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 60, 32 - - grpModifier + + 192 - - 2 + + anon - - cmdBoundary + + cmdAnon - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpModifier + + grpFactor - - 3 + + 19 - - 579, 278 + + 430, 61 - - 3, 2, 3, 2 + + 2, 2, 2, 2 - - 3, 2, 3, 2 + + 2, 2, 2, 2 - - 341, 65 + + 248, 184 - - 192 + + 191 - - Modifier + + Factor - - grpModifier + + grpFactor - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 12 + + 3 NoControl - 251, 16 + 188, 13 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 3 @@ -12730,13 +9361,13 @@ NoControl - 168, 16 + 126, 13 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 2 @@ -12760,13 +9391,13 @@ NoControl - 85, 16 + 64, 13 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 1 @@ -12790,13 +9421,13 @@ NoControl - 3, 16 + 2, 13 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 0 @@ -12816,227 +9447,47 @@ 3 - - cmdOr3 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 0 - - - cmdEscape - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 1 - - - cmdPlusZero - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 2 - - - cmdZero - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 3 - - - cmdPlusOne - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 4 - - - cmdZeroOrOne - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 5 - - - cmdNumbers - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 6 - - - cmdNot1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 7 - - - cmdOr2 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 8 - - - cmdOr1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 9 - - - cmdSpace - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 10 - - - cmdDigit - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 11 - - - cmdEnd1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 12 - - - cmdbegin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 13 - - - cmdAny1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 14 - - - 577, 347 + + 434, 226 - - 3, 2, 3, 2 + + 2, 2, 2, 2 - - 3, 2, 3, 2 + + 2, 2, 2, 2 - - 421, 138 + + 256, 53 - - 193 + + 192 - - Symbols + + Modifier - - grpSymbols + + grpModifier - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 11 + + 12 NoControl - 169, 57 + 127, 46 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 16 @@ -13060,13 +9511,13 @@ NoControl - 252, 92 + 189, 75 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 14 @@ -13090,13 +9541,13 @@ NoControl - 335, 92 + 251, 75 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 15 @@ -13120,13 +9571,13 @@ NoControl - 169, 92 + 127, 75 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 13 @@ -13150,13 +9601,13 @@ NoControl - 85, 92 + 64, 75 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 12 @@ -13180,13 +9631,13 @@ NoControl - 3, 92 + 2, 75 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 11 @@ -13210,13 +9661,13 @@ NoControl - 335, 57 + 251, 46 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 10 @@ -13240,13 +9691,13 @@ NoControl - 85, 57 + 64, 46 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 8 @@ -13270,13 +9721,13 @@ NoControl - 252, 57 + 189, 46 - 3, 2, 3, 2 + 2, 2, 2, 2 - 84, 37 + 63, 30 9 @@ -13300,475 +9751,223 @@ NoControl - 3, 57 - - - 3, 2, 3, 2 - - - 84, 37 - - - 7 - - - [ ] or - - - cmdOr1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 9 - - - NoControl - - - 335, 20 - - - 3, 2, 3, 2 - - - 84, 37 - - - 6 - - - \s space - - - cmdSpace - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 10 - - - NoControl - - - 252, 20 - - - 3, 2, 3, 2 - - - 84, 37 - - - 5 - - - \d digit - - - cmdDigit - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 11 - - - NoControl - - - 169, 20 - - - 3, 2, 3, 2 - - - 84, 37 - - - 4 - - - $ end - - - cmdEnd1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 12 - - - NoControl - - - 85, 20 - - - 3, 2, 3, 2 - - - 84, 37 - - - 3 - - - ^ begin + 2, 46 - - cmdbegin - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 13 - - - NoControl - - - 3, 20 - - - 3, 2, 3, 2 - - - 84, 37 - - - 2 - - - . any - - - cmdAny1 - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpSymbols - - - 14 - - - cmdVE - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHydroGOF - - - 0 - - - cmdSsq - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHydroGOF - - - 1 - - - cmdRsr - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHydroGOF - - - 2 - - - cmdRSD - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHydroGOF - - - 3 - - - cmdRPearson - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHydroGOF - - - 4 - - - cmdRNSE - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHydroGOF - - - 5 - - - cmdRmse - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHydroGOF - - - 6 - - - cmdRd - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 2, 2, 2 - - grpHydroGOF + + 63, 30 - + 7 - - cmdPbiasfde + + [ ] or - + + cmdOr1 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpHydroGOF + + grpSymbols - - 8 + + 9 - - cmdPbias + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 251, 16 - - grpHydroGOF + + 2, 2, 2, 2 - - 9 + + 63, 30 - - cmdNSE + + 6 - + + \s space + + + cmdSpace + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpHydroGOF + + grpSymbols - + 10 - - cmdNrmse + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 189, 16 - - grpHydroGOF + + 2, 2, 2, 2 - - 11 + + 63, 30 - - cmdMse + + 5 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \d digit - - grpHydroGOF + + cmdDigit - - 12 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdmNSE + + grpSymbols - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 11 - - grpHydroGOF + + NoControl - - 13 + + 127, 16 - - cmdMe + + 2, 2, 2, 2 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 63, 30 - - grpHydroGOF + + 4 - - 14 + + $ end - - cmdMd + + cmdEnd1 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpHydroGOF + + grpSymbols - - 15 + + 12 - - cmdMae + + NoControl - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 64, 16 - - grpHydroGOF + + 2, 2, 2, 2 - - 16 + + 63, 30 - - cmdKGE + + 3 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ^ begin - - grpHydroGOF + + cmdbegin - - 17 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - cmdD + + grpSymbols - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 13 - - grpHydroGOF + + NoControl - - 18 + + 2, 16 - - cmdCp + + 2, 2, 2, 2 - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 63, 30 - - grpHydroGOF + + 2 - - 19 + + . any - - cmdBr2 + + cmdAny1 - + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpHydroGOF + + grpSymbols - - 20 + + 14 - - 569, 75 + + 433, 282 - - 3, 2, 3, 2 + + 2, 2, 2, 2 - - 3, 2, 3, 2 + + 2, 2, 2, 2 - - 244, 302 + + 316, 112 - - 195 + + 193 - - hydroGOF + + Symbols - - grpHydroGOF + + grpSymbols - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 1 + + 11 NoControl - 160, 254 + 120, 206 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 20 @@ -13792,13 +9991,13 @@ NoControl - 81, 254 + 61, 206 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 19 @@ -13822,13 +10021,13 @@ NoControl - 3, 254 + 2, 206 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 18 @@ -13852,13 +10051,13 @@ NoControl - 160, 215 + 120, 175 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 17 @@ -13882,13 +10081,13 @@ NoControl - 81, 215 + 61, 175 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 16 @@ -13912,13 +10111,13 @@ NoControl - 3, 215 + 2, 175 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 15 @@ -13942,13 +10141,13 @@ NoControl - 160, 176 + 120, 143 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 14 @@ -13972,13 +10171,13 @@ NoControl - 81, 176 + 61, 143 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 13 @@ -14002,13 +10201,13 @@ NoControl - 3, 176 + 2, 143 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 12 @@ -14032,13 +10231,13 @@ NoControl - 160, 137 + 120, 111 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 11 @@ -14062,13 +10261,13 @@ NoControl - 81, 137 + 61, 111 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 10 @@ -14092,13 +10291,13 @@ NoControl - 3, 137 + 2, 111 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 9 @@ -14122,13 +10321,13 @@ NoControl - 160, 98 + 120, 80 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 8 @@ -14152,13 +10351,13 @@ NoControl - 81, 98 + 61, 80 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 7 @@ -14182,13 +10381,13 @@ NoControl - 3, 98 + 2, 80 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 6 @@ -14212,13 +10411,13 @@ NoControl - 160, 59 + 120, 48 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 5 @@ -14242,13 +10441,13 @@ NoControl - 81, 59 + 61, 48 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 4 @@ -14272,13 +10471,13 @@ NoControl - 3, 59 + 2, 48 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 3 @@ -14302,13 +10501,13 @@ NoControl - 160, 20 + 120, 16 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 2 @@ -14332,13 +10531,13 @@ NoControl - 81, 20 + 61, 16 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 1 @@ -14362,13 +10561,13 @@ NoControl - 3, 20 + 2, 16 - 3, 2, 3, 2 + 2, 2, 2, 2 - 80, 39 + 60, 32 0 @@ -14388,14 +10587,44 @@ 20 + + 427, 61 + + + 2, 2, 2, 2 + + + 2, 2, 2, 2 + + + 183, 245 + + + 195 + + + hydroGOF + + + grpHydroGOF + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 1 + - 15, 383 + 11, 311 - 5, 6, 5, 6 + 4, 5, 4, 5 - 410, 27 + 308, 22 196 @@ -14413,13 +10642,13 @@ 0 - 1, 315 + 1, 256 - 5, 5, 5, 5 + 4, 4, 4, 4 - 528, 41 + 396, 33 194 @@ -14437,13 +10666,13 @@ 2 - 301, 50 + 226, 41 - 3, 4, 3, 4 + 2, 3, 2, 3 - 183, 27 + 137, 22 180 @@ -14461,13 +10690,13 @@ 17 - 0, 79 + 0, 64 0, 0, 0, 0 - 280, 223 + 210, 181 173 @@ -14485,13 +10714,13 @@ 19 - 93, 7 + 70, 6 - 3, 4, 3, 4 + 2, 3, 2, 3 - 521, 36 + 391, 29 120 @@ -14515,13 +10744,10 @@ 41 - 8, 16 - - - 4, 4, 4, 4 + 6, 13 - 1171, 562 + 878, 457 ttCalculator From 6d9e8381f8c5de6c5a75f9bbd7ab7aac0ed2b684 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 27 Aug 2020 20:30:25 +0300 Subject: [PATCH 075/277] Updating data farme --- instat/dlgClimaticCheckDataTemperature.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgClimaticCheckDataTemperature.vb b/instat/dlgClimaticCheckDataTemperature.vb index f8be048aacb..e3ec5d79ebf 100644 --- a/instat/dlgClimaticCheckDataTemperature.vb +++ b/instat/dlgClimaticCheckDataTemperature.vb @@ -614,6 +614,7 @@ Public Class dlgClimaticCheckDataTemperature Private Sub ucrSelectorTemperature_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTemperature.ControlValueChanged strCurrDataFrame = Chr(34) & ucrSelectorTemperature.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34) + GroupByOptions() End Sub Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged From 429d7e717c0040cef8a46102abc05555670f8011 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 28 Aug 2020 08:56:20 +0300 Subject: [PATCH 076/277] designer edits:adding controls --- instat/dlgImportGriddedData.Designer.vb | 191 +++++---- instat/dlgImportGriddedData.resx | 506 +++++++++++++++--------- 2 files changed, 440 insertions(+), 257 deletions(-) diff --git a/instat/dlgImportGriddedData.Designer.vb b/instat/dlgImportGriddedData.Designer.vb index 18a9127879b..8d13f548db3 100644 --- a/instat/dlgImportGriddedData.Designer.vb +++ b/instat/dlgImportGriddedData.Designer.vb @@ -47,23 +47,28 @@ Partial Class dlgImportGriddedData Me.lblDownloadFrom = New System.Windows.Forms.Label() Me.lblDataFile = New System.Windows.Forms.Label() Me.cmdBrowse = New System.Windows.Forms.Button() - Me.lblExport = New System.Windows.Forms.Label() - Me.lblLocationData = New System.Windows.Forms.Label() Me.grpGetArea = New System.Windows.Forms.GroupBox() Me.rdoPoint = New System.Windows.Forms.RadioButton() Me.rdoArea = New System.Windows.Forms.RadioButton() Me.ucrPnlGetArea = New instat.UcrPanel() - Me.ucrInputLocDataName = New instat.ucrInputTextBox() Me.ucrInputExportFile = New instat.ucrInputTextBox() Me.ucrInputDataFile = New instat.ucrInputComboBox() Me.ucrInputDownloadFrom = New instat.ucrInputComboBox() Me.ucrInputMainDataName = New instat.ucrInputTextBox() - Me.ucrNudMaxLat = New instat.ucrNud() - Me.ucrNudMaxLon = New instat.ucrNud() - Me.ucrNudMinLon = New instat.ucrNud() - Me.ucrNudMinLat = New instat.ucrNud() Me.ucrBase = New instat.ucrButtons() + Me.UcrDateTimePicker1 = New instat.ucrDateTimePicker() + Me.UcrDateTimePicker2 = New instat.ucrDateTimePicker() + Me.grpDataRange = New System.Windows.Forms.GroupBox() + Me.lblTo = New System.Windows.Forms.Label() + Me.lblFrom = New System.Windows.Forms.Label() + Me.ucrInputMaxLon = New instat.ucrInputTextBox() + Me.ucrInputMinLon = New instat.ucrInputTextBox() + Me.ucrInputMaxLat = New instat.ucrInputTextBox() + Me.ucrInputMinLat = New instat.ucrInputTextBox() + Me.ucrChkTempLocation = New instat.ucrCheck() + Me.ucrChkDontImportData = New instat.ucrCheck() Me.grpGetArea.SuspendLayout() + Me.grpDataRange.SuspendLayout() Me.SuspendLayout() ' 'lblMinLat @@ -107,16 +112,6 @@ Partial Class dlgImportGriddedData Me.cmdBrowse.Name = "cmdBrowse" Me.cmdBrowse.UseVisualStyleBackColor = True ' - 'lblExport - ' - resources.ApplyResources(Me.lblExport, "lblExport") - Me.lblExport.Name = "lblExport" - ' - 'lblLocationData - ' - resources.ApplyResources(Me.lblLocationData, "lblLocationData") - Me.lblLocationData.Name = "lblLocationData" - ' 'grpGetArea ' Me.grpGetArea.Controls.Add(Me.rdoPoint) @@ -145,14 +140,6 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.ucrPnlGetArea, "ucrPnlGetArea") Me.ucrPnlGetArea.Name = "ucrPnlGetArea" ' - 'ucrInputLocDataName - ' - Me.ucrInputLocDataName.AddQuotesIfUnrecognised = True - Me.ucrInputLocDataName.IsMultiline = False - Me.ucrInputLocDataName.IsReadOnly = False - resources.ApplyResources(Me.ucrInputLocDataName, "ucrInputLocDataName") - Me.ucrInputLocDataName.Name = "ucrInputLocDataName" - ' 'ucrInputExportFile ' Me.ucrInputExportFile.AddQuotesIfUnrecognised = True @@ -164,6 +151,7 @@ Partial Class dlgImportGriddedData 'ucrInputDataFile ' Me.ucrInputDataFile.AddQuotesIfUnrecognised = True + Me.ucrInputDataFile.GetSetSelectedIndex = -1 Me.ucrInputDataFile.IsReadOnly = False resources.ApplyResources(Me.ucrInputDataFile, "ucrInputDataFile") Me.ucrInputDataFile.Name = "ucrInputDataFile" @@ -171,6 +159,7 @@ Partial Class dlgImportGriddedData 'ucrInputDownloadFrom ' Me.ucrInputDownloadFrom.AddQuotesIfUnrecognised = True + Me.ucrInputDownloadFrom.GetSetSelectedIndex = -1 Me.ucrInputDownloadFrom.IsReadOnly = False resources.ApplyResources(Me.ucrInputDownloadFrom, "ucrInputDownloadFrom") Me.ucrInputDownloadFrom.Name = "ucrInputDownloadFrom" @@ -183,61 +172,103 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.ucrInputMainDataName, "ucrInputMainDataName") Me.ucrInputMainDataName.Name = "ucrInputMainDataName" ' - 'ucrNudMaxLat - ' - Me.ucrNudMaxLat.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaxLat.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudMaxLat, "ucrNudMaxLat") - Me.ucrNudMaxLat.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMaxLat.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaxLat.Name = "ucrNudMaxLat" - Me.ucrNudMaxLat.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudMaxLon - ' - Me.ucrNudMaxLon.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaxLon.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudMaxLon, "ucrNudMaxLon") - Me.ucrNudMaxLon.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMaxLon.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaxLon.Name = "ucrNudMaxLon" - Me.ucrNudMaxLon.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudMinLon - ' - Me.ucrNudMinLon.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMinLon.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudMinLon, "ucrNudMinLon") - Me.ucrNudMinLon.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMinLon.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMinLon.Name = "ucrNudMinLon" - Me.ucrNudMinLon.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudMinLat - ' - Me.ucrNudMinLat.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMinLat.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudMinLat, "ucrNudMinLat") - Me.ucrNudMinLat.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMinLat.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMinLat.Name = "ucrNudMinLat" - Me.ucrNudMinLat.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'ucrBase ' resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' + 'UcrDateTimePicker1 + ' + resources.ApplyResources(Me.UcrDateTimePicker1, "UcrDateTimePicker1") + Me.UcrDateTimePicker1.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.UcrDateTimePicker1.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.UcrDateTimePicker1.Name = "UcrDateTimePicker1" + ' + 'UcrDateTimePicker2 + ' + resources.ApplyResources(Me.UcrDateTimePicker2, "UcrDateTimePicker2") + Me.UcrDateTimePicker2.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.UcrDateTimePicker2.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.UcrDateTimePicker2.Name = "UcrDateTimePicker2" + ' + 'grpDataRange + ' + Me.grpDataRange.Controls.Add(Me.lblTo) + Me.grpDataRange.Controls.Add(Me.lblFrom) + Me.grpDataRange.Controls.Add(Me.UcrDateTimePicker1) + Me.grpDataRange.Controls.Add(Me.UcrDateTimePicker2) + resources.ApplyResources(Me.grpDataRange, "grpDataRange") + Me.grpDataRange.Name = "grpDataRange" + Me.grpDataRange.TabStop = False + ' + 'lblTo + ' + resources.ApplyResources(Me.lblTo, "lblTo") + Me.lblTo.Name = "lblTo" + ' + 'lblFrom + ' + resources.ApplyResources(Me.lblFrom, "lblFrom") + Me.lblFrom.Name = "lblFrom" + ' + 'ucrInputMaxLon + ' + Me.ucrInputMaxLon.AddQuotesIfUnrecognised = True + Me.ucrInputMaxLon.IsMultiline = False + Me.ucrInputMaxLon.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMaxLon, "ucrInputMaxLon") + Me.ucrInputMaxLon.Name = "ucrInputMaxLon" + ' + 'ucrInputMinLon + ' + Me.ucrInputMinLon.AddQuotesIfUnrecognised = True + Me.ucrInputMinLon.IsMultiline = False + Me.ucrInputMinLon.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMinLon, "ucrInputMinLon") + Me.ucrInputMinLon.Name = "ucrInputMinLon" + ' + 'ucrInputMaxLat + ' + Me.ucrInputMaxLat.AddQuotesIfUnrecognised = True + Me.ucrInputMaxLat.IsMultiline = False + Me.ucrInputMaxLat.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMaxLat, "ucrInputMaxLat") + Me.ucrInputMaxLat.Name = "ucrInputMaxLat" + ' + 'ucrInputMinLat + ' + Me.ucrInputMinLat.AddQuotesIfUnrecognised = True + Me.ucrInputMinLat.IsMultiline = False + Me.ucrInputMinLat.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMinLat, "ucrInputMinLat") + Me.ucrInputMinLat.Name = "ucrInputMinLat" + ' + 'ucrChkTempLocation + ' + Me.ucrChkTempLocation.Checked = False + resources.ApplyResources(Me.ucrChkTempLocation, "ucrChkTempLocation") + Me.ucrChkTempLocation.Name = "ucrChkTempLocation" + ' + 'ucrChkDontImportData + ' + Me.ucrChkDontImportData.Checked = False + resources.ApplyResources(Me.ucrChkDontImportData, "ucrChkDontImportData") + Me.ucrChkDontImportData.Name = "ucrChkDontImportData" + ' 'dlgImportGriddedData ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.ucrChkDontImportData) + Me.Controls.Add(Me.ucrChkTempLocation) + Me.Controls.Add(Me.ucrInputMinLat) + Me.Controls.Add(Me.ucrInputMaxLat) + Me.Controls.Add(Me.ucrInputMinLon) + Me.Controls.Add(Me.ucrInputMaxLon) + Me.Controls.Add(Me.grpDataRange) Me.Controls.Add(Me.grpGetArea) - Me.Controls.Add(Me.ucrInputLocDataName) - Me.Controls.Add(Me.lblLocationData) Me.Controls.Add(Me.ucrInputExportFile) Me.Controls.Add(Me.cmdBrowse) - Me.Controls.Add(Me.lblExport) Me.Controls.Add(Me.lblDataFile) Me.Controls.Add(Me.ucrInputDataFile) Me.Controls.Add(Me.lblDownloadFrom) @@ -248,10 +279,6 @@ Partial Class dlgImportGriddedData Me.Controls.Add(Me.lblMinLon) Me.Controls.Add(Me.lblMaxLat) Me.Controls.Add(Me.lblMinLat) - Me.Controls.Add(Me.ucrNudMaxLat) - Me.Controls.Add(Me.ucrNudMaxLon) - Me.Controls.Add(Me.ucrNudMinLon) - Me.Controls.Add(Me.ucrNudMinLat) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -259,16 +286,14 @@ Partial Class dlgImportGriddedData Me.Name = "dlgImportGriddedData" Me.grpGetArea.ResumeLayout(False) Me.grpGetArea.PerformLayout() + Me.grpDataRange.ResumeLayout(False) + Me.grpDataRange.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrNudMinLat As ucrNud - Friend WithEvents ucrNudMinLon As ucrNud - Friend WithEvents ucrNudMaxLon As ucrNud - Friend WithEvents ucrNudMaxLat As ucrNud Friend WithEvents lblMinLat As Label Friend WithEvents lblMaxLat As Label Friend WithEvents lblMinLon As Label @@ -281,11 +306,19 @@ Partial Class dlgImportGriddedData Friend WithEvents lblDataFile As Label Friend WithEvents ucrInputExportFile As ucrInputTextBox Friend WithEvents cmdBrowse As Button - Friend WithEvents lblExport As Label - Friend WithEvents ucrInputLocDataName As ucrInputTextBox - Friend WithEvents lblLocationData As Label Friend WithEvents grpGetArea As GroupBox Friend WithEvents rdoPoint As RadioButton Friend WithEvents rdoArea As RadioButton Friend WithEvents ucrPnlGetArea As UcrPanel + Friend WithEvents UcrDateTimePicker1 As ucrDateTimePicker + Friend WithEvents UcrDateTimePicker2 As ucrDateTimePicker + Friend WithEvents grpDataRange As GroupBox + Friend WithEvents lblTo As Label + Friend WithEvents lblFrom As Label + Friend WithEvents ucrInputMaxLon As ucrInputTextBox + Friend WithEvents ucrInputMinLon As ucrInputTextBox + Friend WithEvents ucrInputMaxLat As ucrInputTextBox + Friend WithEvents ucrInputMinLat As ucrInputTextBox + Friend WithEvents ucrChkTempLocation As ucrCheck + Friend WithEvents ucrChkDontImportData As ucrCheck End Class diff --git a/instat/dlgImportGriddedData.resx b/instat/dlgImportGriddedData.resx index 313cd00947b..3d8602ed217 100644 --- a/instat/dlgImportGriddedData.resx +++ b/instat/dlgImportGriddedData.resx @@ -123,7 +123,7 @@ - 11, 234 + 11, 196 92, 13 @@ -144,13 +144,13 @@ $this - 15 + 19 True - 225, 234 + 225, 196 95, 13 @@ -171,13 +171,13 @@ $this - 14 + 18 True - 11, 210 + 11, 172 101, 13 @@ -198,13 +198,13 @@ $this - 13 + 17 True - 225, 209 + 225, 171 104, 13 @@ -225,13 +225,13 @@ $this - 12 + 16 True - 11, 79 + 9, 275 90, 13 @@ -252,7 +252,7 @@ $this - 11 + 15 True @@ -261,13 +261,13 @@ 11, 25 - 84, 13 + 44, 13 0 - Download From: + Source: lblDownloadFrom @@ -279,7 +279,7 @@ $this - 8 + 12 True @@ -288,13 +288,13 @@ 11, 52 - 52, 13 + 33, 13 2 - Data File: + Data: lblDataFile @@ -306,13 +306,13 @@ $this - 6 + 10 - 376, 258 + 331, 220 - 62, 23 + 75, 23 19 @@ -330,67 +330,73 @@ $this - 4 + 9 - - True + + rdoPoint + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 11, 263 + + grpGetArea - - 116, 13 + + 0 - - 17 + + rdoArea - - Temporary file location: + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - lblExport + + grpGetArea - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 1 - - $this + + ucrPnlGetArea - - 5 + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - True + + grpGetArea - - 11, 106 + + 2 - - 108, 13 + + 11, 78 - - 6 + + 116, 82 - - Location Data Name: + + 8 - - lblLocationData + + Download Type - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + grpGetArea - + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 2 + + 7 True - 120, 19 + 10, 42 49, 17 @@ -444,7 +450,7 @@ 7, 13 - 184, 28 + 69, 60 0 @@ -461,56 +467,11 @@ 2 - - 11, 140 - - - 197, 47 - - - 8 - - - Download Type - - - grpGetArea - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 0 - - - 131, 102 - - - 161, 21 - - - 7 - - - ucrInputLocDataName - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 1 - - 132, 259 + 129, 221 - 227, 21 + 200, 21 18 @@ -525,10 +486,10 @@ $this - 3 + 8 - 131, 48 + 102, 48 161, 21 @@ -546,10 +507,10 @@ $this - 7 + 11 - 131, 21 + 103, 21 161, 21 @@ -567,10 +528,10 @@ $this - 9 + 13 - 131, 75 + 102, 271 161, 21 @@ -588,112 +549,302 @@ $this - 10 + 14 + + + 11, 298 - - 332, 230 + + 416, 52 - - 72, 20 + + 20 - - 16 + + ucrBase - - ucrNudMaxLat + + instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 20 + + + 40, 21 + + + 180, 20 + + + 21 + + + UcrDateTimePicker1 + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDataRange + + + 2 + + + 40, 53 + + + 180, 20 + + + 22 + + + UcrDateTimePicker2 + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDataRange + + + 3 + + + lblTo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDataRange + + + 0 + + + lblFrom + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDataRange + + + 1 + + + 130, 78 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 229, 82 - + + 23 + + + Data Range + + + grpDataRange + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 16 + + 6 - - 332, 205 + + True + + + + NoControl - - 72, 20 + + 4, 56 - - 12 + + 23, 13 + + + 24 + + + To: + + + lblTo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDataRange + + + 0 + + + True - - ucrNudMaxLon + + 4, 25 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 33, 13 - + + 23 + + + From: + + + lblFrom + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDataRange + + + 1 + + + 331, 167 + + + 75, 21 + + + 24 + + + ucrInputMaxLon + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + $this - - 17 + + 5 - - 116, 206 + + 116, 168 - - 72, 20 + + 75, 21 - - 10 + + 25 - - ucrNudMinLon + + ucrInputMinLon - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 18 + + 4 - - 116, 231 + + 331, 190 - - 72, 20 + + 75, 21 - - 14 + + 26 - - ucrNudMinLat + + ucrInputMaxLat - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 19 + + 3 - - 11, 287 + + 116, 191 - - 416, 52 + + 75, 21 - - 20 + + 27 - - ucrBase + + ucrInputMinLat - - instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 20 + + 2 + + + 11, 221 + + + 116, 20 + + + 28 + + + ucrChkTempLocation + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + + + 11, 247 + + + 252, 20 + + + 29 + + + ucrChkDontImportData + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 True @@ -702,14 +853,13 @@ 6, 13 - 455, 346 + 423, 351 - CenterScreen - Import Gridded Data + Import From IRI Data Library dlgImportGriddedData From c797fec5604dddbfdb52ecf693bc4099b1af2a21 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 28 Aug 2020 11:00:11 +0300 Subject: [PATCH 077/277] code refactor --- instat/dlgImportGriddedData.vb | 116 +++++++++++++-------------------- 1 file changed, 46 insertions(+), 70 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 694eae1171c..3d4fe07c5fc 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -35,19 +35,9 @@ Public Class dlgImportGriddedData TestOkEnabled() End Sub - Private Sub SetRCodeForControls(bReset As Boolean) - SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) - End Sub - Private Sub InitialiseDialog() - dctDownloadPairs = New Dictionary(Of String, String) - ucrBase.iHelpTopicID = 526 - 'temporary until working - cmdBrowse.Enabled = False - ucrInputExportFile.Enabled = False - ucrInputDownloadFrom.SetParameter(New RParameter("download_from", 0)) dctDownloadPairs.Add("CHIRPS_V2P0", Chr(34) & "CHIRPS_V2P0" & Chr(34)) dctDownloadPairs.Add("TAMSAT", Chr(34) & "TAMSAT" & Chr(34)) @@ -63,62 +53,56 @@ Public Class dlgImportGriddedData ucrInputDownloadFrom.SetDropDownStyleAsNonEditable() ucrInputDataFile.SetParameter(New RParameter("data_file", 1)) + dctFiles.Add("Daily 0p05", Chr(34) & "daily_0p05" & Chr(34)) + dctFiles.Add("Daily 0p25", Chr(34) & "daily_0p25" & Chr(34)) + dctFiles.Add("Daily Improved 0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) + dctFiles.Add("Daily Improved 0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) + dctFiles.Add("Dekad", Chr(34) & "dekad" & Chr(34)) + dctFiles.Add("Monthly c8113", Chr(34) & "monthly_c8113" & Chr(34)) + dctFiles.Add("Monthly deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) + dctFiles.Add("Monthly NMME deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) + dctFiles.Add("Monthly Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) + ucrInputDataFile.SetItems(dctFiles) + ucrInputDataFile.SetDropDownStyleAsNonEditable() ucrInputMainDataName.SetParameter(New RParameter("data_frame_name", 2)) - ucrInputMainDataName.SetParameterIncludeArgumentName(False) - ucrInputLocDataName.SetParameter(New RParameter("location_data_name", 3)) - ucrInputLocDataName.SetParameterIncludeArgumentName(False) - - 'ucrInputExportFile.SetParameter(New RParameter("path", 4)) ucrPnlGetArea.SetParameter(New RParameter("get_area_point", 5)) ucrPnlGetArea.AddRadioButton(rdoArea, Chr(34) & "area" & Chr(34)) ucrPnlGetArea.AddRadioButton(rdoPoint, Chr(34) & "point" & Chr(34)) ucrPnlGetArea.SetRDefault(Chr(34) & "area" & Chr(34)) - ucrPnlGetArea.AddToLinkedControls({ucrNudMaxLat, ucrNudMaxLon}, {rdoArea}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlGetArea.AddToLinkedControls({ucrInputMaxLat, ucrInputMaxLon}, {rdoArea}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkTempLocation.AddToLinkedControls({ucrInputExportFile, ucrChkDontImportData}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDontImportData.AddToLinkedControls({ucrInputMainDataName}, {False}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputMinLon.SetLinkedDisplayControl(lblMinLon) + ucrInputMinLon.SetLinkedDisplayControl(lblMinLon) + ucrInputMaxLon.SetLinkedDisplayControl(lblMaxLon) + ucrInputMinLat.SetLinkedDisplayControl(lblMinLat) + ucrInputMaxLat.SetLinkedDisplayControl(lblMaxLat) + ucrInputExportFile.SetLinkedDisplayControl(cmdBrowse) + ucrInputMainDataName.SetLinkedDisplayControl(lblMainDataName) + + ucrInputMinLon.SetParameter(New RParameter("X1", 6)) + ucrInputMinLon.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) - ucrNudMinLon.SetParameter(New RParameter("X1", 6)) - ucrNudMinLon.SetMinMax(-180, 180) - ucrNudMinLon.DecimalPlaces = 4 - ucrNudMinLon.Increment = 0.0001 - ucrNudMinLon.SetLinkedDisplayControl(lblMinLon) - ucrNudMaxLon.SetParameter(New RParameter("X2", 7)) - ucrNudMaxLon.SetMinMax(-180, 180) - ucrNudMaxLon.DecimalPlaces = 4 - ucrNudMaxLon.Increment = 0.0001 - ucrNudMaxLon.SetLinkedDisplayControl(lblMaxLon) - ucrNudMinLat.SetParameter(New RParameter("Y1", 8)) - ucrNudMinLat.SetMinMax(-50, 50) - ucrNudMinLat.DecimalPlaces = 4 - ucrNudMinLat.Increment = 0.0001 - ucrNudMinLat.SetLinkedDisplayControl(lblMinLat) - ucrNudMaxLat.SetParameter(New RParameter("Y2", 9)) - ucrNudMaxLat.SetMinMax(-50, 50) - ucrNudMaxLat.DecimalPlaces = 4 - ucrNudMaxLat.Increment = 0.0001 - ucrNudMaxLat.SetLinkedDisplayControl(lblMaxLat) + ucrInputMaxLon.SetParameter(New RParameter("X2", 7)) + ucrInputMaxLon.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) + + ucrInputMinLat.SetParameter(New RParameter("Y1", 8)) + ucrInputMinLat.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) + + ucrInputMaxLat.SetParameter(New RParameter("Y2", 9)) + ucrInputMaxLat.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) + + ucrChkTempLocation.SetText("Save Downloaded File:") + + ucrChkDontImportData.SetText("Don't import data after downloading") End Sub Private Sub SetDefaults() clsRDefaultFunction = New RFunction - 'ucrInputExportFile.IsReadOnly = True - 'ucrInputExportFile.SetName("") - - dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily 0p05", Chr(34) & "daily_0p05" & Chr(34)) - dctFiles.Add("Daily 0p25", Chr(34) & "daily_0p25" & Chr(34)) - dctFiles.Add("Daily Improved 0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) - dctFiles.Add("Daily Improved 0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) - dctFiles.Add("Dekad", Chr(34) & "dekad" & Chr(34)) - dctFiles.Add("Monthly c8113", Chr(34) & "monthly_c8113" & Chr(34)) - dctFiles.Add("Monthly deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) - dctFiles.Add("Monthly NMME deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) - dctFiles.Add("Monthly Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) - ucrInputDataFile.SetItems(dctFiles) - ucrInputDataFile.SetDropDownStyleAsNonEditable() - clsRDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_from_iri") clsRDefaultFunction.AddParameter("download_from", Chr(34) & "CHIRPS_V2P0" & Chr(34)) clsRDefaultFunction.AddParameter("data_file", Chr(34) & "daily_0p05" & Chr(34)) @@ -133,6 +117,10 @@ Public Class dlgImportGriddedData ucrBase.clsRsyntax.SetBaseRFunction(clsRDefaultFunction) End Sub + Private Sub SetRCodeForControls(bReset As Boolean) + SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + End Sub + Private Sub TestOkEnabled() 'download from and datafile should be added to test ok If (ucrInputMainDataName.Text <> "") Then @@ -148,11 +136,7 @@ Public Class dlgImportGriddedData TestOkEnabled() End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputMainDataName.ControlContentsChanged - TestOkEnabled() - End Sub - - Private Sub pnlControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlGetArea.ControlContentsChanged + Private Sub ucrPnlGetArea_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlGetArea.ControlContentsChanged If rdoArea.Checked Then lblMinLat.Text = "Minimum Latitude:" lblMinLon.Text = "Minimum Longitude:" @@ -162,16 +146,8 @@ Public Class dlgImportGriddedData End If End Sub - Private Sub nudControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputDownloadFrom.ControlContentsChanged - DataSettings() - End Sub - - Private Sub DataSettings() + Private Sub ucrInputDownloadFrom_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputDownloadFrom.ControlContentsChanged If ucrInputDownloadFrom.cboInput.SelectedItem = "CHIRPS_V2P0" Then - ucrNudMinLon.SetMinMax(-180, 180) - ucrNudMaxLon.SetMinMax(-180, 180) - ucrNudMinLat.SetMinMax(-50, 50) - ucrNudMaxLat.SetMinMax(-50, 50) dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily 0p05", Chr(34) & "daily_0p05" & Chr(34)) dctFiles.Add("Daily 0p25", Chr(34) & "daily_0p25" & Chr(34)) @@ -185,10 +161,6 @@ Public Class dlgImportGriddedData ucrInputDataFile.SetItems(dctFiles) ucrInputDataFile.cboInput.SelectedItem = "Daily 0p05" Else - ucrNudMinLon.SetMinMax(-20, 55) - ucrNudMaxLon.SetMinMax(-20, 55) - ucrNudMinLat.SetMinMax(-40, 40) - ucrNudMaxLat.SetMinMax(-40, 40) If ucrInputDownloadFrom.cboInput.SelectedItem = "TAMSAT" Then dctFiles = New Dictionary(Of String, String) dctFiles.Add("Rainfall Estimates", Chr(34) & "rainfall_estimates" & Chr(34)) @@ -254,4 +226,8 @@ Public Class dlgImportGriddedData 'Private Sub ucrInputExportFile_Click(sender As Object, e As EventArgs) Handles ucrInputExportFile.Click ' cmdBrowse_Click(sender, e) 'End Sub + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputMainDataName.ControlContentsChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file From 5b91b248c11afab6a1a803985c156429adb96250 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 12:40:34 +0300 Subject: [PATCH 078/277] Setting the size of the dialog and the location of the ucBase --- instat/dlgCalculator.vb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 77a190bb27e..cd4c950494c 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -142,12 +142,14 @@ Public Class dlgCalculator Case "Transform" Me.Size = New System.Drawing.Size(iBasicWidth * 1.35, Me.Height) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.35, Me.Height) Case "Circular" Me.Size = New System.Drawing.Size(iBasicWidth * 1.36, Me.Height) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Wakefield" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, Me.Height * 1.1) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY + 60) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, Me.Height) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY + 50) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, Me.Height + 10) Case "Modifier" Me.Size = New Size(iBasicWidth * 1.39, Me.Height) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) From 818922637ce01c8dd3a7d868493aaf3d279638ff Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:00:06 +0300 Subject: [PATCH 079/277] Adding menu items to Climatic menu --- instat/frmMain.Designer.vb | 17 +- instat/frmMain.resx | 1184 ++++++++++++++++++------------------ 2 files changed, 620 insertions(+), 581 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index c44d8120a74..8ecf0b75944 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -622,6 +622,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.mnuClimaticCompare = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareCalculation = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -1421,7 +1423,7 @@ Partial Class frmMain ' 'mnuClimatic ' - Me.mnuClimatic.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFile, Me.ToolStripSeparator18, Me.mnuClimaticTidyandExamine, Me.mnuClimaticDates, Me.mnuClimaticDefineClimaticData, Me.mnuClimaticCheckData, Me.mnuClimaticPrepare, Me.ToolStripSeparator30, Me.mnuClimaticDescribe, Me.mnuClimaticPICSA, Me.mnuCMSAF, Me.mnuClimaticMapping, Me.ToolStripSeparator16, Me.mnuClimaticModel, Me.mnuClimaticExamine, Me.mnuClimaticProcess, Me.ToolStripSeparator23, Me.mnuClimaticSCF, Me.mnuClimaticEvaporation, Me.mnuClimaticCrop, Me.mnuClimaticHeatSum, Me.mnuClimaticClimateMethods}) + Me.mnuClimatic.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFile, Me.ToolStripSeparator18, Me.mnuClimaticTidyandExamine, Me.mnuClimaticDates, Me.mnuClimaticDefineClimaticData, Me.mnuClimaticCheckData, Me.mnuClimaticPrepare, Me.ToolStripSeparator30, Me.mnuClimaticDescribe, Me.mnuClimaticPICSA, Me.mnuCMSAF, Me.mnuClimaticCompare, Me.mnuClimaticMapping, Me.ToolStripSeparator16, Me.mnuClimaticModel, Me.mnuClimaticExamine, Me.mnuClimaticProcess, Me.ToolStripSeparator23, Me.mnuClimaticSCF, Me.mnuClimaticEvaporation, Me.mnuClimaticCrop, Me.mnuClimaticHeatSum, Me.mnuClimaticClimateMethods}) Me.mnuClimatic.Name = "mnuClimatic" resources.ApplyResources(Me.mnuClimatic, "mnuClimatic") Me.mnuClimatic.Tag = "Climatic" @@ -3947,6 +3949,17 @@ Partial Class frmMain Me.mnuLogFile.Name = "mnuLogFile" resources.ApplyResources(Me.mnuLogFile, "mnuLogFile") ' + 'mnuClimaticCompare + ' + Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation}) + Me.mnuClimaticCompare.Name = "mnuClimaticCompare" + resources.ApplyResources(Me.mnuClimaticCompare, "mnuClimaticCompare") + ' + 'mnuClimaticCompareCalculation + ' + Me.mnuClimaticCompareCalculation.Name = "mnuClimaticCompareCalculation" + resources.ApplyResources(Me.mnuClimaticCompareCalculation, "mnuClimaticCompareCalculation") + ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4576,4 +4589,6 @@ Partial Class frmMain Friend WithEvents ToolStripSeparator65 As ToolStripSeparator Friend WithEvents mnuPrepareCheckDataVisualiseData As ToolStripMenuItem Friend WithEvents mnuClimaticTidyandExamineVisualiseData As ToolStripMenuItem + Friend WithEvents mnuClimaticCompare As ToolStripMenuItem + Friend WithEvents mnuClimaticCompareCalculation As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index ad3b44dcc04..d1b80465951 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -118,18 +118,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 64, 20 - - - Describe - - - 172, 22 - - - One Variable - 146, 22 @@ -157,11 +145,11 @@ Rating Data... - + 172, 22 - - Two Variables + + One Variable 146, 22 @@ -184,11 +172,11 @@ Frequencies... - + 172, 22 - - Three Variables + + Two Variables @@ -218,11 +206,11 @@ Frequencies - + 172, 22 - - Specific + + Three Variables 209, 22 @@ -311,11 +299,11 @@ Mosaic Plot... - + 172, 22 - - General + + Specific 188, 22 @@ -347,14 +335,14 @@ Use Summaries... - - 169, 6 - - + 172, 22 - - Multivariate + + General + + + 169, 6 203, 22 @@ -374,6 +362,12 @@ Canonical Correlations... + + 172, 22 + + + Multivariate + 169, 6 @@ -404,17 +398,11 @@ View Graph... - - 53, 20 - - - Model - - - 201, 22 + + 64, 20 - - Probability Distributions + + Describe 242, 22 @@ -437,14 +425,14 @@ Random Samples (Use Model)... - - 198, 6 - - + 201, 22 - - Fit Model + + Probability Distributions + + + 198, 6 223, 22 @@ -494,11 +482,11 @@ Fit Model Keyboard... - + 201, 22 - - Compare Models + + Fit Model 149, 22 @@ -506,11 +494,11 @@ One Variable... - + 201, 22 - - Use Model + + Compare Models 192, 22 @@ -554,14 +542,11 @@ Use Model Keyboard... - - False - - + 201, 22 - - Other (One Variable) + + Use Model 166, 22 @@ -596,14 +581,14 @@ Goodness of Fit... - + False - + 201, 22 - - Other (Two Variables) + + Other (One Variable) False @@ -650,14 +635,14 @@ Non Parameteric One Way ANOVA... - + False - + 201, 22 - - Other (Three Variable) + + Other (Two Variables) False @@ -680,14 +665,14 @@ Chi-square Test... - + False - + 201, 22 - - Other (General) + + Other (Three Variable) False @@ -716,6 +701,21 @@ Log Linear... + + False + + + 201, 22 + + + Other (General) + + + 53, 20 + + + Model + False @@ -740,15 +740,6 @@ False - - 212, 22 - - - Evaporation - - - False - False @@ -767,13 +758,13 @@ Penman... - + 212, 22 - - Crop + + Evaporation - + False @@ -794,6 +785,15 @@ Water Satisfaction Index... + + 212, 22 + + + Crop + + + False + False @@ -806,12 +806,6 @@ False - - 44, 20 - - - View - 211, 22 @@ -878,11 +872,11 @@ Reset to Default Layout - + 44, 20 - - Help + + View 221, 22 @@ -944,12 +938,6 @@ 218, 6 - - 221, 22 - - - Guides - 166, 22 @@ -971,6 +959,12 @@ More... + + 221, 22 + + + Guides + False @@ -992,6 +986,12 @@ Acknowlegments + + 44, 20 + + + Help + 538, 56 @@ -1001,18 +1001,6 @@ 638, 56 - - 63, 20 - - - Climatic - - - 212, 22 - - - File - 211, 22 @@ -1061,14 +1049,14 @@ Export to CPT... - - 209, 6 - - + 212, 22 - - Tidy and Examine + + File + + + 209, 6 211, 22 @@ -1148,11 +1136,11 @@ One Variable Frequencies - + 212, 22 - - Dates + + Tidy and Examine 162, 22 @@ -1196,17 +1184,17 @@ Use Time... - + 212, 22 - - Define Climatic Data... + + Dates - + 212, 22 - - Check Data + + Define Climatic Data... 178, 22 @@ -1253,11 +1241,11 @@ Homogenization... - + 212, 22 - - Prepare + + Check Data 198, 22 @@ -1439,14 +1427,14 @@ False - - 209, 6 - - + 212, 22 - - Describe + + Prepare + + + 209, 6 False @@ -1466,18 +1454,18 @@ Temperature... - - 199, 22 - - - Wind Speed/Direction... - 139, 22 Wind Rose... + + 199, 22 + + + Wind Speed/Direction... + False @@ -1502,11 +1490,11 @@ 196, 6 - + 212, 22 - - PICSA + + Describe 246, 22 @@ -1535,11 +1523,11 @@ Crops... - + 212, 22 - - CM SAF + + PICSA 231, 22 @@ -1553,17 +1541,29 @@ Export to CM SAF R Toolbox... - + 212, 22 - - Mapping... + + CM SAF - + + 180, 22 + + + Calculation... + + 212, 22 - - Model + + Compare + + + 212, 22 + + + Mapping... 180, 22 @@ -1586,14 +1586,14 @@ Markov Modelling... - - 209, 6 - - + 212, 22 - - Seasonal Forecast Support + + Model + + + 209, 6 246, 22 @@ -1634,20 +1634,11 @@ Cumulative/Exceedance Graph... - + 212, 22 - - Climate Methods - - - False - - - 199, 22 - - - Data Manipulation + + Seasonal Forecast Support False @@ -1784,11 +1775,11 @@ Output for CDT... - + 199, 22 - - Graphics + + Data Manipulation False @@ -1907,6 +1898,12 @@ Three Summaries... + + 199, 22 + + + Graphics + False @@ -1916,12 +1913,6 @@ Model... - - 199, 22 - - - Additional - False @@ -1967,6 +1958,12 @@ Water Balance... + + 199, 22 + + + Additional + False @@ -1976,6 +1973,21 @@ Create Climate Object... + + 212, 22 + + + Climate Methods + + + False + + + 63, 20 + + + Climatic + Ctrl+S @@ -1986,12 +1998,6 @@ Save... - - 232, 22 - - - Save As - 164, 22 @@ -2016,6 +2022,12 @@ Save Script As... + + 232, 22 + + + Save As + False @@ -2046,12 +2058,6 @@ Exit - - 39, 20 - - - Edit - False @@ -2136,12 +2142,24 @@ Select All + + 39, 20 + + + Edit + 775, 56 946, 56 + + 119, 17 + + + No worksheet loaded + 0, 460 @@ -2166,42 +2184,9 @@ 1 - - 119, 17 - - - No worksheet loaded - 17, 95 - - 0, 24 - - - No - - - 834, 37 - - - 7 - - - Tool - - - Tool_strip - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - Magenta @@ -2265,6 +2250,18 @@ Edit Last Dialog + + 57, 6 + + + False + + + 57, 6 + + + False + Magenta @@ -2274,17 +2271,17 @@ Last 10 Dialogs - - 57, 6 + + 128, 22 - - False + + R Viewer... - - 57, 6 + + 128, 22 - - False + + Plotly... @@ -2324,18 +2321,6 @@ View Last Graph - - 128, 22 - - - R Viewer... - - - 128, 22 - - - Plotly... - 6, 37 @@ -2357,6 +2342,18 @@ Output Window + + 196, 22 + + + Column Metadata... + + + 196, 22 + + + Data Frame Metadata... + iVBORw0KGgoAAAANSUhEUgAAAG8AAABvCAYAAADixZ5gAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -2413,17 +2410,17 @@ Column Metadata - - 196, 22 + + 160, 22 - - Column Metadata... + + Log Window... - - 196, 22 + + 160, 22 - - Data Frame Metadata... + + Script Window... @@ -2553,18 +2550,6 @@ Log Window - - 160, 22 - - - Log Window... - - - 160, 22 - - - Script Window... - Magenta @@ -2586,230 +2571,38 @@ He&lp - - 122, 95 - - - On - - - 37, 20 - - - File - - - 180, 22 - - - Data Frame - - - 180, 22 - - - Check Data - - - 177, 6 - - - 180, 22 - - - Calculator... - - - 180, 22 - - - Column: Calculate - - - 180, 22 - - - Column: Factor - - - 180, 22 - - - Column: Text - - - 180, 22 - - - Column: Date - - - 180, 22 - - - Column: Define - - - 177, 6 - - - 180, 22 - - - Data Reshape - - - 177, 6 - - - 180, 22 - - - Keys and Links - - - False - - - 196, 22 - - - Data Frame Metadata... - - - 196, 22 - - - Rename Data Frame... - - - False - - - 196, 22 - - - Reorder Data Frames... - - - 196, 22 - - - Copy Data Frame... - - - 196, 22 - - - Delete Data Frames... - - - 193, 6 - - - 210, 22 - - - Hide/Show Data Frames... - - - 196, 22 - - - Metadata... - - - False - - - 196, 22 - - - Rename Metadata... - - - False - - - 196, 22 - - - Reorder Metadata... - - - False - - - 196, 22 - - - Delete Metadata... - - - 180, 22 - - - Data Object - - - 180, 22 - - - R Objects - - - 59, 20 - - - Prepare - - - 74, 20 - - - Structured - - - 88, 20 - - - Procurement - - - 122, 20 - - - Options by Context - - - 46, 20 - - - Tools + + 0, 24 - - 0, 0 + + No - - 834, 24 + + 834, 37 - - 6 + + 7 - - Menu_strip + + Tool - - mnuBar + + Tool_strip - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 3 + + 2 + + + 122, 95 + + + On Ctrl+N @@ -2883,12 +2676,6 @@ 229, 6 - - 232, 22 - - - Export - 204, 22 @@ -2913,6 +2700,12 @@ Export Graph As Image... + + 232, 22 + + + Export + 232, 22 @@ -2922,6 +2715,12 @@ 229, 6 + + 37, 20 + + + File + 200, 22 @@ -3030,6 +2829,12 @@ Colour by Property... + + 180, 22 + + + Data Frame + 245, 22 @@ -3123,6 +2928,21 @@ Anonymise ID Column... + + 180, 22 + + + Check Data + + + 177, 6 + + + 180, 22 + + + Calculator... + 179, 22 @@ -3177,6 +2997,12 @@ Permute Columns... + + 180, 22 + + + Column: Calculate + 179, 22 @@ -3264,6 +3090,12 @@ Factor Data Frame... + + 180, 22 + + + Column: Factor + 152, 22 @@ -3303,6 +3135,12 @@ Distance... + + 180, 22 + + + Column: Text + 162, 22 @@ -3345,6 +3183,12 @@ Use Time... + + 180, 22 + + + Column: Date + 176, 22 @@ -3360,6 +3204,15 @@ Circular... + + 180, 22 + + + Column: Define + + + 177, 6 + 193, 22 @@ -3417,38 +3270,137 @@ 193, 22 - - Transpose... + + Transpose... + + + 180, 22 + + + Data Reshape + + + 177, 6 + + + 207, 22 + + + Add Key... + + + 207, 22 + + + View and Remove Keys... + + + 207, 22 + + + Add Link... + + + 207, 22 + + + View and Remove Links... + + + 207, 22 + + + Add Comment... + + + 180, 22 + + + Keys and Links + + + False + + + 210, 22 + + + Data Frame Metadata... + + + 210, 22 + + + Rename Data Frame... + + + False + + + 210, 22 + + + Reorder Data Frames... + + + 210, 22 + + + Copy Data Frame... + + + 210, 22 + + + Delete Data Frames... + + + 207, 6 + + + 210, 22 + + + Hide/Show Data Frames... + + + 210, 22 + + + Metadata... + + + False - - 207, 22 + + 210, 22 - - Add Key... + + Rename Metadata... - - 207, 22 + + False - - View and Remove Keys... + + 210, 22 - - 207, 22 + + Reorder Metadata... - - Add Link... + + False - - 207, 22 + + 210, 22 - - View and Remove Links... + + Delete Metadata... - - 207, 22 + + 180, 22 - - Add Comment... + + Data Object 126, 22 @@ -3474,14 +3426,20 @@ Delete... - - 183, 6 + + 180, 22 - - 186, 22 + + R Objects - - Circular + + 59, 20 + + + Prepare + + + 183, 6 117, 22 @@ -3489,11 +3447,11 @@ Define... - + 186, 22 - - Low_Flow + + Circular 117, 22 @@ -3501,11 +3459,11 @@ Define... - + 186, 22 - - Survival + + Low_Flow 117, 22 @@ -3513,11 +3471,11 @@ Define... - + 186, 22 - - Time Series + + Survival 119, 22 @@ -3528,12 +3486,6 @@ 116, 6 - - 119, 22 - - - Describe - 149, 22 @@ -3546,14 +3498,14 @@ General... - - 116, 6 - - + 119, 22 - - Model + + Describe + + + 116, 6 149, 22 @@ -3567,9 +3519,21 @@ General... + + 119, 22 + + + Model + 116, 6 + + 186, 22 + + + Time Series + 183, 6 @@ -3591,6 +3555,12 @@ Options by Context... + + 74, 20 + + + Structured + 216, 22 @@ -3603,12 +3573,6 @@ Define Procurement Data... - - 216, 22 - - - Prepare - 358, 22 @@ -3663,11 +3627,11 @@ Merge Additional Data... - + 216, 22 - - Describe + + Prepare 211, 22 @@ -3684,12 +3648,6 @@ 208, 6 - - 211, 22 - - - Categorical - 319, 22 @@ -3729,11 +3687,11 @@ Display Top N... - + 211, 22 - - Numeric + + Categorical 258, 22 @@ -3756,11 +3714,17 @@ Correlations (Red Flags or others)... - + + 211, 22 + + + Numeric + + 216, 22 - - Mapping + + Describe 189, 22 @@ -3768,11 +3732,11 @@ Map Country Values... - + 216, 22 - - Model + + Mapping 292, 22 @@ -3786,6 +3750,12 @@ Fit Model... + + 216, 22 + + + Model + 213, 6 @@ -3795,12 +3765,6 @@ Define Red Flag Variables... - - 216, 22 - - - Corruption Risk Index - 278, 22 @@ -3813,11 +3777,17 @@ Summarise CRI by Country (or other)... - - 250, 22 + + 216, 22 - - Check Data + + Corruption Risk Index + + + 88, 20 + + + Procurement 215, 22 @@ -3852,17 +3822,17 @@ One Variable Frequencies... - + 250, 22 - - Define Options by Context Data... + + Check Data - + 250, 22 - - Prepare + + Define Options by Context Data... 282, 22 @@ -3891,11 +3861,11 @@ Unstack... - + 250, 22 - - Describe + + Prepare 224, 22 @@ -3918,11 +3888,11 @@ Boxplot... - + 250, 22 - - Model + + Describe 176, 22 @@ -3936,6 +3906,18 @@ General Fit Model... + + 250, 22 + + + Model + + + 122, 20 + + + Options by Context + False @@ -4002,6 +3984,36 @@ Options... + + 46, 20 + + + Tools + + + 0, 0 + + + 834, 24 + + + 6 + + + Menu_strip + + + mnuBar + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + 126, 22 @@ -9654,6 +9666,18 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuClimaticCompare + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareCalculation + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain From 9d7ff248325443cb73666568dc8d21c74ea009e9 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:02:11 +0300 Subject: [PATCH 080/277] New menu item --- instat/frmMain.Designer.vb | 9 ++++++++- instat/frmMain.resx | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 8ecf0b75944..a272837b97d 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -624,6 +624,7 @@ Partial Class frmMain Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCompare = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCompareCalculation = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareSummary = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3951,7 +3952,7 @@ Partial Class frmMain ' 'mnuClimaticCompare ' - Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation}) + Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary}) Me.mnuClimaticCompare.Name = "mnuClimaticCompare" resources.ApplyResources(Me.mnuClimaticCompare, "mnuClimaticCompare") ' @@ -3960,6 +3961,11 @@ Partial Class frmMain Me.mnuClimaticCompareCalculation.Name = "mnuClimaticCompareCalculation" resources.ApplyResources(Me.mnuClimaticCompareCalculation, "mnuClimaticCompareCalculation") ' + 'mnuClimaticCompareSummary + ' + Me.mnuClimaticCompareSummary.Name = "mnuClimaticCompareSummary" + resources.ApplyResources(Me.mnuClimaticCompareSummary, "mnuClimaticCompareSummary") + ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4591,4 +4597,5 @@ Partial Class frmMain Friend WithEvents mnuClimaticTidyandExamineVisualiseData As ToolStripMenuItem Friend WithEvents mnuClimaticCompare As ToolStripMenuItem Friend WithEvents mnuClimaticCompareCalculation As ToolStripMenuItem + Friend WithEvents mnuClimaticCompareSummary As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index d1b80465951..2c6fc476f1f 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -1553,6 +1553,12 @@ Calculation... + + 180, 22 + + + Summary... + 212, 22 @@ -9678,6 +9684,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuClimaticCompareSummary + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain From 9bd8a527a3fb51f38e53c7a270849728c8bea7d7 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:04:13 +0300 Subject: [PATCH 081/277] New menu item --- instat/frmMain.Designer.vb | 16 +++++++++++++++- instat/frmMain.resx | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index a272837b97d..585802701da 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -625,6 +625,8 @@ Partial Class frmMain Me.mnuClimaticCompare = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCompareCalculation = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCompareSummary = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator66 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuClimaticCompareCorrelations = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3952,7 +3954,7 @@ Partial Class frmMain ' 'mnuClimaticCompare ' - Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary}) + Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations}) Me.mnuClimaticCompare.Name = "mnuClimaticCompare" resources.ApplyResources(Me.mnuClimaticCompare, "mnuClimaticCompare") ' @@ -3966,6 +3968,16 @@ Partial Class frmMain Me.mnuClimaticCompareSummary.Name = "mnuClimaticCompareSummary" resources.ApplyResources(Me.mnuClimaticCompareSummary, "mnuClimaticCompareSummary") ' + 'ToolStripSeparator66 + ' + Me.ToolStripSeparator66.Name = "ToolStripSeparator66" + resources.ApplyResources(Me.ToolStripSeparator66, "ToolStripSeparator66") + ' + 'mnuClimaticCompareCorrelations + ' + Me.mnuClimaticCompareCorrelations.Name = "mnuClimaticCompareCorrelations" + resources.ApplyResources(Me.mnuClimaticCompareCorrelations, "mnuClimaticCompareCorrelations") + ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4598,4 +4610,6 @@ Partial Class frmMain Friend WithEvents mnuClimaticCompare As ToolStripMenuItem Friend WithEvents mnuClimaticCompareCalculation As ToolStripMenuItem Friend WithEvents mnuClimaticCompareSummary As ToolStripMenuItem + Friend WithEvents ToolStripSeparator66 As ToolStripSeparator + Friend WithEvents mnuClimaticCompareCorrelations As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 2c6fc476f1f..0b72aa54597 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -1559,6 +1559,15 @@ Summary... + + 177, 6 + + + 180, 22 + + + Correlations... + 212, 22 @@ -9690,6 +9699,18 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ToolStripSeparator66 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareCorrelations + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain From ad24ac7a8a02e88b361e2e9e1a909af064aa24ec Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:09:08 +0300 Subject: [PATCH 082/277] New menu items --- instat/frmMain.Designer.vb | 23 ++++++++++++++++++++++- instat/frmMain.resx | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 585802701da..ca6428f09df 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -627,6 +627,9 @@ Partial Class frmMain Me.mnuClimaticCompareSummary = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator66 = New System.Windows.Forms.ToolStripSeparator() Me.mnuClimaticCompareCorrelations = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareScatterplot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareTimeSeriesPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareSeasonalPlot = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3954,7 +3957,7 @@ Partial Class frmMain ' 'mnuClimaticCompare ' - Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations}) + Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations, Me.mnuClimaticCompareScatterplot, Me.mnuClimaticCompareTimeSeriesPlot, Me.mnuClimaticCompareSeasonalPlot}) Me.mnuClimaticCompare.Name = "mnuClimaticCompare" resources.ApplyResources(Me.mnuClimaticCompare, "mnuClimaticCompare") ' @@ -3978,6 +3981,21 @@ Partial Class frmMain Me.mnuClimaticCompareCorrelations.Name = "mnuClimaticCompareCorrelations" resources.ApplyResources(Me.mnuClimaticCompareCorrelations, "mnuClimaticCompareCorrelations") ' + 'mnuClimaticCompareScatterplot + ' + Me.mnuClimaticCompareScatterplot.Name = "mnuClimaticCompareScatterplot" + resources.ApplyResources(Me.mnuClimaticCompareScatterplot, "mnuClimaticCompareScatterplot") + ' + 'mnuClimaticCompareTimeSeriesPlot + ' + Me.mnuClimaticCompareTimeSeriesPlot.Name = "mnuClimaticCompareTimeSeriesPlot" + resources.ApplyResources(Me.mnuClimaticCompareTimeSeriesPlot, "mnuClimaticCompareTimeSeriesPlot") + ' + 'mnuClimaticCompareSeasonalPlot + ' + Me.mnuClimaticCompareSeasonalPlot.Name = "mnuClimaticCompareSeasonalPlot" + resources.ApplyResources(Me.mnuClimaticCompareSeasonalPlot, "mnuClimaticCompareSeasonalPlot") + ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4612,4 +4630,7 @@ Partial Class frmMain Friend WithEvents mnuClimaticCompareSummary As ToolStripMenuItem Friend WithEvents ToolStripSeparator66 As ToolStripSeparator Friend WithEvents mnuClimaticCompareCorrelations As ToolStripMenuItem + Friend WithEvents mnuClimaticCompareScatterplot As ToolStripMenuItem + Friend WithEvents mnuClimaticCompareTimeSeriesPlot As ToolStripMenuItem + Friend WithEvents mnuClimaticCompareSeasonalPlot As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 0b72aa54597..cb524c29bf4 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -1568,6 +1568,24 @@ Correlations... + + 180, 22 + + + Scatterplot... + + + 180, 22 + + + Time Series Plot... + + + 180, 22 + + + Seasonal Plot... + 212, 22 @@ -9711,6 +9729,24 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuClimaticCompareScatterplot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareTimeSeriesPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareSeasonalPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain From 33fbd2098c96e930ddb501d90c45d385712cc6cf Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:14:30 +0300 Subject: [PATCH 083/277] Menu item --- instat/frmMain.Designer.vb | 9 ++++++++- instat/frmMain.resx | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index ca6428f09df..d4add37e9c1 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -630,6 +630,7 @@ Partial Class frmMain Me.mnuClimaticCompareScatterplot = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCompareTimeSeriesPlot = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCompareSeasonalPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareDensityPlot = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3957,7 +3958,7 @@ Partial Class frmMain ' 'mnuClimaticCompare ' - Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations, Me.mnuClimaticCompareScatterplot, Me.mnuClimaticCompareTimeSeriesPlot, Me.mnuClimaticCompareSeasonalPlot}) + Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations, Me.mnuClimaticCompareScatterplot, Me.mnuClimaticCompareTimeSeriesPlot, Me.mnuClimaticCompareSeasonalPlot, Me.mnuClimaticCompareDensityPlot}) Me.mnuClimaticCompare.Name = "mnuClimaticCompare" resources.ApplyResources(Me.mnuClimaticCompare, "mnuClimaticCompare") ' @@ -3996,6 +3997,11 @@ Partial Class frmMain Me.mnuClimaticCompareSeasonalPlot.Name = "mnuClimaticCompareSeasonalPlot" resources.ApplyResources(Me.mnuClimaticCompareSeasonalPlot, "mnuClimaticCompareSeasonalPlot") ' + 'mnuClimaticCompareDensityPlot + ' + Me.mnuClimaticCompareDensityPlot.Name = "mnuClimaticCompareDensityPlot" + resources.ApplyResources(Me.mnuClimaticCompareDensityPlot, "mnuClimaticCompareDensityPlot") + ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4633,4 +4639,5 @@ Partial Class frmMain Friend WithEvents mnuClimaticCompareScatterplot As ToolStripMenuItem Friend WithEvents mnuClimaticCompareTimeSeriesPlot As ToolStripMenuItem Friend WithEvents mnuClimaticCompareSeasonalPlot As ToolStripMenuItem + Friend WithEvents mnuClimaticCompareDensityPlot As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index cb524c29bf4..f80e1b36e07 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -1586,6 +1586,12 @@ Seasonal Plot... + + 180, 22 + + + Density Plot... + 212, 22 @@ -9747,6 +9753,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuClimaticCompareDensityPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain From c5bf51f56efac4663f23691c29fef0a52c49226b Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:21:28 +0300 Subject: [PATCH 084/277] Showing the dialog --- instat/frmMain.Designer.vb | 16 +- instat/frmMain.resx | 1130 ++++++++++++++++++------------------ instat/frmMain.vb | 4 + 3 files changed, 596 insertions(+), 554 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index d4add37e9c1..f601d9b0f10 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -631,6 +631,8 @@ Partial Class frmMain Me.mnuClimaticCompareTimeSeriesPlot = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCompareSeasonalPlot = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCompareDensityPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareConditionalQuantiles = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareTaylorDiagram = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3958,7 +3960,7 @@ Partial Class frmMain ' 'mnuClimaticCompare ' - Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations, Me.mnuClimaticCompareScatterplot, Me.mnuClimaticCompareTimeSeriesPlot, Me.mnuClimaticCompareSeasonalPlot, Me.mnuClimaticCompareDensityPlot}) + Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations, Me.mnuClimaticCompareScatterplot, Me.mnuClimaticCompareTimeSeriesPlot, Me.mnuClimaticCompareSeasonalPlot, Me.mnuClimaticCompareDensityPlot, Me.mnuClimaticCompareConditionalQuantiles, Me.mnuClimaticCompareTaylorDiagram}) Me.mnuClimaticCompare.Name = "mnuClimaticCompare" resources.ApplyResources(Me.mnuClimaticCompare, "mnuClimaticCompare") ' @@ -4002,6 +4004,16 @@ Partial Class frmMain Me.mnuClimaticCompareDensityPlot.Name = "mnuClimaticCompareDensityPlot" resources.ApplyResources(Me.mnuClimaticCompareDensityPlot, "mnuClimaticCompareDensityPlot") ' + 'mnuClimaticCompareConditionalQuantiles + ' + Me.mnuClimaticCompareConditionalQuantiles.Name = "mnuClimaticCompareConditionalQuantiles" + resources.ApplyResources(Me.mnuClimaticCompareConditionalQuantiles, "mnuClimaticCompareConditionalQuantiles") + ' + 'mnuClimaticCompareTaylorDiagram + ' + Me.mnuClimaticCompareTaylorDiagram.Name = "mnuClimaticCompareTaylorDiagram" + resources.ApplyResources(Me.mnuClimaticCompareTaylorDiagram, "mnuClimaticCompareTaylorDiagram") + ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4640,4 +4652,6 @@ Partial Class frmMain Friend WithEvents mnuClimaticCompareTimeSeriesPlot As ToolStripMenuItem Friend WithEvents mnuClimaticCompareSeasonalPlot As ToolStripMenuItem Friend WithEvents mnuClimaticCompareDensityPlot As ToolStripMenuItem + Friend WithEvents mnuClimaticCompareConditionalQuantiles As ToolStripMenuItem + Friend WithEvents mnuClimaticCompareTaylorDiagram As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index f80e1b36e07..ffb240ef31f 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -118,6 +118,18 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 64, 20 + + + Describe + + + 172, 22 + + + One Variable + 146, 22 @@ -145,11 +157,11 @@ Rating Data... - + 172, 22 - - One Variable + + Two Variables 146, 22 @@ -172,11 +184,11 @@ Frequencies... - + 172, 22 - - Two Variables + + Three Variables @@ -206,11 +218,11 @@ Frequencies - + 172, 22 - - Three Variables + + Specific 209, 22 @@ -299,11 +311,11 @@ Mosaic Plot... - + 172, 22 - - Specific + + General 188, 22 @@ -335,15 +347,15 @@ Use Summaries... - - 172, 22 - - - General - 169, 6 + + 172, 22 + + + Multivariate + 203, 22 @@ -362,12 +374,6 @@ Canonical Correlations... - - 172, 22 - - - Multivariate - 169, 6 @@ -398,11 +404,17 @@ View Graph... - - 64, 20 + + 53, 20 - - Describe + + Model + + + 201, 22 + + + Probability Distributions 242, 22 @@ -425,15 +437,15 @@ Random Samples (Use Model)... - - 201, 22 - - - Probability Distributions - 198, 6 + + 201, 22 + + + Fit Model + 223, 22 @@ -482,11 +494,11 @@ Fit Model Keyboard... - + 201, 22 - - Fit Model + + Compare Models 149, 22 @@ -494,11 +506,11 @@ One Variable... - + 201, 22 - - Compare Models + + Use Model 192, 22 @@ -542,11 +554,14 @@ Use Model Keyboard... - + + False + + 201, 22 - - Use Model + + Other (One Variable) 166, 22 @@ -581,14 +596,14 @@ Goodness of Fit... - + False - + 201, 22 - - Other (One Variable) + + Other (Two Variables) False @@ -635,14 +650,14 @@ Non Parameteric One Way ANOVA... - + False - + 201, 22 - - Other (Two Variables) + + Other (Three Variable) False @@ -665,14 +680,14 @@ Chi-square Test... - + False - + 201, 22 - - Other (Three Variable) + + Other (General) False @@ -701,21 +716,6 @@ Log Linear... - - False - - - 201, 22 - - - Other (General) - - - 53, 20 - - - Model - False @@ -740,6 +740,15 @@ False + + 212, 22 + + + Evaporation + + + False + False @@ -758,13 +767,13 @@ Penman... - + 212, 22 - - Evaporation + + Crop - + False @@ -785,15 +794,6 @@ Water Satisfaction Index... - - 212, 22 - - - Crop - - - False - False @@ -806,6 +806,12 @@ False + + 44, 20 + + + View + 211, 22 @@ -872,11 +878,11 @@ Reset to Default Layout - + 44, 20 - - View + + Help 221, 22 @@ -938,6 +944,12 @@ 218, 6 + + 221, 22 + + + Guides + 166, 22 @@ -959,48 +971,195 @@ More... - - 221, 22 - - - Guides - False 221, 22 - - About R-Instat + + About R-Instat + + + 221, 22 + + + Licence... + + + 221, 22 + + + Acknowlegments + + + 538, 56 + + + 209, 6 + + + 638, 56 + + + 212, 22 + + + File + + + 209, 6 + + + 212, 22 + + + Tidy and Examine + + + 212, 22 + + + Dates + + + 212, 22 + + + Define Climatic Data... + + + 212, 22 + + + Check Data + + + 212, 22 + + + Prepare + + + 209, 6 + + + 212, 22 + + + Describe + + + 212, 22 + + + PICSA + + + 212, 22 + + + CM SAF + + + 198, 22 + + + Calculation... + + + 198, 22 + + + Summary... + + + 195, 6 + + + 198, 22 + + + Correlations... + + + 198, 22 + + + Scatterplot... + + + 198, 22 + + + Time Series Plot... + + + 198, 22 + + + Seasonal Plot... + + + 198, 22 + + + Density Plot... + + + 198, 22 + + + Conditional Quantiles... + + + 198, 22 + + + Taylor Diagram... + + + 212, 22 + + + Compare + + + 212, 22 + + + Mapping... + + + 212, 22 + + + Model + + + 209, 6 - - 221, 22 + + 212, 22 - - Licence... + + Seasonal Forecast Support - - 221, 22 + + 212, 22 - - Acknowlegments + + Climate Methods - - 44, 20 + + False - - Help + + 63, 20 - - 538, 56 - - - 209, 6 + + Climatic - - 638, 56 - 211, 22 @@ -1049,15 +1208,6 @@ Export to CPT... - - 212, 22 - - - File - - - 209, 6 - 211, 22 @@ -1136,12 +1286,6 @@ One Variable Frequencies - - 212, 22 - - - Tidy and Examine - 162, 22 @@ -1184,69 +1328,51 @@ Use Time... - - 212, 22 - - - Dates - - - 212, 22 - - - Define Climatic Data... - - 178, 22 + 180, 22 Inventory... - 178, 22 + 180, 22 Fill Missing Values... - 175, 6 + 177, 6 - 178, 22 + 180, 22 Display Daily... - 178, 22 + 180, 22 Boxplot... - 178, 22 + 180, 22 QC Temperatures... - 178, 22 + 180, 22 QC Rainfall... - 178, 22 + 180, 22 Homogenization... - - 212, 22 - - - Check Data - 198, 22 @@ -1427,15 +1553,6 @@ False - - 212, 22 - - - Prepare - - - 209, 6 - False @@ -1454,18 +1571,18 @@ Temperature... - - 139, 22 - - - Wind Rose... - 199, 22 Wind Speed/Direction... + + 139, 22 + + + Wind Rose... + False @@ -1490,12 +1607,6 @@ 196, 6 - - 212, 22 - - - Describe - 246, 22 @@ -1523,12 +1634,6 @@ Crops... - - 212, 22 - - - PICSA - 231, 22 @@ -1541,69 +1646,6 @@ Export to CM SAF R Toolbox... - - 212, 22 - - - CM SAF - - - 180, 22 - - - Calculation... - - - 180, 22 - - - Summary... - - - 177, 6 - - - 180, 22 - - - Correlations... - - - 180, 22 - - - Scatterplot... - - - 180, 22 - - - Time Series Plot... - - - 180, 22 - - - Seasonal Plot... - - - 180, 22 - - - Density Plot... - - - 212, 22 - - - Compare - - - 212, 22 - - - Mapping... - 180, 22 @@ -1625,15 +1667,6 @@ Markov Modelling... - - 212, 22 - - - Model - - - 209, 6 - 246, 22 @@ -1673,11 +1706,11 @@ Cumulative/Exceedance Graph... - - 212, 22 + + 199, 22 - - Seasonal Forecast Support + + Data Manipulation False @@ -1814,11 +1847,11 @@ Output for CDT... - + 199, 22 - - Data Manipulation + + Graphics False @@ -1937,12 +1970,6 @@ Three Summaries... - - 199, 22 - - - Graphics - False @@ -1952,6 +1979,12 @@ Model... + + 199, 22 + + + Additional + False @@ -1997,12 +2030,6 @@ Water Balance... - - 199, 22 - - - Additional - False @@ -2012,21 +2039,6 @@ Create Climate Object... - - 212, 22 - - - Climate Methods - - - False - - - 63, 20 - - - Climatic - Ctrl+S @@ -2037,6 +2049,12 @@ Save... + + 232, 22 + + + Save As + 164, 22 @@ -2061,12 +2079,6 @@ Save Script As... - - 232, 22 - - - Save As - False @@ -2097,6 +2109,12 @@ Exit + + 39, 20 + + + Edit + False @@ -2178,14 +2196,8 @@ 183, 22 - - Select All - - - 39, 20 - - - Edit + + Select All 775, 56 @@ -2193,12 +2205,6 @@ 946, 56 - - 119, 17 - - - No worksheet loaded - 0, 460 @@ -2223,9 +2229,42 @@ 1 + + 119, 17 + + + No worksheet loaded + 17, 95 + + 0, 24 + + + No + + + 834, 37 + + + 7 + + + Tool + + + Tool_strip + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + Magenta @@ -2289,18 +2328,6 @@ Edit Last Dialog - - 57, 6 - - - False - - - 57, 6 - - - False - Magenta @@ -2310,17 +2337,17 @@ Last 10 Dialogs - - 128, 22 + + 57, 6 - - R Viewer... + + False - - 128, 22 + + 57, 6 - - Plotly... + + False @@ -2360,6 +2387,18 @@ View Last Graph + + 128, 22 + + + R Viewer... + + + 128, 22 + + + Plotly... + 6, 37 @@ -2381,18 +2420,6 @@ Output Window - - 196, 22 - - - Column Metadata... - - - 196, 22 - - - Data Frame Metadata... - iVBORw0KGgoAAAANSUhEUgAAAG8AAABvCAYAAADixZ5gAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -2449,17 +2476,17 @@ Column Metadata - - 160, 22 + + 196, 22 - - Log Window... + + Column Metadata... - - 160, 22 + + 196, 22 - - Script Window... + + Data Frame Metadata... @@ -2589,6 +2616,18 @@ Log Window + + 160, 22 + + + Log Window... + + + 160, 22 + + + Script Window... + Magenta @@ -2610,38 +2649,71 @@ He&lp - - 0, 24 + + 122, 95 + + + On - - No + + 37, 20 - - 834, 37 + + File - - 7 + + 59, 20 - - Tool + + Prepare - - Tool_strip + + 74, 20 - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Structured - - $this + + 88, 20 - - 2 + + Procurement - - 122, 95 - - - On + + 122, 20 + + + Options by Context + + + 46, 20 + + + Tools + + + 0, 0 + + + 834, 24 + + + 6 + + + Menu_strip + + + mnuBar + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 Ctrl+N @@ -2715,6 +2787,12 @@ 229, 6 + + 232, 22 + + + Export + 204, 22 @@ -2739,12 +2817,6 @@ Export Graph As Image... - - 232, 22 - - - Export - 232, 22 @@ -2754,11 +2826,11 @@ 229, 6 - - 37, 20 + + 180, 22 - - File + + Data Frame 200, 22 @@ -2868,11 +2940,11 @@ Colour by Property... - + 180, 22 - - Data Frame + + Check Data 245, 22 @@ -2967,12 +3039,6 @@ Anonymise ID Column... - - 180, 22 - - - Check Data - 177, 6 @@ -2982,6 +3048,12 @@ Calculator... + + 180, 22 + + + Column: Calculate + 179, 22 @@ -3036,11 +3108,11 @@ Permute Columns... - + 180, 22 - - Column: Calculate + + Column: Factor 179, 22 @@ -3129,11 +3201,11 @@ Factor Data Frame... - + 180, 22 - - Column: Factor + + Column: Text 152, 22 @@ -3174,11 +3246,11 @@ Distance... - + 180, 22 - - Column: Text + + Column: Date 162, 22 @@ -3222,11 +3294,11 @@ Use Time... - + 180, 22 - - Column: Date + + Column: Define 176, 22 @@ -3243,15 +3315,15 @@ Circular... - - 180, 22 - - - Column: Define - 177, 6 + + 180, 22 + + + Data Reshape + 193, 22 @@ -3312,15 +3384,15 @@ Transpose... - - 180, 22 - - - Data Reshape - 177, 6 + + 180, 22 + + + Keys and Links + 207, 22 @@ -3351,11 +3423,11 @@ Add Comment... - + 180, 22 - - Keys and Links + + Data Object False @@ -3435,11 +3507,11 @@ Delete Metadata... - + 180, 22 - - Data Object + + R Objects 126, 22 @@ -3465,32 +3537,26 @@ Delete... - - 180, 22 - - - R Objects - - - 59, 20 - - - Prepare - 183, 6 + + 186, 22 + + + Circular + 117, 22 Define... - + 186, 22 - - Circular + + Low_Flow 117, 22 @@ -3498,11 +3564,11 @@ Define... - + 186, 22 - - Low_Flow + + Survival 117, 22 @@ -3510,11 +3576,11 @@ Define... - + 186, 22 - - Survival + + Time Series 119, 22 @@ -3525,6 +3591,12 @@ 116, 6 + + 119, 22 + + + Describe + 149, 22 @@ -3537,15 +3609,15 @@ General... - - 119, 22 - - - Describe - 116, 6 + + 119, 22 + + + Model + 149, 22 @@ -3558,21 +3630,9 @@ General... - - 119, 22 - - - Model - 116, 6 - - 186, 22 - - - Time Series - 183, 6 @@ -3594,12 +3654,6 @@ Options by Context... - - 74, 20 - - - Structured - 216, 22 @@ -3612,6 +3666,12 @@ Define Procurement Data... + + 216, 22 + + + Prepare + 358, 22 @@ -3666,11 +3726,11 @@ Merge Additional Data... - + 216, 22 - - Prepare + + Describe 211, 22 @@ -3687,6 +3747,12 @@ 208, 6 + + 211, 22 + + + Categorical + 319, 22 @@ -3726,11 +3792,11 @@ Display Top N... - + 211, 22 - - Categorical + + Numeric 258, 22 @@ -3753,17 +3819,11 @@ Correlations (Red Flags or others)... - - 211, 22 - - - Numeric - - + 216, 22 - - Describe + + Mapping 189, 22 @@ -3771,11 +3831,11 @@ Map Country Values... - + 216, 22 - - Mapping + + Model 292, 22 @@ -3789,12 +3849,6 @@ Fit Model... - - 216, 22 - - - Model - 213, 6 @@ -3804,6 +3858,12 @@ Define Red Flag Variables... + + 216, 22 + + + Corruption Risk Index + 278, 22 @@ -3816,17 +3876,11 @@ Summarise CRI by Country (or other)... - - 216, 22 - - - Corruption Risk Index - - - 88, 20 + + 250, 22 - - Procurement + + Check Data 215, 22 @@ -3861,18 +3915,18 @@ One Variable Frequencies... - - 250, 22 - - - Check Data - 250, 22 Define Options by Context Data... + + 250, 22 + + + Prepare + 282, 22 @@ -3900,11 +3954,11 @@ Unstack... - + 250, 22 - - Prepare + + Describe 224, 22 @@ -3927,11 +3981,11 @@ Boxplot... - + 250, 22 - - Describe + + Model 176, 22 @@ -3945,18 +3999,6 @@ General Fit Model... - - 250, 22 - - - Model - - - 122, 20 - - - Options by Context - False @@ -4023,36 +4065,6 @@ Options... - - 46, 20 - - - Tools - - - 0, 0 - - - 834, 24 - - - 6 - - - Menu_strip - - - mnuBar - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - 126, 22 @@ -9759,6 +9771,18 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuClimaticCompareConditionalQuantiles + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareTaylorDiagram + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain diff --git a/instat/frmMain.vb b/instat/frmMain.vb index fcd582884be..6ef1f0c1f39 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2158,4 +2158,8 @@ Public Class frmMain Private Sub mnuPrepareCheckDataVisualiseData_Click(sender As Object, e As EventArgs) Handles mnuPrepareCheckDataVisualiseData.Click dlgVisualizeData.ShowDialog() End Sub + + Private Sub mnuClimaticCompareCalculation_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareCalculation.Click + dlgCompare.ShowDialog() + End Sub End Class \ No newline at end of file From 8c44e9f6ddfb308e8c4e2bdd6ced340feced93eb Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:53:13 +0300 Subject: [PATCH 085/277] Shwing the dialogs --- instat/frmMain.Designer.vb | 164 ++++----- instat/frmMain.resx | 677 +++++++++++++++++-------------------- instat/frmMain.vb | 20 +- 3 files changed, 392 insertions(+), 469 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index f601d9b0f10..302a164c4c8 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -232,10 +232,6 @@ Partial Class frmMain Me.mnuClimaticPrepareSpells = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPrepareExtremes = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator64 = New System.Windows.Forms.ToolStripSeparator() - Me.mnuClimaticPrepareCompareCalculation = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticPrepareCompareSummary = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticPrepareCompareTaylor = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator46 = New System.Windows.Forms.ToolStripSeparator() Me.mnuClimaticPrepareClimdex = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticPrepareSPI = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator51 = New System.Windows.Forms.ToolStripSeparator() @@ -265,6 +261,17 @@ Partial Class frmMain Me.mnuCMSAF = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCMSAFPlotRegion = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticCMSAFExporttoCMSAFRToolbox = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompare = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareCalculation = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareSummary = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator66 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuClimaticCompareCorrelations = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareScatterplot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareTimeSeriesPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareSeasonalPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareDensityPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareConditionalQuantiles = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticCompareTaylorDiagram = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticMapping = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticModel = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticModelsExtremes = New System.Windows.Forms.ToolStripMenuItem() @@ -622,17 +629,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.mnuClimaticCompare = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticCompareCalculation = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticCompareSummary = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator66 = New System.Windows.Forms.ToolStripSeparator() - Me.mnuClimaticCompareCorrelations = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticCompareScatterplot = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticCompareTimeSeriesPlot = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticCompareSeasonalPlot = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticCompareDensityPlot = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticCompareConditionalQuantiles = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticCompareTaylorDiagram = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -1654,7 +1650,7 @@ Partial Class frmMain ' 'mnuClimaticPrepare ' - Me.mnuClimaticPrepare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuCimaticPrepareTransform, Me.mnuClimaticPrepareConversions, Me.ToolStripSeparator37, Me.mnuClimaticPrepareClimaticSummaries, Me.mnuClimaticPrepareStartoftheRains, Me.mnuClimaticPrepareEndOfRains, Me.mnuClimaticPrepareLengthOfSeason, Me.mnuClimaticPrepareSpells, Me.mnuClimaticPrepareExtremes, Me.ToolStripSeparator64, Me.mnuClimaticPrepareCompareCalculation, Me.mnuClimaticPrepareCompareSummary, Me.mnuClimaticPrepareCompareTaylor, Me.ToolStripSeparator46, Me.mnuClimaticPrepareClimdex, Me.mnuClimaticPrepareSPI, Me.ToolStripSeparator51, Me.mnuClimaticPrepareEvapotranspiration, Me.mnuClimaticPrepareSummary, Me.mnuClimaticPrepareNewWorksheet, Me.mnuClimaticPrepareImportDailyData, Me.mnuClimaticPrepareMakeFactor, Me.mnuClimaticPrepareShiftDailyData, Me.mnuClimaticPrepareUnstackDailyData, Me.mnuClimaticPrepareStackDailyData}) + Me.mnuClimaticPrepare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuCimaticPrepareTransform, Me.mnuClimaticPrepareConversions, Me.ToolStripSeparator37, Me.mnuClimaticPrepareClimaticSummaries, Me.mnuClimaticPrepareStartoftheRains, Me.mnuClimaticPrepareEndOfRains, Me.mnuClimaticPrepareLengthOfSeason, Me.mnuClimaticPrepareSpells, Me.mnuClimaticPrepareExtremes, Me.ToolStripSeparator64, Me.mnuClimaticPrepareClimdex, Me.mnuClimaticPrepareSPI, Me.ToolStripSeparator51, Me.mnuClimaticPrepareEvapotranspiration, Me.mnuClimaticPrepareSummary, Me.mnuClimaticPrepareNewWorksheet, Me.mnuClimaticPrepareImportDailyData, Me.mnuClimaticPrepareMakeFactor, Me.mnuClimaticPrepareShiftDailyData, Me.mnuClimaticPrepareUnstackDailyData, Me.mnuClimaticPrepareStackDailyData}) Me.mnuClimaticPrepare.Name = "mnuClimaticPrepare" resources.ApplyResources(Me.mnuClimaticPrepare, "mnuClimaticPrepare") Me.mnuClimaticPrepare.Tag = "Prepare" @@ -1709,26 +1705,6 @@ Partial Class frmMain Me.ToolStripSeparator64.Name = "ToolStripSeparator64" resources.ApplyResources(Me.ToolStripSeparator64, "ToolStripSeparator64") ' - 'mnuClimaticPrepareCompareCalculation - ' - Me.mnuClimaticPrepareCompareCalculation.Name = "mnuClimaticPrepareCompareCalculation" - resources.ApplyResources(Me.mnuClimaticPrepareCompareCalculation, "mnuClimaticPrepareCompareCalculation") - ' - 'mnuClimaticPrepareCompareSummary - ' - Me.mnuClimaticPrepareCompareSummary.Name = "mnuClimaticPrepareCompareSummary" - resources.ApplyResources(Me.mnuClimaticPrepareCompareSummary, "mnuClimaticPrepareCompareSummary") - ' - 'mnuClimaticPrepareCompareTaylor - ' - Me.mnuClimaticPrepareCompareTaylor.Name = "mnuClimaticPrepareCompareTaylor" - resources.ApplyResources(Me.mnuClimaticPrepareCompareTaylor, "mnuClimaticPrepareCompareTaylor") - ' - 'ToolStripSeparator46 - ' - Me.ToolStripSeparator46.Name = "ToolStripSeparator46" - resources.ApplyResources(Me.ToolStripSeparator46, "ToolStripSeparator46") - ' 'mnuClimaticPrepareClimdex ' Me.mnuClimaticPrepareClimdex.Name = "mnuClimaticPrepareClimdex" @@ -1884,6 +1860,62 @@ Partial Class frmMain Me.mnuClimaticCMSAFExporttoCMSAFRToolbox.Name = "mnuClimaticCMSAFExporttoCMSAFRToolbox" resources.ApplyResources(Me.mnuClimaticCMSAFExporttoCMSAFRToolbox, "mnuClimaticCMSAFExporttoCMSAFRToolbox") ' + 'mnuClimaticCompare + ' + Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations, Me.mnuClimaticCompareScatterplot, Me.mnuClimaticCompareTimeSeriesPlot, Me.mnuClimaticCompareSeasonalPlot, Me.mnuClimaticCompareDensityPlot, Me.mnuClimaticCompareConditionalQuantiles, Me.mnuClimaticCompareTaylorDiagram}) + Me.mnuClimaticCompare.Name = "mnuClimaticCompare" + resources.ApplyResources(Me.mnuClimaticCompare, "mnuClimaticCompare") + ' + 'mnuClimaticCompareCalculation + ' + Me.mnuClimaticCompareCalculation.Name = "mnuClimaticCompareCalculation" + resources.ApplyResources(Me.mnuClimaticCompareCalculation, "mnuClimaticCompareCalculation") + ' + 'mnuClimaticCompareSummary + ' + Me.mnuClimaticCompareSummary.Name = "mnuClimaticCompareSummary" + resources.ApplyResources(Me.mnuClimaticCompareSummary, "mnuClimaticCompareSummary") + ' + 'ToolStripSeparator66 + ' + Me.ToolStripSeparator66.Name = "ToolStripSeparator66" + resources.ApplyResources(Me.ToolStripSeparator66, "ToolStripSeparator66") + ' + 'mnuClimaticCompareCorrelations + ' + Me.mnuClimaticCompareCorrelations.Name = "mnuClimaticCompareCorrelations" + resources.ApplyResources(Me.mnuClimaticCompareCorrelations, "mnuClimaticCompareCorrelations") + ' + 'mnuClimaticCompareScatterplot + ' + Me.mnuClimaticCompareScatterplot.Name = "mnuClimaticCompareScatterplot" + resources.ApplyResources(Me.mnuClimaticCompareScatterplot, "mnuClimaticCompareScatterplot") + ' + 'mnuClimaticCompareTimeSeriesPlot + ' + Me.mnuClimaticCompareTimeSeriesPlot.Name = "mnuClimaticCompareTimeSeriesPlot" + resources.ApplyResources(Me.mnuClimaticCompareTimeSeriesPlot, "mnuClimaticCompareTimeSeriesPlot") + ' + 'mnuClimaticCompareSeasonalPlot + ' + Me.mnuClimaticCompareSeasonalPlot.Name = "mnuClimaticCompareSeasonalPlot" + resources.ApplyResources(Me.mnuClimaticCompareSeasonalPlot, "mnuClimaticCompareSeasonalPlot") + ' + 'mnuClimaticCompareDensityPlot + ' + Me.mnuClimaticCompareDensityPlot.Name = "mnuClimaticCompareDensityPlot" + resources.ApplyResources(Me.mnuClimaticCompareDensityPlot, "mnuClimaticCompareDensityPlot") + ' + 'mnuClimaticCompareConditionalQuantiles + ' + Me.mnuClimaticCompareConditionalQuantiles.Name = "mnuClimaticCompareConditionalQuantiles" + resources.ApplyResources(Me.mnuClimaticCompareConditionalQuantiles, "mnuClimaticCompareConditionalQuantiles") + ' + 'mnuClimaticCompareTaylorDiagram + ' + Me.mnuClimaticCompareTaylorDiagram.Name = "mnuClimaticCompareTaylorDiagram" + resources.ApplyResources(Me.mnuClimaticCompareTaylorDiagram, "mnuClimaticCompareTaylorDiagram") + ' 'mnuClimaticMapping ' Me.mnuClimaticMapping.Name = "mnuClimaticMapping" @@ -3958,62 +3990,6 @@ Partial Class frmMain Me.mnuLogFile.Name = "mnuLogFile" resources.ApplyResources(Me.mnuLogFile, "mnuLogFile") ' - 'mnuClimaticCompare - ' - Me.mnuClimaticCompare.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCompareCalculation, Me.mnuClimaticCompareSummary, Me.ToolStripSeparator66, Me.mnuClimaticCompareCorrelations, Me.mnuClimaticCompareScatterplot, Me.mnuClimaticCompareTimeSeriesPlot, Me.mnuClimaticCompareSeasonalPlot, Me.mnuClimaticCompareDensityPlot, Me.mnuClimaticCompareConditionalQuantiles, Me.mnuClimaticCompareTaylorDiagram}) - Me.mnuClimaticCompare.Name = "mnuClimaticCompare" - resources.ApplyResources(Me.mnuClimaticCompare, "mnuClimaticCompare") - ' - 'mnuClimaticCompareCalculation - ' - Me.mnuClimaticCompareCalculation.Name = "mnuClimaticCompareCalculation" - resources.ApplyResources(Me.mnuClimaticCompareCalculation, "mnuClimaticCompareCalculation") - ' - 'mnuClimaticCompareSummary - ' - Me.mnuClimaticCompareSummary.Name = "mnuClimaticCompareSummary" - resources.ApplyResources(Me.mnuClimaticCompareSummary, "mnuClimaticCompareSummary") - ' - 'ToolStripSeparator66 - ' - Me.ToolStripSeparator66.Name = "ToolStripSeparator66" - resources.ApplyResources(Me.ToolStripSeparator66, "ToolStripSeparator66") - ' - 'mnuClimaticCompareCorrelations - ' - Me.mnuClimaticCompareCorrelations.Name = "mnuClimaticCompareCorrelations" - resources.ApplyResources(Me.mnuClimaticCompareCorrelations, "mnuClimaticCompareCorrelations") - ' - 'mnuClimaticCompareScatterplot - ' - Me.mnuClimaticCompareScatterplot.Name = "mnuClimaticCompareScatterplot" - resources.ApplyResources(Me.mnuClimaticCompareScatterplot, "mnuClimaticCompareScatterplot") - ' - 'mnuClimaticCompareTimeSeriesPlot - ' - Me.mnuClimaticCompareTimeSeriesPlot.Name = "mnuClimaticCompareTimeSeriesPlot" - resources.ApplyResources(Me.mnuClimaticCompareTimeSeriesPlot, "mnuClimaticCompareTimeSeriesPlot") - ' - 'mnuClimaticCompareSeasonalPlot - ' - Me.mnuClimaticCompareSeasonalPlot.Name = "mnuClimaticCompareSeasonalPlot" - resources.ApplyResources(Me.mnuClimaticCompareSeasonalPlot, "mnuClimaticCompareSeasonalPlot") - ' - 'mnuClimaticCompareDensityPlot - ' - Me.mnuClimaticCompareDensityPlot.Name = "mnuClimaticCompareDensityPlot" - resources.ApplyResources(Me.mnuClimaticCompareDensityPlot, "mnuClimaticCompareDensityPlot") - ' - 'mnuClimaticCompareConditionalQuantiles - ' - Me.mnuClimaticCompareConditionalQuantiles.Name = "mnuClimaticCompareConditionalQuantiles" - resources.ApplyResources(Me.mnuClimaticCompareConditionalQuantiles, "mnuClimaticCompareConditionalQuantiles") - ' - 'mnuClimaticCompareTaylorDiagram - ' - Me.mnuClimaticCompareTaylorDiagram.Name = "mnuClimaticCompareTaylorDiagram" - resources.ApplyResources(Me.mnuClimaticCompareTaylorDiagram, "mnuClimaticCompareTaylorDiagram") - ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4489,7 +4465,6 @@ Partial Class frmMain Friend WithEvents mnuFileImportandTidyNetCDFFile As ToolStripMenuItem Friend WithEvents mnuDescribeSpecificMosaic As ToolStripMenuItem Friend WithEvents mnuDescribeSpecificParallelCoordinatePlot As ToolStripMenuItem - Friend WithEvents ToolStripSeparator46 As ToolStripSeparator Friend WithEvents mnuClimaticPrepareEvapotranspiration As ToolStripMenuItem Friend WithEvents mnuPrepareCheckDataCompareColumns As ToolStripMenuItem Friend WithEvents mnuOptionsByContext As ToolStripMenuItem @@ -4525,7 +4500,6 @@ Partial Class frmMain Friend WithEvents mnuClimaticTidyandExamineOneVariableSummarize As ToolStripMenuItem Friend WithEvents ToolStripSeparator50 As ToolStripSeparator Friend WithEvents mnuClimaticPrepareLengthOfSeason As ToolStripMenuItem - Friend WithEvents mnuClimaticPrepareCompareSummary As ToolStripMenuItem Friend WithEvents mnuClimaticFileOpenandTidyShapefile As ToolStripMenuItem Friend WithEvents mnuClimaticTidyandExamineMerge As ToolStripMenuItem Friend WithEvents mnuClimaticCMSAFExporttoCMSAFRToolbox As ToolStripMenuItem @@ -4636,9 +4610,7 @@ Partial Class frmMain Friend WithEvents mnuStructuredClimatic As ToolStripMenuItem Friend WithEvents mnuStructuredProcurement As ToolStripMenuItem Friend WithEvents mnuStructuredOptionByContext As ToolStripMenuItem - Friend WithEvents mnuClimaticPrepareCompareCalculation As ToolStripMenuItem Friend WithEvents ToolStripSeparator64 As ToolStripSeparator - Friend WithEvents mnuClimaticPrepareCompareTaylor As ToolStripMenuItem Friend WithEvents mnuClimaticCheckDataFillMissingValues As ToolStripMenuItem Friend WithEvents ToolStripSeparator65 As ToolStripSeparator Friend WithEvents mnuPrepareCheckDataVisualiseData As ToolStripMenuItem diff --git a/instat/frmMain.resx b/instat/frmMain.resx index ffb240ef31f..4f3725329d9 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -131,7 +131,7 @@ One Variable - 146, 22 + 180, 22 Summarise... @@ -1034,89 +1034,191 @@ Check Data - - 212, 22 + + 189, 22 - - Prepare + + Transform... - - 209, 6 + + 189, 22 - - 212, 22 + + Conversions... - - Describe + + 186, 6 - - 212, 22 + + 189, 22 - - PICSA + + Climatic Summaries... - - 212, 22 + + 189, 22 - - CM SAF + + Start of the Rains... - - 198, 22 + + 189, 22 - - Calculation... + + End of Rains... - - 198, 22 + + 189, 22 - + + Length of Season... + + + 189, 22 + + + Spells... + + + 189, 22 + + + Extremes... + + + 186, 6 + + + 189, 22 + + + Climdex... + + + 189, 22 + + + SPI... + + + 186, 6 + + + 189, 22 + + + Evapotranspiration... + + + False + + + 189, 22 + + Summary... - - 195, 6 + + False - - 198, 22 + + False - - Correlations... + + 189, 22 - - 198, 22 + + New Worksheet... - - Scatterplot... + + False - - 198, 22 + + False - - Time Series Plot... + + 189, 22 - - 198, 22 + + Import daily Data... - - Seasonal Plot... + + False - - 198, 22 + + False - - Density Plot... + + 189, 22 - - 198, 22 + + Make Factor... - - Conditional Quantiles... + + False - - 198, 22 + + False - - Taylor Diagram... + + 189, 22 + + + Shift Daily Data... + + + False + + + False + + + 189, 22 + + + Unstack Daily Data... + + + False + + + False + + + 189, 22 + + + Stack Daily data... + + + False + + + 212, 22 + + + Prepare + + + 209, 6 + + + 212, 22 + + + Describe + + + 212, 22 + + + PICSA + + + 212, 22 + + + CM SAF 212, 22 @@ -1329,229 +1431,49 @@ Use Time... - 180, 22 + 178, 22 Inventory... - 180, 22 + 178, 22 Fill Missing Values... - 177, 6 + 175, 6 - 180, 22 + 178, 22 Display Daily... - - 180, 22 - - - Boxplot... - - - 180, 22 - - - QC Temperatures... - - - 180, 22 - - - QC Rainfall... - - - 180, 22 - - - Homogenization... - - - 198, 22 - - - Transform... - - - 198, 22 - - - Conversions... - - - 195, 6 - - - 198, 22 - - - Climatic Summaries... - - - 198, 22 - - - Start of the Rains... - - - 198, 22 - - - End of Rains... - - - 198, 22 - - - Length of Season... - - - 198, 22 - - - Spells... - - - 198, 22 - - - Extremes... - - - 195, 6 - - - 198, 22 - - - Compare: Calculation... - - - 198, 22 - - - Compare: Summary... - - - 198, 22 - - - Compare: Taylor... - - - 195, 6 - - - 198, 22 - - - Climdex... - - - 198, 22 - - - SPI... - - - 195, 6 - - - 198, 22 - - - Evapotranspiration... - - - False - - - 198, 22 - - - Summary... - - - False - - - False - - - 198, 22 - - - New Worksheet... - - - False - - - False - - - 198, 22 - - - Import daily Data... - - - False - - - False - - - 198, 22 - - - Make Factor... - - - False - - - False - - - 198, 22 - - - Shift Daily Data... - - - False - - - False + + 178, 22 - - 198, 22 + + Boxplot... - - Unstack Daily Data... + + 178, 22 - - False + + QC Temperatures... - - False + + 178, 22 - - 198, 22 + + QC Rainfall... - - Stack Daily data... + + 178, 22 - - False + + Homogenization... False @@ -1646,6 +1568,63 @@ Export to CM SAF R Toolbox... + + 198, 22 + + + Calculation... + + + 198, 22 + + + Summary... + + + 195, 6 + + + 198, 22 + + + Correlations... + + + 198, 22 + + + Scatterplot... + + + 198, 22 + + + Time Series Plot... + + + 198, 22 + + + Seasonal Plot... + + + 198, 22 + + + Density Plot... + + + 198, 22 + + + Conditional Quantiles... + + + 198, 22 + + + Taylor Diagram... + 180, 22 @@ -2827,7 +2806,7 @@ 229, 6 - 180, 22 + 172, 22 Data Frame @@ -2941,7 +2920,7 @@ Colour by Property... - 180, 22 + 172, 22 Check Data @@ -3040,16 +3019,16 @@ Anonymise ID Column... - 177, 6 + 169, 6 - 180, 22 + 172, 22 Calculator... - 180, 22 + 172, 22 Column: Calculate @@ -3109,7 +3088,7 @@ Permute Columns... - 180, 22 + 172, 22 Column: Factor @@ -3202,7 +3181,7 @@ Factor Data Frame... - 180, 22 + 172, 22 Column: Text @@ -3247,7 +3226,7 @@ Distance... - 180, 22 + 172, 22 Column: Date @@ -3295,7 +3274,7 @@ Use Time... - 180, 22 + 172, 22 Column: Define @@ -3316,10 +3295,10 @@ Circular... - 177, 6 + 169, 6 - 180, 22 + 172, 22 Data Reshape @@ -3385,10 +3364,10 @@ Transpose... - 177, 6 + 169, 6 - 180, 22 + 172, 22 Keys and Links @@ -3424,7 +3403,7 @@ Add Comment... - 180, 22 + 172, 22 Data Object @@ -3508,7 +3487,7 @@ Delete Metadata... - 180, 22 + 172, 22 R Objects @@ -7461,30 +7440,6 @@ System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - mnuClimaticPrepareCompareCalculation - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticPrepareCompareSummary - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticPrepareCompareTaylor - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ToolStripSeparator46 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - mnuClimaticPrepareClimdex @@ -7659,6 +7614,72 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuClimaticCompare + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareCalculation + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareSummary + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ToolStripSeparator66 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareCorrelations + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareScatterplot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareTimeSeriesPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareSeasonalPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareDensityPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareConditionalQuantiles + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuClimaticCompareTaylorDiagram + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + mnuClimaticMapping @@ -9717,72 +9738,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - mnuClimaticCompare - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareCalculation - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareSummary - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ToolStripSeparator66 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareCorrelations - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareScatterplot - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareTimeSeriesPlot - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareSeasonalPlot - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareDensityPlot - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareConditionalQuantiles - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuClimaticCompareTaylorDiagram - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - frmMain diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 6ef1f0c1f39..154d9f2dfa1 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2131,22 +2131,10 @@ Public Class frmMain dlgHomogenization.ShowDialog() 'partially working now End Sub - Private Sub mnuClimaticPrepareCompareCalculation_Click(sender As Object, e As EventArgs) Handles mnuClimaticPrepareCompareCalculation.Click - dlgCompare.ShowDialog() - End Sub - - Private Sub mnuClimaticPrepareCompareSummary_Click(sender As Object, e As EventArgs) Handles mnuClimaticPrepareCompareSummary.Click - dlgCompareSummary.ShowDialog() - End Sub - Private Sub mnuStructuredCircularDefine_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularDefine.Click dlgCircular.ShowDialog() End Sub - Private Sub mnuClimaticPrepareCompareTaylor_Click(sender As Object, e As EventArgs) Handles mnuClimaticPrepareCompareTaylor.Click - dlgTaylorDiagram.ShowDialog() - End Sub - Private Sub mnuClimaticCheckDataFillMissingValues_Click(sender As Object, e As EventArgs) Handles mnuClimaticCheckDataFillMissingValues.Click dlgInfillMissingValues.ShowDialog() End Sub @@ -2162,4 +2150,12 @@ Public Class frmMain Private Sub mnuClimaticCompareCalculation_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareCalculation.Click dlgCompare.ShowDialog() End Sub + + Private Sub mnuClimaticCompareSummary_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareSummary.Click + dlgCompareSummary.ShowDialog() + End Sub + + Private Sub mnuClimaticCompareTaylorDiagram_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareTaylorDiagram.Click + dlgTaylorDiagram.ShowDialog() + End Sub End Class \ No newline at end of file From ae585d926a07d605119d06912ef8f1c11e6ba9f2 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:58:16 +0300 Subject: [PATCH 086/277] Showing the dialogs --- instat/frmMain.resx | 428 ++++++++++++++++++++++---------------------- instat/frmMain.vb | 8 + 2 files changed, 222 insertions(+), 214 deletions(-) diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 4f3725329d9..1487e6bf72c 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -1034,191 +1034,89 @@ Check Data - - 189, 22 - - - Transform... - - - 189, 22 - - - Conversions... - - - 186, 6 - - - 189, 22 - - - Climatic Summaries... - - - 189, 22 - - - Start of the Rains... - - - 189, 22 - - - End of Rains... - - - 189, 22 - - - Length of Season... - - - 189, 22 - - - Spells... - - - 189, 22 + + 212, 22 - - Extremes... + + Prepare - - 186, 6 + + 209, 6 - - 189, 22 + + 212, 22 - - Climdex... + + Describe - - 189, 22 + + 212, 22 - - SPI... + + PICSA - - 186, 6 + + 212, 22 - - 189, 22 + + CM SAF - - Evapotranspiration... + + 198, 22 - - False + + Calculation... - - 189, 22 + + 198, 22 - + Summary... - - False - - - False - - - 189, 22 - - - New Worksheet... - - - False - - - False - - - 189, 22 - - - Import daily Data... - - - False - - - False - - - 189, 22 - - - Make Factor... - - - False - - - False - - - 189, 22 - - - Shift Daily Data... - - - False - - - False - - - 189, 22 - - - Unstack Daily Data... + + 195, 6 - - False + + 198, 22 - - False + + Correlations... - - 189, 22 + + 198, 22 - - Stack Daily data... + + Scatterplot... - - False + + 198, 22 - - 212, 22 + + Time Series Plot... - - Prepare + + 198, 22 - - 209, 6 + + Seasonal Plot... - - 212, 22 + + 198, 22 - - Describe + + Density Plot... - - 212, 22 + + 198, 22 - - PICSA + + Conditional Quantiles... - - 212, 22 + + 198, 22 - - CM SAF + + Taylor Diagram... 212, 22 @@ -1475,6 +1373,165 @@ Homogenization... + + 189, 22 + + + Transform... + + + 189, 22 + + + Conversions... + + + 186, 6 + + + 189, 22 + + + Climatic Summaries... + + + 189, 22 + + + Start of the Rains... + + + 189, 22 + + + End of Rains... + + + 189, 22 + + + Length of Season... + + + 189, 22 + + + Spells... + + + 189, 22 + + + Extremes... + + + 186, 6 + + + 189, 22 + + + Climdex... + + + 189, 22 + + + SPI... + + + 186, 6 + + + 189, 22 + + + Evapotranspiration... + + + False + + + 189, 22 + + + Summary... + + + False + + + False + + + 189, 22 + + + New Worksheet... + + + False + + + False + + + 189, 22 + + + Import daily Data... + + + False + + + False + + + 189, 22 + + + Make Factor... + + + False + + + False + + + 189, 22 + + + Shift Daily Data... + + + False + + + False + + + 189, 22 + + + Unstack Daily Data... + + + False + + + False + + + 189, 22 + + + Stack Daily data... + + + False + False @@ -1568,63 +1625,6 @@ Export to CM SAF R Toolbox... - - 198, 22 - - - Calculation... - - - 198, 22 - - - Summary... - - - 195, 6 - - - 198, 22 - - - Correlations... - - - 198, 22 - - - Scatterplot... - - - 198, 22 - - - Time Series Plot... - - - 198, 22 - - - Seasonal Plot... - - - 198, 22 - - - Density Plot... - - - 198, 22 - - - Conditional Quantiles... - - - 198, 22 - - - Taylor Diagram... - 180, 22 diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 154d9f2dfa1..e15a5184884 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2158,4 +2158,12 @@ Public Class frmMain Private Sub mnuClimaticCompareTaylorDiagram_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareTaylorDiagram.Click dlgTaylorDiagram.ShowDialog() End Sub + + Private Sub mnuClimaticCompareCorrelations_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareCorrelations.Click + dlgCorrelation.ShowDialog() + End Sub + + Private Sub mnuClimaticCompareScatterplot_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareScatterplot.Click + dlgScatterPlot.ShowDialog() + End Sub End Class \ No newline at end of file From a8131b5d3666161ecd11915df93176f4cb4e4c5f Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Sun, 30 Aug 2020 13:59:58 +0300 Subject: [PATCH 087/277] Showing a dialog --- instat/frmMain.vb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/instat/frmMain.vb b/instat/frmMain.vb index e15a5184884..39edda45570 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2166,4 +2166,8 @@ Public Class frmMain Private Sub mnuClimaticCompareScatterplot_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareScatterplot.Click dlgScatterPlot.ShowDialog() End Sub + + Private Sub mnuClimaticCompareDensityPlot_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareDensityPlot.Click + dlgHistogram.ShowDialog() + End Sub End Class \ No newline at end of file From 1e3e955c8414f0432e95faab79225a6da0a14f94 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Mon, 31 Aug 2020 14:19:34 +0300 Subject: [PATCH 088/277] modified import for loop and enhanced it --- instat/dlgImportDataset.vb | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/instat/dlgImportDataset.vb b/instat/dlgImportDataset.vb index c94da064d15..1ff57c07e6e 100644 --- a/instat/dlgImportDataset.vb +++ b/instat/dlgImportDataset.vb @@ -823,24 +823,16 @@ Public Class dlgImportDataset If chrSheets IsNot Nothing AndAlso chrSheets.Count > 0 Then clbSheets.Items.AddRange(chrSheets.ToArray()) 'if there were previously checked items then restore them - If lstCheckedItems.Count > 0 Then + For Each strSelected As String In lstCheckedItems For i As Integer = 0 To clbSheets.Items.Count - 1 - For Each strSelected As String In lstCheckedItems - If strSelected = clbSheets.Items(i).ToString Then - clbSheets.SetItemChecked(i, True) - End If - Next + If strSelected = clbSheets.Items(i).ToString Then + clbSheets.SetItemChecked(i, True) + 'sheet names are expected to be unique so exit inner for loop + Exit For + End If Next - End If + Next End If - - 'ucrInputNamedRegions.cboInput.Items.Clear() - 'If chrRegions IsNot Nothing AndAlso chrRegions.Count > 0 Then - ' For i = 0 To chrRegions.Count - 1 - ' ucrInputNamedRegions.cboInput.Items.Add(chrRegions(i)) - ' Next - 'End If - 'ucrInputNamedRegions.SetName("") End Sub Private Sub lblRowVector_Click(sender As Object, e As EventArgs) From f66a3f216f83798c94d1be997f441d256b1457a6 Mon Sep 17 00:00:00 2001 From: N-thony Date: Tue, 1 Sep 2020 10:17:13 +0200 Subject: [PATCH 089/277] Sort the comment warning message --- instat/ucrCore.vb | 3 --- 1 file changed, 3 deletions(-) diff --git a/instat/ucrCore.vb b/instat/ucrCore.vb index ca9371789e2..720b51fc362 100644 --- a/instat/ucrCore.vb +++ b/instat/ucrCore.vb @@ -997,9 +997,6 @@ Public Class ucrCore AddCondition(objControlState, clsTempCond) End Sub - - ''' Set visible a control. - ''' If true then set a control visible property. ''' ''' For each control (display) linked to this control, set the visibility to ''' If none of these linked controls is a group box then set From 01431b60bffc26e49a73aeb75443a759e64899f6 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 1 Sep 2020 12:14:52 +0300 Subject: [PATCH 090/277] Setting the location for the Base control --- instat/dlgCalculator.vb | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index cd4c950494c..367452b1e1a 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -24,12 +24,14 @@ Public Class dlgCalculator Public iHelpCalcID As Integer Private iBasicWidth As Integer Private iBaseY As Integer + Private iBaseHeight As Integer Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) If bFirstLoad Then InitialiseDialog() iBasicWidth = Me.Width + iBaseHeight = Me.Height iBaseY = ucrBase.Location.Y SetDefaults() bFirstLoad = False @@ -119,48 +121,46 @@ Public Class dlgCalculator Private Sub CalculationsOptions() Select Case ucrCalc.ucrInputCalOptions.GetText Case "Maths" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.38, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.38, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Logical and Symbols" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Summary" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.43, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.43, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Strings (Character Columns)" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.47, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.47, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Factor" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Probability" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.5, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.5, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Dates" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.3, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.3, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Transform" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.35, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.35, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) - Me.Size = New System.Drawing.Size(iBasicWidth * 1.35, Me.Height) Case "Circular" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.36, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.36, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Wakefield" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, Me.Height) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY + 50) - Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, Me.Height + 10) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, iBaseHeight * 1.2) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY * 1.2) Case "Modifier" - Me.Size = New Size(iBasicWidth * 1.39, Me.Height) + Me.Size = New Size(iBasicWidth * 1.39, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Symbols" - Me.Size = New Size(iBasicWidth * 2.56, Me.Height) + Me.Size = New Size(iBasicWidth * 2.56, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "hydroGOF" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.27, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.27, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case Else - Me.Size = New System.Drawing.Size(iBasicWidth, Me.Height) + Me.Size = New System.Drawing.Size(iBasicWidth, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) End Select End Sub From d1b5bc6da95966fc853333c30810533bb5a0b699 Mon Sep 17 00:00:00 2001 From: N-thony Date: Tue, 1 Sep 2020 11:18:20 +0200 Subject: [PATCH 091/277] Fixing the warning message in the comment --- instat/ucrCore.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/instat/ucrCore.vb b/instat/ucrCore.vb index 720b51fc362..083726486f4 100644 --- a/instat/ucrCore.vb +++ b/instat/ucrCore.vb @@ -996,14 +996,13 @@ Public Class ucrCore clsTempCond.SetRSyntaxContainsCode(bNewIsPositive:=bNewIsPositive) AddCondition(objControlState, clsTempCond) End Sub - ''' ''' For each control (display) linked to this control, set the visibility to ''' If none of these linked controls is a group box then set ''' 'Visible' to 'bVisible'. ''' ''' If true then make the linked controls visible, else make them - ''' not visible. ``` + ''' not visible. Public Sub SetVisible(bVisible As Boolean) 'TODO: check how this should behave with linked group boxes If Not SetLinkedDisplayControlVisibilityAndReturnContainsGroupBox(bVisible) Then From f1830ce681ab0c73da9cb114b8ea9845a21ca148 Mon Sep 17 00:00:00 2001 From: N-thony Date: Tue, 1 Sep 2020 11:36:16 +0200 Subject: [PATCH 092/277] Fixing warning message in the comment --- instat/ucrCore.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/ucrCore.vb b/instat/ucrCore.vb index 083726486f4..8c3a9c726b0 100644 --- a/instat/ucrCore.vb +++ b/instat/ucrCore.vb @@ -996,6 +996,7 @@ Public Class ucrCore clsTempCond.SetRSyntaxContainsCode(bNewIsPositive:=bNewIsPositive) AddCondition(objControlState, clsTempCond) End Sub + ''' ''' For each control (display) linked to this control, set the visibility to ''' If none of these linked controls is a group box then set From 0f373bf72729552be7cf1acfd3a79442c8ceb17f Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 1 Sep 2020 13:07:30 +0300 Subject: [PATCH 093/277] Setting the location of the ucrBase with respect to each keyboard option --- instat/dlgCalculator.vb | 8 ++++---- instat/ucrCalculator.vb | 26 ++++++++++++++------------ 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 367452b1e1a..c27eff966f6 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -130,8 +130,8 @@ Public Class dlgCalculator Me.Size = New System.Drawing.Size(iBasicWidth * 1.43, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Strings (Character Columns)" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.47, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.47, iBaseHeight * 1.13) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY * 1.13) Case "Factor" Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) @@ -148,8 +148,8 @@ Public Class dlgCalculator Me.Size = New System.Drawing.Size(iBasicWidth * 1.36, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) Case "Wakefield" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, iBaseHeight * 1.2) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY * 1.2) + Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, iBaseHeight * 1.18) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseY * 1.18) Case "Modifier" Me.Size = New Size(iBasicWidth * 1.39, iBaseHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) diff --git a/instat/ucrCalculator.vb b/instat/ucrCalculator.vb index 67ccc1e9ac1..b9b12f2855c 100644 --- a/instat/ucrCalculator.vb +++ b/instat/ucrCalculator.vb @@ -26,6 +26,7 @@ Public Class ucrCalculator Public bControlsInitialised As Boolean = False Public clsHelp As New RFunction Private iBasicWidth As Integer + Private iBaseHeight As Integer Public Sub New() @@ -35,6 +36,7 @@ Public Class ucrCalculator ' Add any initialization after the InitializeComponent() call. InitialiseControls() iBasicWidth = Me.Width + iBaseHeight = Me.Height End Sub Private Sub ucrCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load @@ -294,7 +296,7 @@ Public Class ucrCalculator grpSymbols.Visible = False grpHydroGOF.Visible = False iHelpCalcID = 126 - Me.Size = New Size(iBasicWidth * 1.38, Me.Height) + Me.Size = New Size(iBasicWidth * 1.38, iBaseHeight) Case "Logical and Symbols" grpDates.Visible = False grpSummary.Visible = False @@ -305,7 +307,7 @@ Public Class ucrCalculator grpFactor.Visible = False grpHydroGOF.Visible = False iHelpCalcID = 127 - Me.Size = New Size(iBasicWidth * 1.44, Me.Height) + Me.Size = New Size(iBasicWidth * 1.44, iBaseHeight) grpProbabilty.Visible = False grpTransform.Visible = False grpCircular.Visible = False @@ -319,7 +321,7 @@ Public Class ucrCalculator grpMaths.Visible = False grpBasic.Visible = True iHelpCalcID = 128 - Me.Size = New Size(iBasicWidth * 1.51, Me.Height) + Me.Size = New Size(iBasicWidth * 1.51, iBaseHeight) grpStrings.Visible = False grpFactor.Visible = False grpProbabilty.Visible = False @@ -345,7 +347,7 @@ Public Class ucrCalculator grpSymbols.Visible = True grpHydroGOF.Visible = False iHelpCalcID = 129 - Me.Size = New Size(iBasicWidth * 1.42, Me.Height) + Me.Size = New Size(iBasicWidth * 1.42, iBaseHeight) Case "Factor" grpFactor.Visible = True grpDates.Visible = False @@ -355,7 +357,7 @@ Public Class ucrCalculator grpBasic.Visible = True grpStrings.Visible = False iHelpCalcID = 127 - Me.Size = New Size(iBasicWidth * 1.44, Me.Height) + Me.Size = New Size(iBasicWidth * 1.44, iBaseHeight) grpProbabilty.Visible = False grpTransform.Visible = False grpCircular.Visible = False @@ -379,7 +381,7 @@ Public Class ucrCalculator grpSymbols.Visible = False grpHydroGOF.Visible = False iHelpCalcID = 120 - Me.Size = New Size(iBasicWidth * 1.57, Me.Height) + Me.Size = New Size(iBasicWidth * 1.57, iBaseHeight) Case "Dates" grpDates.Visible = True grpProbabilty.Visible = False @@ -396,7 +398,7 @@ Public Class ucrCalculator grpSymbols.Visible = False grpHydroGOF.Visible = False iHelpCalcID = 130 - Me.Size = New Size(iBasicWidth * 1.32, Me.Height) + Me.Size = New Size(iBasicWidth * 1.32, iBaseHeight) Case "Transform" grpDates.Visible = False grpProbabilty.Visible = False @@ -412,7 +414,7 @@ Public Class ucrCalculator grpModifier.Visible = False grpSymbols.Visible = False grpHydroGOF.Visible = False - Me.Size = New Size(iBasicWidth * 1.33, Me.Height) + Me.Size = New Size(iBasicWidth * 1.33, iBaseHeight) Case "Wakefield" grpDates.Visible = False grpProbabilty.Visible = False @@ -428,7 +430,7 @@ Public Class ucrCalculator grpSymbols.Visible = False grpModifier.Visible = False grpHydroGOF.Visible = False - Me.Size = New Size(iBasicWidth * 1.7, Me.Height * 1.07) + Me.Size = New Size(iBasicWidth * 1.7, iBaseHeight) Case "Circular" grpDates.Visible = False grpProbabilty.Visible = False @@ -444,7 +446,7 @@ Public Class ucrCalculator grpModifier.Visible = False grpSymbols.Visible = False grpHydroGOF.Visible = False - Me.Size = New Size(iBasicWidth * 1.39, Me.Height) + Me.Size = New Size(iBasicWidth * 1.39, iBaseHeight) Case "hydroGOF" grpDates.Visible = False grpProbabilty.Visible = False @@ -460,10 +462,10 @@ Public Class ucrCalculator grpCircular.Visible = False grpModifier.Visible = False grpSymbols.Visible = False - Me.Size = New Size(iBasicWidth * 1.27, Me.Height) + Me.Size = New Size(iBasicWidth * 1.27, iBaseHeight) Case Else grpDates.Visible = False - Me.Size = New Size(iBasicWidth, Me.Height) + Me.Size = New Size(iBasicWidth, iBaseHeight) grpProbabilty.Visible = False grpSummary.Visible = False grpBasic.Visible = True From fbd74a3bee6b71648417b8d14a6f13992d971058 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 1 Sep 2020 14:04:06 +0300 Subject: [PATCH 094/277] Setting ucrSave properly --- instat/dlgRegularSequence.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/dlgRegularSequence.vb b/instat/dlgRegularSequence.vb index 10d3d548dde..2b2418e4fff 100644 --- a/instat/dlgRegularSequence.vb +++ b/instat/dlgRegularSequence.vb @@ -188,7 +188,6 @@ Public Class dlgRegularSequence 'Set to base function so that control is set correctly 'After then set to nothing so that updating is done manually ucrNewColumnName.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrNewColumnName.SetRCode(Nothing, bReset:=False, bUpdate:=False) ucrPnlSequenceType.SetRCode(clsRepFunction, bReset) ucrInputFrom.SetRCode(clsSeqFunction, bReset) From 8543d6dc5f5b67f11ca66bab3062f94bbe9110db Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 2 Sep 2020 17:14:26 +0300 Subject: [PATCH 095/277] adding range, point, time and nc functions --- .../InstatObject/R/stand_alone_functions.R | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 7d26bbc0f53..0b0f7ba56c4 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1282,3 +1282,37 @@ summary_sample <- function(x, size, replace = FALSE){ else if(length(x)==1){return(x)} else{sample(x = x, size = size, replace = replace)} } + +add_xy_area_range <- function(path, min_lon, max_lon, min_lat, max_lat) { + paste0(path, "/X", "/", + "(", ifelse(min_lon < 0, paste0(abs(min_lon), "W"), paste0(min_lon, "E")), ")", "/", + "(", ifelse(max_lon < 0, paste0(abs(max_lon), "W"), paste0(max_lon, "E")), ")", "/", + "RANGEEDGES", "/", + "Y", "/", + "(", ifelse(min_lat < 0, paste0(abs(min_lat), "S"), paste0(min_lat, "N")), ")", "/", + "(", ifelse(max_lat < 0, paste0(abs(max_lat), "S"), paste0(max_lat, "N")), ")", "/", + "RANGEEDGES", "/") +} + +add_xy_point_range <- function(path, min_lon, min_lat) { + paste0(path, "/X", "/", + "(", ifelse(min_lon < 0, paste0(abs(min_lon), "W"), paste0(min_lon, "E")), ")", "/", + "VALUES", "/", + "Y", "/", + "(", ifelse(min_lat < 0, paste0(abs(min_lat), "S"), paste0(min_lat, "N")), ")", "/", + "VALUES", "/") +} + +add_t_range <- function(path, min_date, max_date) { + paste0(path, "T", "/", + "(", lubridate::day(min_date), "%20", lubridate::month(min_date, label = TRUE), + "%20", lubridate::year(min_date), ")", "/", + "(", lubridate::day(max_date), "%20", lubridate::month(max_date, label = TRUE), + "%20", lubridate::year(max_date), ")", "/", + "RANGEEDGES", "/" + ) +} + +add_nc <- function(path) { + paste0(path, "data.nc") +} From 2cb1d3c03942bf8942088c63002b6c0bad672795 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 2 Sep 2020 17:15:07 +0300 Subject: [PATCH 096/277] adding download_from_IRI method --- .../static/InstatObject/R/instat_object_R6.R | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index aa50fc516a3..024981711b7 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2086,4 +2086,66 @@ DataBook$set("public","package_check", function(package) { } } } +) + +DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ + init_URL <- "https://iridl.ldeo.columbia.edu/" + if(source == "CHIRPS_V2P0"){prexyaddress <- paste0(init_URL, "SOURCES/.UCSB/.CHIRPS/.v2p0") + if(data == "daily_0p05") {extension <- ".daily/.global/.0p05/.prcp"} + else if(data == "daily_0p25") {extension <- ".daily/.global/.0p25/.prcp"} + else if(data == "daily_improved_0p05") {extension <- ".daily-improved/.global/.0p05/.prcp"} + else if(data == "daily_improved_0p25") {extension <- ".daily-improved/.global/.0p25/.prcp"} + else if(data == "dekad") {extension <- ".dekad/.prcp"} + else if(data == "monthly_c8113") {extension <- ".monthly/.global/.c8113/.precipitation"} + else if(data == "monthly_deg1p0") {extension <- ".monthly/.global/.deg1p0/.precipitation"} + else if(data == "monthly_NMME_deg1p0") {extension <- ".monthly/.global/.NMME_deg1p0/.precipitation"} + else if(data == "monthly_prcp") {extension <- ".monthly/.global/.precipitation"} + else stop("Data file does not exist for CHIRPS V2P0 data") + #Annual and 2Monthly and 3monthly does not exist for CHIRPS_V2P0 + }else if(source == "TAMSAT") {prexyaddress <-paste0(init_URL, "home/.remic/.Reading/.Meteorology/.TAMSAT") + if(data == "rainfall_estimates") {extension <- ".TAMSAT-RFE/.rfe"} + else if(data == "reconstructed_rainfall_anomaly") {extension <- ".TAMSAT-RFE/.rfediff"} + else if(data == "sahel_dry_mask") {extension <- ".TAMSAT-RFE/.sahel_drymask"} + else if(data == "SPI_1_dekad") {extension <- ".TAMSAT-RFE/.SPI-rfe_1-dekad_Sahel"} + else stop("Data file does not exist for TAMSAT data") + #monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. + }else if(source == "NOAA_ARC2") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.FEWS/.Africa/.DAILY/.ARC2") + if(data == "daily_estimated_prcp") {extension <- ".daily/.est_prcp"} + else if(data == "monthly_average_estimated_prcp") {extension <- ".monthly/.est_prcp"} + else stop("Data file does not exist for NOAA ARC2 data") + }else if(source=="NOAA_RFE2") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.FEWS/.Africa") + if(data == "daily_estimated_prcp"){extension <- ".DAILY/.RFEv2/.est_prcp"} + else stop("Data file does not exist for NOAA RFE2 data") + }else if(source=="NOAA_CMORPH_DAILY" || source=="NOAA_CMORPH_3HOURLY" || source=="NOAA_CMORPH_DAILY_CALCULATED") { + if(source=="NOAA_CMORPH_DAILY") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.daily")} + else if(source == "NOAA_CMORPH_3HOURLY") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.3-hourly")} + if(source == "NOAA_CMORPH_DAILY_CALCULATED") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated")} + if(data == "mean_microwave_only_est_prcp") {extension <- ".mean/.microwave-only/.comb"} + else if(data == "mean_morphed_est_prcp") {extension <- ".mean/.morphed/.cmorph"} + if(data == "orignames_mean_microwave_only_est_prcp") {extension <- ".orignames/.mean/.microwave-only/.comb"} + else if(data == "orignames_mean_morphed_est_prcp") {extension <- ".orignames/.mean/.morphed/.cmorph"} + if(data == "renamed102015_mean_microwave_only_est_prcp") {extension <- ".renamed102015/.mean/.microwave-only/.comb"} + else if(data == "renamed102015_mean_morphed_est_prcp") {extension <- ".renamed102015/.mean/.morphed/.cmorph"} + else stop("Data file does not exist for NOAA CMORPH data") + }else if(source=="NASA_TRMM_3B42") {prexyaddress <- paste0(init_URL, "SOURCES/.NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") + if(data == "daily_estimated_prcp") {extension <- ".daily/.precipitation"} + else if(data == "3_hourly_estimated_prcp") {extension <- ".three-hourly/.precipitation"} + else if(data == "3_hourly_pre_gauge_adjusted_infrared_est_prcp") {extension <- ".three-hourly/.IRprecipitation"} + else if(data == "3_hourly_pre_gauge_adjusted_microwave_est_prcp") {extension <- ".three-hourly/.HQprecipitation"} + else stop("Data file does not exist for NASA TRMM 3B42 data") + }else{stop("Source not specified correctly.")} + prexyaddress <- paste(prexyaddress, extension, sep="/") + if(download_type == "area"){URL <- add_xy_area_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, max_lon = max_lon, max_lat = max_lat)} + else if(download_type == "point"){URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat)} + if(!missing(min_date)&!missing(max_date)){URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date)} + URL <- URL %>% add_nc() + file_name <- tempfile(name, tmpdir = path, fileext = ".nc") + result <- download.file(url = URL, destfile = file_name, method = "auto", mode = "wb", cacheOK = FALSE) + if(import & result == 0) { + nc <- ncdf4::nc_open(filename = file_name) + self$import_NetCDF(nc = nc, name = name) + ncdf4::nc_close(nc=nc) + }else if(result != 0){stop("No file downloaded please check your internet connection")} + if(missing(path)) {file.remove(file_name)} +} ) \ No newline at end of file From 0a9727f892aa0a171aa3d752306265d16e8fe258 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 2 Sep 2020 17:15:52 +0300 Subject: [PATCH 097/277] adding method to extract the current date --- instat/ucrDateTimePicker.vb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/instat/ucrDateTimePicker.vb b/instat/ucrDateTimePicker.vb index dd5a97ff9f5..467e3f8dad0 100644 --- a/instat/ucrDateTimePicker.vb +++ b/instat/ucrDateTimePicker.vb @@ -185,4 +185,12 @@ Public Class ucrDateTimePicker Public Function DateValue() As Date Return dtpDateTime.Value End Function + + Public Function CurrentDate(Optional bWithQuotes As Boolean = True) As String + Dim strCurrDate As String = dtpDateTime.Value.Year & "/" & dtpDateTime.Value.Month & "/" & dtpDateTime.Value.Day + If bWithQuotes Then + strCurrDate = Chr(34) & strCurrDate & Chr(34) + End If + Return strCurrDate + End Function End Class From 30ebd6232f265cf12a5671e81a930058e97999c1 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 2 Sep 2020 17:16:58 +0300 Subject: [PATCH 098/277] designer edits: removed redundant controls, aligning etc --- instat/dlgImportGriddedData.Designer.vb | 291 +++++----- instat/dlgImportGriddedData.resx | 689 ++++++++++++++---------- 2 files changed, 541 insertions(+), 439 deletions(-) diff --git a/instat/dlgImportGriddedData.Designer.vb b/instat/dlgImportGriddedData.Designer.vb index 8d13f548db3..e0fcc051adb 100644 --- a/instat/dlgImportGriddedData.Designer.vb +++ b/instat/dlgImportGriddedData.Designer.vb @@ -43,31 +43,32 @@ Partial Class dlgImportGriddedData Me.lblMaxLat = New System.Windows.Forms.Label() Me.lblMinLon = New System.Windows.Forms.Label() Me.lblMaxLon = New System.Windows.Forms.Label() - Me.lblMainDataName = New System.Windows.Forms.Label() - Me.lblDownloadFrom = New System.Windows.Forms.Label() - Me.lblDataFile = New System.Windows.Forms.Label() + Me.lblNewDataFrameName = New System.Windows.Forms.Label() + Me.lblSource = New System.Windows.Forms.Label() + Me.lblData = New System.Windows.Forms.Label() Me.cmdBrowse = New System.Windows.Forms.Button() - Me.grpGetArea = New System.Windows.Forms.GroupBox() + Me.grpDownloadType = New System.Windows.Forms.GroupBox() Me.rdoPoint = New System.Windows.Forms.RadioButton() Me.rdoArea = New System.Windows.Forms.RadioButton() - Me.ucrPnlGetArea = New instat.UcrPanel() - Me.ucrInputExportFile = New instat.ucrInputTextBox() - Me.ucrInputDataFile = New instat.ucrInputComboBox() - Me.ucrInputDownloadFrom = New instat.ucrInputComboBox() - Me.ucrInputMainDataName = New instat.ucrInputTextBox() - Me.ucrBase = New instat.ucrButtons() - Me.UcrDateTimePicker1 = New instat.ucrDateTimePicker() - Me.UcrDateTimePicker2 = New instat.ucrDateTimePicker() Me.grpDataRange = New System.Windows.Forms.GroupBox() Me.lblTo = New System.Windows.Forms.Label() Me.lblFrom = New System.Windows.Forms.Label() - Me.ucrInputMaxLon = New instat.ucrInputTextBox() - Me.ucrInputMinLon = New instat.ucrInputTextBox() - Me.ucrInputMaxLat = New instat.ucrInputTextBox() - Me.ucrInputMinLat = New instat.ucrInputTextBox() - Me.ucrChkTempLocation = New instat.ucrCheck() + Me.ucrInputNewDataFrameName = New instat.ucrInputTextBox() Me.ucrChkDontImportData = New instat.ucrCheck() - Me.grpGetArea.SuspendLayout() + Me.ucrChkSaveFileLocation = New instat.ucrCheck() + Me.ucrInputMinLat = New instat.ucrInputTextBox() + Me.ucrInputMaxLat = New instat.ucrInputTextBox() + Me.ucrInputMinLon = New instat.ucrInputTextBox() + Me.ucrInputMaxLon = New instat.ucrInputTextBox() + Me.ucrChkWholeRange = New instat.ucrCheck() + Me.ucrDtpMinDate = New instat.ucrDateTimePicker() + Me.ucrDtpMaxDate = New instat.ucrDateTimePicker() + Me.ucrPnlDownloadType = New instat.UcrPanel() + Me.ucrInputFilePath = New instat.ucrInputTextBox() + Me.ucrInputData = New instat.ucrInputComboBox() + Me.ucrInputSource = New instat.ucrInputComboBox() + Me.ucrBase = New instat.ucrButtons() + Me.grpDownloadType.SuspendLayout() Me.grpDataRange.SuspendLayout() Me.SuspendLayout() ' @@ -91,20 +92,20 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.lblMaxLon, "lblMaxLon") Me.lblMaxLon.Name = "lblMaxLon" ' - 'lblMainDataName + 'lblNewDataFrameName ' - resources.ApplyResources(Me.lblMainDataName, "lblMainDataName") - Me.lblMainDataName.Name = "lblMainDataName" + resources.ApplyResources(Me.lblNewDataFrameName, "lblNewDataFrameName") + Me.lblNewDataFrameName.Name = "lblNewDataFrameName" ' - 'lblDownloadFrom + 'lblSource ' - resources.ApplyResources(Me.lblDownloadFrom, "lblDownloadFrom") - Me.lblDownloadFrom.Name = "lblDownloadFrom" + resources.ApplyResources(Me.lblSource, "lblSource") + Me.lblSource.Name = "lblSource" ' - 'lblDataFile + 'lblData ' - resources.ApplyResources(Me.lblDataFile, "lblDataFile") - Me.lblDataFile.Name = "lblDataFile" + resources.ApplyResources(Me.lblData, "lblData") + Me.lblData.Name = "lblData" ' 'cmdBrowse ' @@ -112,14 +113,14 @@ Partial Class dlgImportGriddedData Me.cmdBrowse.Name = "cmdBrowse" Me.cmdBrowse.UseVisualStyleBackColor = True ' - 'grpGetArea + 'grpDownloadType ' - Me.grpGetArea.Controls.Add(Me.rdoPoint) - Me.grpGetArea.Controls.Add(Me.rdoArea) - Me.grpGetArea.Controls.Add(Me.ucrPnlGetArea) - resources.ApplyResources(Me.grpGetArea, "grpGetArea") - Me.grpGetArea.Name = "grpGetArea" - Me.grpGetArea.TabStop = False + Me.grpDownloadType.Controls.Add(Me.rdoPoint) + Me.grpDownloadType.Controls.Add(Me.rdoArea) + Me.grpDownloadType.Controls.Add(Me.ucrPnlDownloadType) + resources.ApplyResources(Me.grpDownloadType, "grpDownloadType") + Me.grpDownloadType.Name = "grpDownloadType" + Me.grpDownloadType.TabStop = False ' 'rdoPoint ' @@ -135,68 +136,13 @@ Partial Class dlgImportGriddedData Me.rdoArea.TabStop = True Me.rdoArea.UseVisualStyleBackColor = True ' - 'ucrPnlGetArea - ' - resources.ApplyResources(Me.ucrPnlGetArea, "ucrPnlGetArea") - Me.ucrPnlGetArea.Name = "ucrPnlGetArea" - ' - 'ucrInputExportFile - ' - Me.ucrInputExportFile.AddQuotesIfUnrecognised = True - Me.ucrInputExportFile.IsMultiline = False - Me.ucrInputExportFile.IsReadOnly = False - resources.ApplyResources(Me.ucrInputExportFile, "ucrInputExportFile") - Me.ucrInputExportFile.Name = "ucrInputExportFile" - ' - 'ucrInputDataFile - ' - Me.ucrInputDataFile.AddQuotesIfUnrecognised = True - Me.ucrInputDataFile.GetSetSelectedIndex = -1 - Me.ucrInputDataFile.IsReadOnly = False - resources.ApplyResources(Me.ucrInputDataFile, "ucrInputDataFile") - Me.ucrInputDataFile.Name = "ucrInputDataFile" - ' - 'ucrInputDownloadFrom - ' - Me.ucrInputDownloadFrom.AddQuotesIfUnrecognised = True - Me.ucrInputDownloadFrom.GetSetSelectedIndex = -1 - Me.ucrInputDownloadFrom.IsReadOnly = False - resources.ApplyResources(Me.ucrInputDownloadFrom, "ucrInputDownloadFrom") - Me.ucrInputDownloadFrom.Name = "ucrInputDownloadFrom" - ' - 'ucrInputMainDataName - ' - Me.ucrInputMainDataName.AddQuotesIfUnrecognised = True - Me.ucrInputMainDataName.IsMultiline = False - Me.ucrInputMainDataName.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMainDataName, "ucrInputMainDataName") - Me.ucrInputMainDataName.Name = "ucrInputMainDataName" - ' - 'ucrBase - ' - resources.ApplyResources(Me.ucrBase, "ucrBase") - Me.ucrBase.Name = "ucrBase" - ' - 'UcrDateTimePicker1 - ' - resources.ApplyResources(Me.UcrDateTimePicker1, "UcrDateTimePicker1") - Me.UcrDateTimePicker1.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) - Me.UcrDateTimePicker1.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) - Me.UcrDateTimePicker1.Name = "UcrDateTimePicker1" - ' - 'UcrDateTimePicker2 - ' - resources.ApplyResources(Me.UcrDateTimePicker2, "UcrDateTimePicker2") - Me.UcrDateTimePicker2.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) - Me.UcrDateTimePicker2.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) - Me.UcrDateTimePicker2.Name = "UcrDateTimePicker2" - ' 'grpDataRange ' + Me.grpDataRange.Controls.Add(Me.ucrChkWholeRange) Me.grpDataRange.Controls.Add(Me.lblTo) Me.grpDataRange.Controls.Add(Me.lblFrom) - Me.grpDataRange.Controls.Add(Me.UcrDateTimePicker1) - Me.grpDataRange.Controls.Add(Me.UcrDateTimePicker2) + Me.grpDataRange.Controls.Add(Me.ucrDtpMinDate) + Me.grpDataRange.Controls.Add(Me.ucrDtpMaxDate) resources.ApplyResources(Me.grpDataRange, "grpDataRange") Me.grpDataRange.Name = "grpDataRange" Me.grpDataRange.TabStop = False @@ -211,29 +157,25 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.lblFrom, "lblFrom") Me.lblFrom.Name = "lblFrom" ' - 'ucrInputMaxLon + 'ucrInputNewDataFrameName ' - Me.ucrInputMaxLon.AddQuotesIfUnrecognised = True - Me.ucrInputMaxLon.IsMultiline = False - Me.ucrInputMaxLon.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMaxLon, "ucrInputMaxLon") - Me.ucrInputMaxLon.Name = "ucrInputMaxLon" + Me.ucrInputNewDataFrameName.AddQuotesIfUnrecognised = True + Me.ucrInputNewDataFrameName.IsMultiline = False + Me.ucrInputNewDataFrameName.IsReadOnly = False + resources.ApplyResources(Me.ucrInputNewDataFrameName, "ucrInputNewDataFrameName") + Me.ucrInputNewDataFrameName.Name = "ucrInputNewDataFrameName" ' - 'ucrInputMinLon + 'ucrChkDontImportData ' - Me.ucrInputMinLon.AddQuotesIfUnrecognised = True - Me.ucrInputMinLon.IsMultiline = False - Me.ucrInputMinLon.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMinLon, "ucrInputMinLon") - Me.ucrInputMinLon.Name = "ucrInputMinLon" + Me.ucrChkDontImportData.Checked = False + resources.ApplyResources(Me.ucrChkDontImportData, "ucrChkDontImportData") + Me.ucrChkDontImportData.Name = "ucrChkDontImportData" ' - 'ucrInputMaxLat + 'ucrChkSaveFileLocation ' - Me.ucrInputMaxLat.AddQuotesIfUnrecognised = True - Me.ucrInputMaxLat.IsMultiline = False - Me.ucrInputMaxLat.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMaxLat, "ucrInputMaxLat") - Me.ucrInputMaxLat.Name = "ucrInputMaxLat" + Me.ucrChkSaveFileLocation.Checked = False + resources.ApplyResources(Me.ucrChkSaveFileLocation, "ucrChkSaveFileLocation") + Me.ucrChkSaveFileLocation.Name = "ucrChkSaveFileLocation" ' 'ucrInputMinLat ' @@ -243,38 +185,104 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.ucrInputMinLat, "ucrInputMinLat") Me.ucrInputMinLat.Name = "ucrInputMinLat" ' - 'ucrChkTempLocation + 'ucrInputMaxLat ' - Me.ucrChkTempLocation.Checked = False - resources.ApplyResources(Me.ucrChkTempLocation, "ucrChkTempLocation") - Me.ucrChkTempLocation.Name = "ucrChkTempLocation" + Me.ucrInputMaxLat.AddQuotesIfUnrecognised = True + Me.ucrInputMaxLat.IsMultiline = False + Me.ucrInputMaxLat.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMaxLat, "ucrInputMaxLat") + Me.ucrInputMaxLat.Name = "ucrInputMaxLat" ' - 'ucrChkDontImportData + 'ucrInputMinLon ' - Me.ucrChkDontImportData.Checked = False - resources.ApplyResources(Me.ucrChkDontImportData, "ucrChkDontImportData") - Me.ucrChkDontImportData.Name = "ucrChkDontImportData" + Me.ucrInputMinLon.AddQuotesIfUnrecognised = True + Me.ucrInputMinLon.IsMultiline = False + Me.ucrInputMinLon.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMinLon, "ucrInputMinLon") + Me.ucrInputMinLon.Name = "ucrInputMinLon" + ' + 'ucrInputMaxLon + ' + Me.ucrInputMaxLon.AddQuotesIfUnrecognised = True + Me.ucrInputMaxLon.IsMultiline = False + Me.ucrInputMaxLon.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMaxLon, "ucrInputMaxLon") + Me.ucrInputMaxLon.Name = "ucrInputMaxLon" + ' + 'ucrChkWholeRange + ' + Me.ucrChkWholeRange.Checked = False + resources.ApplyResources(Me.ucrChkWholeRange, "ucrChkWholeRange") + Me.ucrChkWholeRange.Name = "ucrChkWholeRange" + ' + 'ucrDtpMinDate + ' + resources.ApplyResources(Me.ucrDtpMinDate, "ucrDtpMinDate") + Me.ucrDtpMinDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.ucrDtpMinDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.ucrDtpMinDate.Name = "ucrDtpMinDate" + ' + 'ucrDtpMaxDate + ' + resources.ApplyResources(Me.ucrDtpMaxDate, "ucrDtpMaxDate") + Me.ucrDtpMaxDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.ucrDtpMaxDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.ucrDtpMaxDate.Name = "ucrDtpMaxDate" + ' + 'ucrPnlDownloadType + ' + resources.ApplyResources(Me.ucrPnlDownloadType, "ucrPnlDownloadType") + Me.ucrPnlDownloadType.Name = "ucrPnlDownloadType" + ' + 'ucrInputFilePath + ' + Me.ucrInputFilePath.AddQuotesIfUnrecognised = True + Me.ucrInputFilePath.IsMultiline = False + Me.ucrInputFilePath.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFilePath, "ucrInputFilePath") + Me.ucrInputFilePath.Name = "ucrInputFilePath" + ' + 'ucrInputData + ' + Me.ucrInputData.AddQuotesIfUnrecognised = True + Me.ucrInputData.GetSetSelectedIndex = -1 + Me.ucrInputData.IsReadOnly = False + resources.ApplyResources(Me.ucrInputData, "ucrInputData") + Me.ucrInputData.Name = "ucrInputData" + ' + 'ucrInputSource + ' + Me.ucrInputSource.AddQuotesIfUnrecognised = True + Me.ucrInputSource.GetSetSelectedIndex = -1 + Me.ucrInputSource.IsReadOnly = False + resources.ApplyResources(Me.ucrInputSource, "ucrInputSource") + Me.ucrInputSource.Name = "ucrInputSource" + ' + 'ucrBase + ' + resources.ApplyResources(Me.ucrBase, "ucrBase") + Me.ucrBase.Name = "ucrBase" ' 'dlgImportGriddedData ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.ucrInputNewDataFrameName) Me.Controls.Add(Me.ucrChkDontImportData) - Me.Controls.Add(Me.ucrChkTempLocation) + Me.Controls.Add(Me.ucrChkSaveFileLocation) Me.Controls.Add(Me.ucrInputMinLat) Me.Controls.Add(Me.ucrInputMaxLat) Me.Controls.Add(Me.ucrInputMinLon) Me.Controls.Add(Me.ucrInputMaxLon) Me.Controls.Add(Me.grpDataRange) - Me.Controls.Add(Me.grpGetArea) - Me.Controls.Add(Me.ucrInputExportFile) + Me.Controls.Add(Me.grpDownloadType) + Me.Controls.Add(Me.ucrInputFilePath) Me.Controls.Add(Me.cmdBrowse) - Me.Controls.Add(Me.lblDataFile) - Me.Controls.Add(Me.ucrInputDataFile) - Me.Controls.Add(Me.lblDownloadFrom) - Me.Controls.Add(Me.ucrInputDownloadFrom) - Me.Controls.Add(Me.ucrInputMainDataName) - Me.Controls.Add(Me.lblMainDataName) + Me.Controls.Add(Me.lblData) + Me.Controls.Add(Me.ucrInputData) + Me.Controls.Add(Me.lblSource) + Me.Controls.Add(Me.ucrInputSource) + Me.Controls.Add(Me.lblNewDataFrameName) Me.Controls.Add(Me.lblMaxLon) Me.Controls.Add(Me.lblMinLon) Me.Controls.Add(Me.lblMaxLat) @@ -284,8 +292,8 @@ Partial Class dlgImportGriddedData Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgImportGriddedData" - Me.grpGetArea.ResumeLayout(False) - Me.grpGetArea.PerformLayout() + Me.grpDownloadType.ResumeLayout(False) + Me.grpDownloadType.PerformLayout() Me.grpDataRange.ResumeLayout(False) Me.grpDataRange.PerformLayout() Me.ResumeLayout(False) @@ -298,20 +306,19 @@ Partial Class dlgImportGriddedData Friend WithEvents lblMaxLat As Label Friend WithEvents lblMinLon As Label Friend WithEvents lblMaxLon As Label - Friend WithEvents lblMainDataName As Label - Friend WithEvents ucrInputMainDataName As ucrInputTextBox - Friend WithEvents ucrInputDownloadFrom As ucrInputComboBox - Friend WithEvents lblDownloadFrom As Label - Friend WithEvents ucrInputDataFile As ucrInputComboBox - Friend WithEvents lblDataFile As Label - Friend WithEvents ucrInputExportFile As ucrInputTextBox + Friend WithEvents lblNewDataFrameName As Label + Friend WithEvents ucrInputSource As ucrInputComboBox + Friend WithEvents lblSource As Label + Friend WithEvents ucrInputData As ucrInputComboBox + Friend WithEvents lblData As Label + Friend WithEvents ucrInputFilePath As ucrInputTextBox Friend WithEvents cmdBrowse As Button - Friend WithEvents grpGetArea As GroupBox + Friend WithEvents grpDownloadType As GroupBox Friend WithEvents rdoPoint As RadioButton Friend WithEvents rdoArea As RadioButton - Friend WithEvents ucrPnlGetArea As UcrPanel - Friend WithEvents UcrDateTimePicker1 As ucrDateTimePicker - Friend WithEvents UcrDateTimePicker2 As ucrDateTimePicker + Friend WithEvents ucrPnlDownloadType As UcrPanel + Friend WithEvents ucrDtpMinDate As ucrDateTimePicker + Friend WithEvents ucrDtpMaxDate As ucrDateTimePicker Friend WithEvents grpDataRange As GroupBox Friend WithEvents lblTo As Label Friend WithEvents lblFrom As Label @@ -319,6 +326,8 @@ Partial Class dlgImportGriddedData Friend WithEvents ucrInputMinLon As ucrInputTextBox Friend WithEvents ucrInputMaxLat As ucrInputTextBox Friend WithEvents ucrInputMinLat As ucrInputTextBox - Friend WithEvents ucrChkTempLocation As ucrCheck + Friend WithEvents ucrChkSaveFileLocation As ucrCheck Friend WithEvents ucrChkDontImportData As ucrCheck + Friend WithEvents ucrInputNewDataFrameName As ucrInputTextBox + Friend WithEvents ucrChkWholeRange As ucrCheck End Class diff --git a/instat/dlgImportGriddedData.resx b/instat/dlgImportGriddedData.resx index 3d8602ed217..1bea4487374 100644 --- a/instat/dlgImportGriddedData.resx +++ b/instat/dlgImportGriddedData.resx @@ -121,6 +121,10 @@ True + + + NoControl + 11, 196 @@ -129,7 +133,7 @@ 92, 13 - 13 + 10 Minimum Latitude: @@ -149,6 +153,9 @@ True + + NoControl + 225, 196 @@ -156,7 +163,7 @@ 95, 13 - 15 + 12 Maximum Latitude: @@ -176,6 +183,9 @@ True + + NoControl + 11, 172 @@ -183,7 +193,7 @@ 101, 13 - 9 + 6 Minimum Longitude: @@ -203,6 +213,9 @@ True + + NoControl + 225, 171 @@ -210,7 +223,7 @@ 104, 13 - 11 + 8 Maximum Longitude: @@ -227,95 +240,107 @@ 16 - + True - + + NoControl + + 9, 275 - - 90, 13 + + 121, 13 - - 4 + + 18 - - Main Data Name: + + New Data Frame Name: - - lblMainDataName + + lblNewDataFrameName - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 15 - + True - + + NoControl + + 11, 25 - + 44, 13 - + 0 - + Source: - - lblDownloadFrom + + lblSource - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 12 + + 13 - + True - + + NoControl + + 11, 52 - + 33, 13 - + 2 - + Data: - - lblDataFile + + lblData - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 10 + + 11 + + + NoControl - 331, 220 + 347, 220 - 75, 23 + 59, 23 - 19 + 16 Browse @@ -330,7 +355,7 @@ $this - 9 + 10 rdoPoint @@ -339,7 +364,7 @@ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - grpGetArea + grpDownloadType 0 @@ -351,50 +376,53 @@ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - grpGetArea + grpDownloadType 1 - - ucrPnlGetArea + + ucrPnlDownloadType - + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpGetArea + + grpDownloadType - + 2 - + 11, 78 - + 116, 82 - - 8 + + 4 - + Download Type - - grpGetArea + + grpDownloadType - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 7 + + 8 True + + NoControl + 10, 42 @@ -414,7 +442,7 @@ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - grpGetArea + grpDownloadType 0 @@ -422,6 +450,9 @@ True + + NoControl + 10, 19 @@ -441,178 +472,22 @@ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - grpGetArea + grpDownloadType 1 - - 7, 13 - - - 69, 60 - - - 0 + + ucrChkWholeRange - - ucrPnlGetArea - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpGetArea - - - 2 - - - 129, 221 - - - 200, 21 - - - 18 - - - ucrInputExportFile - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 8 - - - 102, 48 - - - 161, 21 - - - 3 - - - ucrInputDataFile - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 11 - - - 103, 21 - - - 161, 21 - - - 1 - - - ucrInputDownloadFrom - - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 13 - - - 102, 271 - - - 161, 21 - - - 5 - - - ucrInputMainDataName - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 14 - - - 11, 298 - - - 416, 52 - - - 20 - - - ucrBase - - - instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 20 - - - 40, 21 - - - 180, 20 - - - 21 - - - UcrDateTimePicker1 - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDataRange - - - 2 - - - 40, 53 - - - 180, 20 - - - 22 - - - UcrDateTimePicker2 - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + grpDataRange - - 3 + + 0 lblTo @@ -624,7 +499,7 @@ grpDataRange - 0 + 1 lblFrom @@ -636,16 +511,40 @@ grpDataRange - 1 + 2 + + + ucrDtpMinDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDataRange + + + 3 + + + ucrDtpMaxDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDataRange + + + 4 130, 78 - 229, 82 + 276, 82 - 23 + 5 Data Range @@ -660,23 +559,22 @@ $this - 6 + 7 True - NoControl - 4, 56 + 5, 62 23, 13 - 24 + 2 To: @@ -691,19 +589,22 @@ grpDataRange - 0 + 1 True + + NoControl + - 4, 25 + 5, 38 33, 13 - 23 + 0 From: @@ -718,28 +619,112 @@ grpDataRange + 2 + + + 133, 273 + + + 217, 21 + + + 19 + + + ucrInputNewDataFrameName + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 + + + 11, 247 + + + 252, 20 + + + 17 + + + ucrChkDontImportData + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + 1 - - 331, 167 + + 11, 221 - + + 139, 20 + + + 14 + + + ucrChkSaveFileLocation + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 2 + + + 116, 191 + + 75, 21 - - 24 + + 11 - - ucrInputMaxLon + + ucrInputMinLat - + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 5 + + 3 + + + 331, 190 + + + 75, 21 + + + 13 + + + ucrInputMaxLat + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 4 116, 168 @@ -748,7 +733,7 @@ 75, 21 - 25 + 7 ucrInputMinLon @@ -760,91 +745,196 @@ $this - 4 + 5 - - 331, 190 + + 331, 167 - + 75, 21 - - 26 + + 9 - - ucrInputMaxLat + + ucrInputMaxLon - + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - + + 6 + + + 5, 13 + + + 163, 20 + + + 21 + + + ucrChkWholeRange + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDataRange + + + 0 + + + 40, 34 + + + 180, 20 + + + 1 + + + ucrDtpMinDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDataRange + + 3 - - 116, 191 + + 40, 59 - - 75, 21 + + 180, 20 - - 27 + + 3 - - ucrInputMinLat + + ucrDtpMaxDate - + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDataRange + + + 4 + + + 7, 13 + + + 69, 60 + + + 0 + + + ucrPnlDownloadType + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDownloadType + + + 2 + + + 156, 221 + + + 191, 21 + + + 15 + + + ucrInputFilePath + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 2 + + 9 - - 11, 221 + + 57, 48 - - 116, 20 + + 248, 21 - - 28 + + 3 - - ucrChkTempLocation + + ucrInputData - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - + + 12 + + + 58, 21 + + + 248, 21 + + 1 - - 11, 247 + + ucrInputSource - - 252, 20 + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 29 + + $this - - ucrChkDontImportData + + 14 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 11, 298 - + + 416, 52 + + + 20 + + + ucrBase + + + instat.ucrButtons, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + $this - - 0 + + 20 True @@ -855,6 +945,9 @@ 423, 351 + + NoControl + CenterScreen From 7f30760352206432cac70f0822ee2a4b320ef0e3 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 2 Sep 2020 17:17:56 +0300 Subject: [PATCH 099/277] Implementing functionality to download from IRI --- instat/dlgImportGriddedData.vb | 300 +++++++++++++++++++-------------- 1 file changed, 171 insertions(+), 129 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 3d4fe07c5fc..4b8abae3047 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -19,9 +19,11 @@ Imports instat.Translations Public Class dlgImportGriddedData Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsRDefaultFunction As New RFunction + Private clsDownloadFromIRIFunction As New RFunction + Private clsDefaultStartDate, clsDefaultEndDate As New RFunction Private dctDownloadPairs, dctFiles As New Dictionary(Of String, String) Private Sub dlgImportGriddedData_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) If bFirstLoad Then InitialiseDialog() bFirstLoad = False @@ -31,14 +33,15 @@ Public Class dlgImportGriddedData End If SetRCodeForControls(bReset) bReset = False - autoTranslate(Me) TestOkEnabled() End Sub Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 526 + ucrBase.clsRsyntax.iCallType = 2 + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False - ucrInputDownloadFrom.SetParameter(New RParameter("download_from", 0)) + ucrInputSource.SetParameter(New RParameter("source", 0)) dctDownloadPairs.Add("CHIRPS_V2P0", Chr(34) & "CHIRPS_V2P0" & Chr(34)) dctDownloadPairs.Add("TAMSAT", Chr(34) & "TAMSAT" & Chr(34)) dctDownloadPairs.Add("NOAA_ARC2", Chr(34) & "NOAA_ARC2" & Chr(34)) @@ -49,84 +52,115 @@ Public Class dlgImportGriddedData 'dctDownloadPairs.Add("NOAA_CMORPH_PENTAD", Chr(34) & "NOAA_CMORPH_PENTAD" & Chr(34)) 'dctDownloadPairs.Add("NOAA_CMORPH_V0PX", Chr(34) & "NOAA_CMORPH_V0PX" & Chr(34)) dctDownloadPairs.Add("NASA_TRMM_3B42", Chr(34) & "NASA_TRMM_3B42" & Chr(34)) - ucrInputDownloadFrom.SetItems(dctDownloadPairs) - ucrInputDownloadFrom.SetDropDownStyleAsNonEditable() - - ucrInputDataFile.SetParameter(New RParameter("data_file", 1)) - dctFiles.Add("Daily 0p05", Chr(34) & "daily_0p05" & Chr(34)) - dctFiles.Add("Daily 0p25", Chr(34) & "daily_0p25" & Chr(34)) - dctFiles.Add("Daily Improved 0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) - dctFiles.Add("Daily Improved 0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) + ucrInputSource.SetItems(dctDownloadPairs) + ucrInputSource.SetDropDownStyleAsNonEditable() + + ucrInputData.SetParameter(New RParameter("data", 1)) + dctFiles.Add("Daily_0p05", Chr(34) & "daily_0p05" & Chr(34)) + dctFiles.Add("Daily_0p25", Chr(34) & "daily_0p25" & Chr(34)) + dctFiles.Add("Daily_Improved 0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) + dctFiles.Add("Daily_Improved 0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) dctFiles.Add("Dekad", Chr(34) & "dekad" & Chr(34)) - dctFiles.Add("Monthly c8113", Chr(34) & "monthly_c8113" & Chr(34)) - dctFiles.Add("Monthly deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) - dctFiles.Add("Monthly NMME deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) - dctFiles.Add("Monthly Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) - ucrInputDataFile.SetItems(dctFiles) - ucrInputDataFile.SetDropDownStyleAsNonEditable() - - ucrInputMainDataName.SetParameter(New RParameter("data_frame_name", 2)) - - ucrPnlGetArea.SetParameter(New RParameter("get_area_point", 5)) - ucrPnlGetArea.AddRadioButton(rdoArea, Chr(34) & "area" & Chr(34)) - ucrPnlGetArea.AddRadioButton(rdoPoint, Chr(34) & "point" & Chr(34)) - ucrPnlGetArea.SetRDefault(Chr(34) & "area" & Chr(34)) - - ucrPnlGetArea.AddToLinkedControls({ucrInputMaxLat, ucrInputMaxLon}, {rdoArea}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkTempLocation.AddToLinkedControls({ucrInputExportFile, ucrChkDontImportData}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkDontImportData.AddToLinkedControls({ucrInputMainDataName}, {False}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrInputMinLon.SetLinkedDisplayControl(lblMinLon) - ucrInputMinLon.SetLinkedDisplayControl(lblMinLon) - ucrInputMaxLon.SetLinkedDisplayControl(lblMaxLon) - ucrInputMinLat.SetLinkedDisplayControl(lblMinLat) - ucrInputMaxLat.SetLinkedDisplayControl(lblMaxLat) - ucrInputExportFile.SetLinkedDisplayControl(cmdBrowse) - ucrInputMainDataName.SetLinkedDisplayControl(lblMainDataName) + dctFiles.Add("Monthly_c8113", Chr(34) & "monthly_c8113" & Chr(34)) + dctFiles.Add("Monthly_deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) + dctFiles.Add("Monthly_NMME_deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) + dctFiles.Add("Monthly_Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) + ucrInputData.SetItems(dctFiles) + ucrInputData.SetDropDownStyleAsNonEditable() + + ucrInputFilePath.IsReadOnly = True - ucrInputMinLon.SetParameter(New RParameter("X1", 6)) + ucrInputMinLon.SetParameter(New RParameter("min_lon", 3)) + ucrInputMinLon.AddQuotesIfUnrecognised = False ucrInputMinLon.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) - ucrInputMaxLon.SetParameter(New RParameter("X2", 7)) + ucrInputMaxLon.SetParameter(New RParameter("max_lon", 4)) + ucrInputMaxLon.AddQuotesIfUnrecognised = False ucrInputMaxLon.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) - ucrInputMinLat.SetParameter(New RParameter("Y1", 8)) + ucrInputMinLat.SetParameter(New RParameter("min_lat", 5)) + ucrInputMinLat.AddQuotesIfUnrecognised = False ucrInputMinLat.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) - ucrInputMaxLat.SetParameter(New RParameter("Y2", 9)) + ucrInputMaxLat.SetParameter(New RParameter("max_lat", 6)) + ucrInputMaxLat.AddQuotesIfUnrecognised = False ucrInputMaxLat.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) - ucrChkTempLocation.SetText("Save Downloaded File:") + ucrDtpMinDate.SetParameter(New RParameter("min_date", 7)) + + ucrDtpMaxDate.SetParameter(New RParameter("max_date", 8)) + + ucrInputNewDataFrameName.SetParameter(New RParameter("name", 9)) + + ucrPnlDownloadType.SetParameter(New RParameter("download_type", 10)) + ucrPnlDownloadType.AddRadioButton(rdoArea, Chr(34) & "area" & Chr(34)) + ucrPnlDownloadType.AddRadioButton(rdoPoint, Chr(34) & "point" & Chr(34)) + + ucrChkDontImportData.SetParameter(New RParameter("import", 11)) + ucrChkDontImportData.SetValuesCheckedAndUnchecked("FALSE", "TRUE") + ucrChkDontImportData.SetText("Don' t import data after downloading") + ucrChkDontImportData.SetRDefault("TRUE") + + ucrPnlDownloadType.AddToLinkedControls({ucrInputMaxLat, ucrInputMaxLon}, {rdoArea}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkSaveFileLocation.AddToLinkedControls(ucrChkDontImportData, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkSaveFileLocation.AddToLinkedControls(ucrInputFilePath, {True}, bNewLinkedHideIfParameterMissing:=True) + ucrChkWholeRange.AddToLinkedControls({ucrDtpMinDate, ucrDtpMaxDate}, {False}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputMinLon.SetLinkedDisplayControl(lblMinLon) + ucrInputMinLon.SetLinkedDisplayControl(lblMinLon) + ucrInputMaxLon.SetLinkedDisplayControl(lblMaxLon) + ucrInputMinLat.SetLinkedDisplayControl(lblMinLat) + ucrInputMaxLat.SetLinkedDisplayControl(lblMaxLat) + ucrInputFilePath.SetLinkedDisplayControl(cmdBrowse) + ucrDtpMinDate.SetLinkedDisplayControl(lblFrom) + ucrDtpMaxDate.SetLinkedDisplayControl(lblTo) + + ucrChkSaveFileLocation.SetText("Save Downloaded File:") + ucrChkSaveFileLocation.AddParameterPresentCondition(True, "path") + ucrChkSaveFileLocation.AddParameterPresentCondition(False, "path", False) + + ucrChkWholeRange.SetText("Whole range") + ucrChkWholeRange.AddParameterPresentCondition(True, {"min_date", "max_date"}) + ucrChkWholeRange.AddParameterPresentCondition(False, {"min_date", "max_date"}, False) + + clsDefaultStartDate = New RFunction + clsDefaultStartDate.SetRCommand("as.Date") + clsDefaultStartDate.AddParameter("x", Chr(34) & "1981/01/01" & Chr(34)) - ucrChkDontImportData.SetText("Don't import data after downloading") + clsDefaultEndDate = New RFunction + clsDefaultEndDate.SetRCommand("as.Date") + clsDefaultEndDate.AddParameter("x", ucrDtpMaxDate.CurrentDate()) End Sub Private Sub SetDefaults() - clsRDefaultFunction = New RFunction - - clsRDefaultFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$import_from_iri") - clsRDefaultFunction.AddParameter("download_from", Chr(34) & "CHIRPS_V2P0" & Chr(34)) - clsRDefaultFunction.AddParameter("data_file", Chr(34) & "daily_0p05" & Chr(34)) - clsRDefaultFunction.AddParameter("data_frame_name", "IRI_Library_Data") - clsRDefaultFunction.AddParameter("location_data_name", "Lat_Lon_Data") - clsRDefaultFunction.AddParameter("path", Chr(34) & System.IO.Path.Combine(System.IO.Path.GetTempPath() & "R_Instat_Temp_IRI_Download").Replace("\", "/") & Chr(34)) + clsDownloadFromIRIFunction = New RFunction + + clsDownloadFromIRIFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$download_from_IRI") + clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "CHIRPS_V2P0" & Chr(34), iPosition:=0) + clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "daily_0p05" & Chr(34), iPosition:=1) + 'clsDownloadFromIRIFunction.AddParameter("path", Chr(34) & System.IO.Path.Combine(System.IO.Path.GetTempPath()).Replace("\", "/") & Chr(34), iPosition:=2) 'opted to set this as default location since it has data for all sources - clsRDefaultFunction.AddParameter("X1", 10) - clsRDefaultFunction.AddParameter("X2", 10.5) - clsRDefaultFunction.AddParameter("Y1", 10) - clsRDefaultFunction.AddParameter("Y2", 10.5) - ucrBase.clsRsyntax.SetBaseRFunction(clsRDefaultFunction) + clsDownloadFromIRIFunction.AddParameter("min_lon", 10, iPosition:=3) + clsDownloadFromIRIFunction.AddParameter("max_lon", 10.5, iPosition:=4) + clsDownloadFromIRIFunction.AddParameter("min_lat", 10, iPosition:=5) + clsDownloadFromIRIFunction.AddParameter("max_lat", 10.5, iPosition:=6) + clsDownloadFromIRIFunction.AddParameter("min_date", clsRFunctionParameter:=clsDefaultStartDate, iPosition:=7) + clsDownloadFromIRIFunction.AddParameter("max_date", clsRFunctionParameter:=clsDefaultEndDate, iPosition:=8) + clsDownloadFromIRIFunction.AddParameter("download_type", Chr(34) & "area" & Chr(34), iPosition:=10) + + ucrBase.clsRsyntax.SetBaseRFunction(clsDownloadFromIRIFunction) End Sub Private Sub SetRCodeForControls(bReset As Boolean) - SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + If bReset Then + SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + End If End Sub Private Sub TestOkEnabled() - 'download from and datafile should be added to test ok - If (ucrInputMainDataName.Text <> "") Then - ucrBase.OKEnabled(True) - Else + If ucrInputNewDataFrameName.IsEmpty OrElse (rdoPoint.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty)) OrElse (rdoArea.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty OrElse ucrInputMaxLon.IsEmpty OrElse ucrInputMaxLat.IsEmpty)) OrElse (ucrChkSaveFileLocation.Checked AndAlso ucrInputFilePath.IsEmpty) Then ucrBase.OKEnabled(False) + Else + ucrBase.OKEnabled(True) End If End Sub @@ -136,7 +170,7 @@ Public Class dlgImportGriddedData TestOkEnabled() End Sub - Private Sub ucrPnlGetArea_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlGetArea.ControlContentsChanged + Private Sub ucrPnlDownloadType_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDownloadType.ControlValueChanged If rdoArea.Checked Then lblMinLat.Text = "Minimum Latitude:" lblMinLon.Text = "Minimum Longitude:" @@ -146,88 +180,96 @@ Public Class dlgImportGriddedData End If End Sub - Private Sub ucrInputDownloadFrom_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputDownloadFrom.ControlContentsChanged - If ucrInputDownloadFrom.cboInput.SelectedItem = "CHIRPS_V2P0" Then - dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily 0p05", Chr(34) & "daily_0p05" & Chr(34)) - dctFiles.Add("Daily 0p25", Chr(34) & "daily_0p25" & Chr(34)) - dctFiles.Add("Daily Improved 0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) - dctFiles.Add("Daily Improved 0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) - dctFiles.Add("Dekad", Chr(34) & "Dekad" & Chr(34)) - dctFiles.Add("Monthly c8113", Chr(34) & "monthly_c8113" & Chr(34)) - dctFiles.Add("Monthly deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) - dctFiles.Add("Monthly NMME deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) - dctFiles.Add("Monthly Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) - ucrInputDataFile.SetItems(dctFiles) - ucrInputDataFile.cboInput.SelectedItem = "Daily 0p05" - Else - If ucrInputDownloadFrom.cboInput.SelectedItem = "TAMSAT" Then + Private Sub ucrInputSource_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSource.ControlValueChanged + Select Case ucrInputSource.GetText + Case "CHIRPS_V2P0" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Rainfall Estimates", Chr(34) & "rainfall_estimates" & Chr(34)) - dctFiles.Add("Reconstructed Rainfall Anomaly", Chr(34) & "reconstructed_rainfall_anomaly" & Chr(34)) - dctFiles.Add("Sahel Dry Mask", Chr(34) & "sahel_dry_mask" & Chr(34)) - dctFiles.Add("Standard Precipitation Index 1-dekad", Chr(34) & "SPI_1_dekad" & Chr(34)) + dctFiles.Add("Daily_0p05", Chr(34) & "daily_0p05" & Chr(34)) + dctFiles.Add("Daily_0p25", Chr(34) & "daily_0p25" & Chr(34)) + dctFiles.Add("Daily_Improved_0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) + dctFiles.Add("Daily_Improved_0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) + dctFiles.Add("Dekad", Chr(34) & "dekad" & Chr(34)) + dctFiles.Add("Monthly_c8113", Chr(34) & "monthly_c8113" & Chr(34)) + dctFiles.Add("Monthly_deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) + dctFiles.Add("Monthly_NMME_deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) + dctFiles.Add("Monthly_Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) + ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "Daily_0p05" + Case "TAMSAT" + dctFiles = New Dictionary(Of String, String) + dctFiles.Add("Rainfall_Estimates", Chr(34) & "rainfall_estimates" & Chr(34)) + dctFiles.Add("Reconstructed_Rainfall_Anomaly", Chr(34) & "reconstructed_rainfall_anomaly" & Chr(34)) + dctFiles.Add("Sahel_Dry_Mask", Chr(34) & "sahel_dry_mask" & Chr(34)) + dctFiles.Add("Standard_Precipitation_Index_1-dekad", Chr(34) & "SPI_1_dekad" & Chr(34)) 'monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. - ucrInputDataFile.SetItems(dctFiles) - ucrInputDataFile.cboInput.SelectedItem = "Rainfall Estimates" - ElseIf ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_ARC2" Then + ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "Rainfall_Estimates" + Case "NOAA_ARC2" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily Est. Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) - dctFiles.Add("Monthly Average Est. Prcp.", Chr(34) & "monthly_average_estimated_prcp" & Chr(34)) + dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) + dctFiles.Add("Monthly_Average_Est._Prcp.", Chr(34) & "monthly_average_estimated_prcp" & Chr(34)) 'monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. - ucrInputDataFile.SetItems(dctFiles) - ucrInputDataFile.cboInput.SelectedItem = "Daily Est. Prcp." - ElseIf ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_RFE2" Then + ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." + Case "NOAA_RFE2" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily Est. Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) - ucrInputDataFile.SetItems(dctFiles) - ucrInputDataFile.cboInput.SelectedItem = "Daily Est. Prcp." - ElseIf (ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_CMORPH_DAILY" OrElse ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_CMORPH_3HOURLY" OrElse ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_CMORPH_DAILY_CALCULATED") Then + dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) + ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." + Case "NOAA_CMORPH_DAILY", "NOAA_CMORPH_3HOURLY", "NOAA_CMORPH_DAILY_CALCULATED" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Mean Microwave Only Est. Prcp.", Chr(34) & "mean_microwave_only_est_prcp" & Chr(34)) - dctFiles.Add("Mean Morphed Est. Prcp.", Chr(34) & "mean_morphed_est_prcp" & Chr(34)) - dctFiles.Add("Orignames Mean Microwave Only Est. Prcp.", Chr(34) & "orignames_mean_microwave_only_est_prcp" & Chr(34)) - dctFiles.Add("Orignames Mean Morphed Est. Prcp.", Chr(34) & "orignames_mean_morphed_est_prcp" & Chr(34)) - dctFiles.Add("Renamed102015 Mean Microwave Only Est. Prcp.", Chr(34) & "renamed102015_mean_microwave_only_est_prcp" & Chr(34)) - dctFiles.Add("Renamed102015 Mean Morphed Est. Prcp.", Chr(34) & "renamed102015_mean_morphed_est_prcp" & Chr(34)) - ucrInputDataFile.SetItems(dctFiles) - ucrInputDataFile.cboInput.SelectedItem = "Mean Morphed Est. Prcp." - + dctFiles.Add("Mean_Microwave_Only_Est._Prcp.", Chr(34) & "mean_microwave_only_est_prcp" & Chr(34)) + dctFiles.Add("Mean_Morphed_Est._Prcp.", Chr(34) & "mean_morphed_est_prcp" & Chr(34)) + dctFiles.Add("Orignames_Mean_Microwave_Only_Est._Prcp.", Chr(34) & "orignames_mean_microwave_only_est_prcp" & Chr(34)) + dctFiles.Add("Orignames_Mean_Morphed_Est._Prcp.", Chr(34) & "orignames_mean_morphed_est_prcp" & Chr(34)) + dctFiles.Add("Renamed102015_Mean_Microwave_Only_Est._Prcp.", Chr(34) & "renamed102015_mean_microwave_only_est_prcp" & Chr(34)) + dctFiles.Add("Renamed102015_Mean_Morphed_Est._Prcp.", Chr(34) & "renamed102015_mean_morphed_est_prcp" & Chr(34)) + ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "Mean_Morphed_Est._Prcp." 'ElseIf ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_CMORPH_PENTAD" Then 'ElseIf ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_CMORPH_V0PX" Then - ElseIf ucrInputDownloadFrom.cboInput.SelectedItem = "NASA_TRMM_3B42" Then + Case "NASA_TRMM_3B42" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily Est. Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) - dctFiles.Add("3-Hourly Est. Prcp.", Chr(34) & "3_hourly_estimated_prcp" & Chr(34)) - dctFiles.Add("3-Hourly Pre-gauge Adjusted Infrared Est. Prcp.", Chr(34) & "3_hourly_pre_gauge_adjusted_infrared_est_prcp" & Chr(34)) - dctFiles.Add("3-Hourly Pre-gauge Adjusted Microwave Est. Prcp.", Chr(34) & "3_hourly_pre_gauge_adjusted_microwave_est_prcp" & Chr(34)) - ucrInputDataFile.SetItems(dctFiles) - ucrInputDataFile.cboInput.SelectedItem = "Daily Est. Prcp." + dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) + dctFiles.Add("3-Hourly_Est._Prcp.", Chr(34) & "3_hourly_estimated_prcp" & Chr(34)) + dctFiles.Add("3-Hourly_Pre-gauge_Adjusted_Infrared_Est._Prcp.", Chr(34) & "3_hourly_pre_gauge_adjusted_infrared_est_prcp" & Chr(34)) + dctFiles.Add("3-Hourly_Pre-gauge_Adjusted_Microwave_Est._Prcp.", Chr(34) & "3_hourly_pre_gauge_adjusted_microwave_est_prcp" & Chr(34)) + ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." + End Select + 'other data sources to be added here. + End Sub + + Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click + Dim strPath As String + + Using dlgFolder As New FolderBrowserDialog + dlgFolder.Description = "Choose Folder" + If dlgFolder.ShowDialog() = DialogResult.OK Then + ucrInputFilePath.SetName("") + strPath = dlgFolder.SelectedPath + ucrInputFilePath.SetName(Replace(strPath, "\", "/")) End If - 'other data sources to be added here. + End Using + End Sub + + Private Sub ucrInputData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputData.ControlValueChanged, ucrInputSource.ControlValueChanged + ucrInputNewDataFrameName.SetName(ucrInputSource.GetText & "_" & ucrInputData.GetText) + End Sub + + Private Sub ucrInputDownloadFrom_ControlValueChanged(ucrChangedControl As ucrCore) + + End Sub + + Private Sub ucrInputFilePath_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFilePath.ControlValueChanged, ucrChkSaveFileLocation.ControlValueChanged + If ucrChkSaveFileLocation.Checked AndAlso ucrInputFilePath.GetText <> "" Then + clsDownloadFromIRIFunction.AddParameter("path", Chr(34) & ucrInputFilePath.GetText & Chr(34), iPosition:=2) + Else + clsDownloadFromIRIFunction.RemoveParameterByName("path") End If End Sub - 'Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click - ' Dim dlgSave As New FolderBrowserDialog - ' Dim strTempDownloadDirectory As String - ' 'dlgSave. = "Create Temporary Directory" - ' strTempDownloadDirectory = System.IO.Path.Combine(System.IO.Path.GetTempPath() & "R_Instat_Temp_IRI_Download") - ' dlgSave.RootFolder = strTempDownloadDirectory - ' 'frmMain.clsInstatOptions.strWorkingDirectory - ' 'dlgSave.Filter = "Text separated file (*.txt)|*.txt" - ' If dlgSave.ShowDialog = DialogResult.OK Then - ' If dlgSave.RootFolder <> "" Then - ' ucrInputExportFile.SetName(Path.GetFullPath(dlgSave.RootFolder).ToString.Replace("\", "/")) - ' End If - ' End If - 'End Sub - - 'Private Sub ucrInputExportFile_Click(sender As Object, e As EventArgs) Handles ucrInputExportFile.Click - ' cmdBrowse_Click(sender, e) - 'End Sub - - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputMainDataName.ControlContentsChanged + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrPnlDownloadType.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrChkSaveFileLocation.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged TestOkEnabled() End Sub End Class \ No newline at end of file From e65e3981ede9feb7db4b0a7ede2c5da37fcae1ed Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 2 Sep 2020 21:27:31 +0300 Subject: [PATCH 100/277] changing default --- instat/dlgImportGriddedData.vb | 36 +++++++++++----------------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 4b8abae3047..eaa899a84b1 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -38,14 +38,12 @@ Public Class dlgImportGriddedData Private Sub InitialiseDialog() ucrBase.iHelpTopicID = 526 - ucrBase.clsRsyntax.iCallType = 2 - ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False ucrInputSource.SetParameter(New RParameter("source", 0)) + dctDownloadPairs.Add("NOAA_RFE2", Chr(34) & "NOAA_RFE2" & Chr(34)) dctDownloadPairs.Add("CHIRPS_V2P0", Chr(34) & "CHIRPS_V2P0" & Chr(34)) dctDownloadPairs.Add("TAMSAT", Chr(34) & "TAMSAT" & Chr(34)) dctDownloadPairs.Add("NOAA_ARC2", Chr(34) & "NOAA_ARC2" & Chr(34)) - dctDownloadPairs.Add("NOAA_RFE2", Chr(34) & "NOAA_RFE2" & Chr(34)) dctDownloadPairs.Add("NOAA_CMORPH_DAILY", Chr(34) & "NOAA_CMORPH_DAILY" & Chr(34)) dctDownloadPairs.Add("NOAA_CMORPH_3HOURLY", Chr(34) & "NOAA_CMORPH_3HOURLY" & Chr(34)) dctDownloadPairs.Add("NOAA_CMORPH_DAILY_CALCULATED", Chr(34) & "NOAA_CMORPH_DAILY_CALCULATED" & Chr(34)) @@ -56,15 +54,7 @@ Public Class dlgImportGriddedData ucrInputSource.SetDropDownStyleAsNonEditable() ucrInputData.SetParameter(New RParameter("data", 1)) - dctFiles.Add("Daily_0p05", Chr(34) & "daily_0p05" & Chr(34)) - dctFiles.Add("Daily_0p25", Chr(34) & "daily_0p25" & Chr(34)) - dctFiles.Add("Daily_Improved 0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) - dctFiles.Add("Daily_Improved 0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) - dctFiles.Add("Dekad", Chr(34) & "dekad" & Chr(34)) - dctFiles.Add("Monthly_c8113", Chr(34) & "monthly_c8113" & Chr(34)) - dctFiles.Add("Monthly_deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) - dctFiles.Add("Monthly_NMME_deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) - dctFiles.Add("Monthly_Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) + dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.SetDropDownStyleAsNonEditable() @@ -119,8 +109,8 @@ Public Class dlgImportGriddedData ucrChkSaveFileLocation.AddParameterPresentCondition(False, "path", False) ucrChkWholeRange.SetText("Whole range") - ucrChkWholeRange.AddParameterPresentCondition(True, {"min_date", "max_date"}) - ucrChkWholeRange.AddParameterPresentCondition(False, {"min_date", "max_date"}, False) + ucrChkWholeRange.AddParameterPresentCondition(False, {"min_date", "max_date"}) + ucrChkWholeRange.AddParameterPresentCondition(True, {"min_date", "max_date"}, False) clsDefaultStartDate = New RFunction clsDefaultStartDate.SetRCommand("as.Date") @@ -135,8 +125,8 @@ Public Class dlgImportGriddedData clsDownloadFromIRIFunction = New RFunction clsDownloadFromIRIFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$download_from_IRI") - clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "CHIRPS_V2P0" & Chr(34), iPosition:=0) - clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "daily_0p05" & Chr(34), iPosition:=1) + clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NOAA_RFE2" & Chr(34), iPosition:=0) + clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "daily_estimated_prcp" & Chr(34), iPosition:=1) 'clsDownloadFromIRIFunction.AddParameter("path", Chr(34) & System.IO.Path.Combine(System.IO.Path.GetTempPath()).Replace("\", "/") & Chr(34), iPosition:=2) 'opted to set this as default location since it has data for all sources clsDownloadFromIRIFunction.AddParameter("min_lon", 10, iPosition:=3) @@ -182,6 +172,11 @@ Public Class dlgImportGriddedData Private Sub ucrInputSource_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSource.ControlValueChanged Select Case ucrInputSource.GetText + Case "NOAA_RFE2" + dctFiles = New Dictionary(Of String, String) + dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) + ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." Case "CHIRPS_V2P0" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily_0p05", Chr(34) & "daily_0p05" & Chr(34)) @@ -211,11 +206,6 @@ Public Class dlgImportGriddedData 'monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." - Case "NOAA_RFE2" - dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) - ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." Case "NOAA_CMORPH_DAILY", "NOAA_CMORPH_3HOURLY", "NOAA_CMORPH_DAILY_CALCULATED" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Mean_Microwave_Only_Est._Prcp.", Chr(34) & "mean_microwave_only_est_prcp" & Chr(34)) @@ -257,10 +247,6 @@ Public Class dlgImportGriddedData ucrInputNewDataFrameName.SetName(ucrInputSource.GetText & "_" & ucrInputData.GetText) End Sub - Private Sub ucrInputDownloadFrom_ControlValueChanged(ucrChangedControl As ucrCore) - - End Sub - Private Sub ucrInputFilePath_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFilePath.ControlValueChanged, ucrChkSaveFileLocation.ControlValueChanged If ucrChkSaveFileLocation.Checked AndAlso ucrInputFilePath.GetText <> "" Then clsDownloadFromIRIFunction.AddParameter("path", Chr(34) & ucrInputFilePath.GetText & Chr(34), iPosition:=2) From fc69d60954422cfabd297fdb86de34ea8d2e07c1 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Thu, 3 Sep 2020 13:56:38 +0300 Subject: [PATCH 101/277] climsoft wizard dialog --- instat/dlgClimsoftWizard.Designer.vb | 41 +++++++++ instat/dlgClimsoftWizard.resx | 120 +++++++++++++++++++++++++++ instat/dlgClimsoftWizard.vb | 3 + instat/instat.vbproj | 9 ++ 4 files changed, 173 insertions(+) create mode 100644 instat/dlgClimsoftWizard.Designer.vb create mode 100644 instat/dlgClimsoftWizard.resx create mode 100644 instat/dlgClimsoftWizard.vb diff --git a/instat/dlgClimsoftWizard.Designer.vb b/instat/dlgClimsoftWizard.Designer.vb new file mode 100644 index 00000000000..828e4c21565 --- /dev/null +++ b/instat/dlgClimsoftWizard.Designer.vb @@ -0,0 +1,41 @@ + +Partial Class dlgClimsoftWizard + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + + Private Sub InitializeComponent() + Me.SuspendLayout() + ' + 'dlgClimsoftWizard + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(800, 450) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgClimsoftWizard" + Me.ShowIcon = False + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Import From Climsoft" + Me.ResumeLayout(False) + + End Sub +End Class diff --git a/instat/dlgClimsoftWizard.resx b/instat/dlgClimsoftWizard.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgClimsoftWizard.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgClimsoftWizard.vb b/instat/dlgClimsoftWizard.vb new file mode 100644 index 00000000000..8f4f5d4b2d2 --- /dev/null +++ b/instat/dlgClimsoftWizard.vb @@ -0,0 +1,3 @@ +Public Class dlgClimsoftWizard + +End Class \ No newline at end of file diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 26ea7ba3acc..11e81a3cc88 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -196,6 +196,12 @@ Form + + dlgClimsoftWizard.vb + + + Form + dlgCompareSummary.vb @@ -2539,6 +2545,9 @@ dlgCircular.vb + + dlgClimsoftWizard.vb + dlgCompareSummary.vb From 3231e36694238ce6ea02c13a530d93da809f837b Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 3 Sep 2020 15:30:59 +0300 Subject: [PATCH 102/277] default start date --- instat/dlgImportGriddedData.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index eaa899a84b1..817751f83a0 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -109,12 +109,12 @@ Public Class dlgImportGriddedData ucrChkSaveFileLocation.AddParameterPresentCondition(False, "path", False) ucrChkWholeRange.SetText("Whole range") - ucrChkWholeRange.AddParameterPresentCondition(False, {"min_date", "max_date"}) - ucrChkWholeRange.AddParameterPresentCondition(True, {"min_date", "max_date"}, False) + ucrChkWholeRange.AddParameterPresentCondition(True, {"min_date", "max_date"}) + ucrChkWholeRange.AddParameterPresentCondition(False, {"min_date", "max_date"}, False) clsDefaultStartDate = New RFunction clsDefaultStartDate.SetRCommand("as.Date") - clsDefaultStartDate.AddParameter("x", Chr(34) & "1981/01/01" & Chr(34)) + clsDefaultStartDate.AddParameter("x", Chr(34) & "2000/10/31" & Chr(34)) clsDefaultEndDate = New RFunction clsDefaultEndDate.SetRCommand("as.Date") From 6fc93baa7819eeb3e9a47d0821705dc5e9f8b65a Mon Sep 17 00:00:00 2001 From: N-thony Date: Thu, 3 Sep 2020 17:22:42 +0200 Subject: [PATCH 103/277] Adding the summary R function in dlgInventory --- instat/dlgInventoryPlot.designer.vb | 252 +++--- instat/dlgInventoryPlot.resx | 733 ++++++++++++------ instat/dlgInventoryPlot.vb | 146 +++- .../InstatObject/R/stand_alone_functions.R | 183 +++++ 4 files changed, 963 insertions(+), 351 deletions(-) diff --git a/instat/dlgInventoryPlot.designer.vb b/instat/dlgInventoryPlot.designer.vb index e8b1b33970a..a48f349a569 100644 --- a/instat/dlgInventoryPlot.designer.vb +++ b/instat/dlgInventoryPlot.designer.vb @@ -44,24 +44,31 @@ Partial Class dlgInventoryPlot Me.lblStation = New System.Windows.Forms.Label() Me.cmdInventoryPlotOptions = New System.Windows.Forms.Button() Me.lblElement = New System.Windows.Forms.Label() - Me.lblFacetBy = New System.Windows.Forms.Label() - Me.grpPlotType = New System.Windows.Forms.GroupBox() - Me.rdoyear_doy_plot = New System.Windows.Forms.RadioButton() - Me.rdoDatePlot = New System.Windows.Forms.RadioButton() - Me.ucrPnlPlotType = New instat.UcrPanel() - Me.ucrChkDisplayRainDays = New instat.ucrCheck() - Me.ucrInputFacetBy = New instat.ucrInputComboBox() + Me.rdoElementOrder = New System.Windows.Forms.RadioButton() + Me.rdoDateOrder = New System.Windows.Forms.RadioButton() + Me.pnlDetails = New System.Windows.Forms.Panel() + Me.pnlSummary = New System.Windows.Forms.Panel() + Me.ucrChkOmitStart = New instat.ucrCheck() + Me.ucrChkSummary = New instat.ucrCheck() + Me.ucrChkDetails = New instat.ucrCheck() + Me.ucrChkOmitEnd = New instat.ucrCheck() + Me.ucrPnlOrder = New instat.UcrPanel() + Me.ucrChkMinute = New instat.ucrCheck() + Me.ucrChkSecond = New instat.ucrCheck() + Me.ucrChkYear = New instat.ucrCheck() + Me.ucrChkMonth = New instat.ucrCheck() + Me.ucrChkDay = New instat.ucrCheck() + Me.ucrChkHour = New instat.ucrCheck() + Me.ucrPnls = New instat.UcrPanel() Me.ucrReceiverDate = New instat.ucrReceiverSingle() - Me.ucrInputTitle = New instat.ucrInputTextBox() Me.ucrReceiverElements = New instat.ucrReceiverMultiple() - Me.ucrChkShowNonMissing = New instat.ucrCheck() - Me.ucrSaveGraph = New instat.ucrSave() - Me.ucrChkFlipCoordinates = New instat.ucrCheck() Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.ucrInventoryPlotSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.lblGraphTitle = New System.Windows.Forms.Label() - Me.grpPlotType.SuspendLayout() + Me.rdoSummary = New System.Windows.Forms.RadioButton() + Me.rdoGraph = New System.Windows.Forms.RadioButton() + Me.pnlDetails.SuspendLayout() + Me.pnlSummary.SuspendLayout() Me.SuspendLayout() ' 'cmdOptions @@ -91,51 +98,112 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.lblElement, "lblElement") Me.lblElement.Name = "lblElement" ' - 'lblFacetBy + 'rdoElementOrder ' - resources.ApplyResources(Me.lblFacetBy, "lblFacetBy") - Me.lblFacetBy.Name = "lblFacetBy" + resources.ApplyResources(Me.rdoElementOrder, "rdoElementOrder") + Me.rdoElementOrder.Name = "rdoElementOrder" + Me.rdoElementOrder.TabStop = True + Me.rdoElementOrder.UseVisualStyleBackColor = True ' - 'grpPlotType + 'rdoDateOrder ' - Me.grpPlotType.Controls.Add(Me.rdoyear_doy_plot) - Me.grpPlotType.Controls.Add(Me.rdoDatePlot) - Me.grpPlotType.Controls.Add(Me.ucrPnlPlotType) - resources.ApplyResources(Me.grpPlotType, "grpPlotType") - Me.grpPlotType.Name = "grpPlotType" - Me.grpPlotType.TabStop = False + resources.ApplyResources(Me.rdoDateOrder, "rdoDateOrder") + Me.rdoDateOrder.Name = "rdoDateOrder" + Me.rdoDateOrder.TabStop = True + Me.rdoDateOrder.UseVisualStyleBackColor = True ' - 'rdoyear_doy_plot + 'pnlDetails ' - resources.ApplyResources(Me.rdoyear_doy_plot, "rdoyear_doy_plot") - Me.rdoyear_doy_plot.Name = "rdoyear_doy_plot" - Me.rdoyear_doy_plot.TabStop = True - Me.rdoyear_doy_plot.UseVisualStyleBackColor = True + Me.pnlDetails.Controls.Add(Me.ucrChkMinute) + Me.pnlDetails.Controls.Add(Me.ucrChkSecond) + Me.pnlDetails.Controls.Add(Me.ucrChkYear) + Me.pnlDetails.Controls.Add(Me.ucrChkMonth) + Me.pnlDetails.Controls.Add(Me.ucrChkDay) + Me.pnlDetails.Controls.Add(Me.ucrChkHour) + resources.ApplyResources(Me.pnlDetails, "pnlDetails") + Me.pnlDetails.Name = "pnlDetails" ' - 'rdoDatePlot + 'pnlSummary ' - resources.ApplyResources(Me.rdoDatePlot, "rdoDatePlot") - Me.rdoDatePlot.Name = "rdoDatePlot" - Me.rdoDatePlot.TabStop = True - Me.rdoDatePlot.UseVisualStyleBackColor = True + Me.pnlSummary.Controls.Add(Me.ucrChkOmitStart) + Me.pnlSummary.Controls.Add(Me.rdoElementOrder) + Me.pnlSummary.Controls.Add(Me.ucrChkSummary) + Me.pnlSummary.Controls.Add(Me.ucrChkDetails) + Me.pnlSummary.Controls.Add(Me.rdoDateOrder) + Me.pnlSummary.Controls.Add(Me.ucrChkOmitEnd) + Me.pnlSummary.Controls.Add(Me.ucrPnlOrder) + resources.ApplyResources(Me.pnlSummary, "pnlSummary") + Me.pnlSummary.Name = "pnlSummary" ' - 'ucrPnlPlotType + 'ucrChkOmitStart ' - resources.ApplyResources(Me.ucrPnlPlotType, "ucrPnlPlotType") - Me.ucrPnlPlotType.Name = "ucrPnlPlotType" + Me.ucrChkOmitStart.Checked = False + resources.ApplyResources(Me.ucrChkOmitStart, "ucrChkOmitStart") + Me.ucrChkOmitStart.Name = "ucrChkOmitStart" ' - 'ucrChkDisplayRainDays + 'ucrChkSummary ' - Me.ucrChkDisplayRainDays.Checked = False - resources.ApplyResources(Me.ucrChkDisplayRainDays, "ucrChkDisplayRainDays") - Me.ucrChkDisplayRainDays.Name = "ucrChkDisplayRainDays" + Me.ucrChkSummary.Checked = False + resources.ApplyResources(Me.ucrChkSummary, "ucrChkSummary") + Me.ucrChkSummary.Name = "ucrChkSummary" ' - 'ucrInputFacetBy + 'ucrChkDetails ' - Me.ucrInputFacetBy.AddQuotesIfUnrecognised = True - Me.ucrInputFacetBy.IsReadOnly = False - resources.ApplyResources(Me.ucrInputFacetBy, "ucrInputFacetBy") - Me.ucrInputFacetBy.Name = "ucrInputFacetBy" + Me.ucrChkDetails.Checked = False + resources.ApplyResources(Me.ucrChkDetails, "ucrChkDetails") + Me.ucrChkDetails.Name = "ucrChkDetails" + ' + 'ucrChkOmitEnd + ' + Me.ucrChkOmitEnd.Checked = False + resources.ApplyResources(Me.ucrChkOmitEnd, "ucrChkOmitEnd") + Me.ucrChkOmitEnd.Name = "ucrChkOmitEnd" + ' + 'ucrPnlOrder + ' + resources.ApplyResources(Me.ucrPnlOrder, "ucrPnlOrder") + Me.ucrPnlOrder.Name = "ucrPnlOrder" + ' + 'ucrChkMinute + ' + Me.ucrChkMinute.Checked = False + resources.ApplyResources(Me.ucrChkMinute, "ucrChkMinute") + Me.ucrChkMinute.Name = "ucrChkMinute" + ' + 'ucrChkSecond + ' + Me.ucrChkSecond.Checked = False + resources.ApplyResources(Me.ucrChkSecond, "ucrChkSecond") + Me.ucrChkSecond.Name = "ucrChkSecond" + ' + 'ucrChkYear + ' + Me.ucrChkYear.Checked = False + resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") + Me.ucrChkYear.Name = "ucrChkYear" + ' + 'ucrChkMonth + ' + Me.ucrChkMonth.Checked = False + resources.ApplyResources(Me.ucrChkMonth, "ucrChkMonth") + Me.ucrChkMonth.Name = "ucrChkMonth" + ' + 'ucrChkDay + ' + Me.ucrChkDay.Checked = False + resources.ApplyResources(Me.ucrChkDay, "ucrChkDay") + Me.ucrChkDay.Name = "ucrChkDay" + ' + 'ucrChkHour + ' + Me.ucrChkHour.Checked = False + resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") + Me.ucrChkHour.Name = "ucrChkHour" + ' + 'ucrPnls + ' + resources.ApplyResources(Me.ucrPnls, "ucrPnls") + Me.ucrPnls.Name = "ucrPnls" ' 'ucrReceiverDate ' @@ -146,14 +214,6 @@ Partial Class dlgInventoryPlot Me.ucrReceiverDate.strNcFilePath = "" Me.ucrReceiverDate.ucrSelector = Nothing ' - 'ucrInputTitle - ' - Me.ucrInputTitle.AddQuotesIfUnrecognised = True - Me.ucrInputTitle.IsMultiline = False - Me.ucrInputTitle.IsReadOnly = False - resources.ApplyResources(Me.ucrInputTitle, "ucrInputTitle") - Me.ucrInputTitle.Name = "ucrInputTitle" - ' 'ucrReceiverElements ' Me.ucrReceiverElements.frmParent = Me @@ -163,23 +223,6 @@ Partial Class dlgInventoryPlot Me.ucrReceiverElements.strNcFilePath = "" Me.ucrReceiverElements.ucrSelector = Nothing ' - 'ucrChkShowNonMissing - ' - Me.ucrChkShowNonMissing.Checked = False - resources.ApplyResources(Me.ucrChkShowNonMissing, "ucrChkShowNonMissing") - Me.ucrChkShowNonMissing.Name = "ucrChkShowNonMissing" - ' - 'ucrSaveGraph - ' - resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") - Me.ucrSaveGraph.Name = "ucrSaveGraph" - ' - 'ucrChkFlipCoordinates - ' - Me.ucrChkFlipCoordinates.Checked = False - resources.ApplyResources(Me.ucrChkFlipCoordinates, "ucrChkFlipCoordinates") - Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" - ' 'ucrReceiverStation ' Me.ucrReceiverStation.frmParent = Me @@ -191,6 +234,7 @@ Partial Class dlgInventoryPlot ' 'ucrInventoryPlotSelector ' + Me.ucrInventoryPlotSelector.bDropUnusedFilterLevels = False Me.ucrInventoryPlotSelector.bShowHiddenColumns = False Me.ucrInventoryPlotSelector.bUseCurrentFilter = True resources.ApplyResources(Me.ucrInventoryPlotSelector, "ucrInventoryPlotSelector") @@ -201,29 +245,38 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'lblGraphTitle + 'rdoSummary + ' + resources.ApplyResources(Me.rdoSummary, "rdoSummary") + Me.rdoSummary.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoSummary.FlatAppearance.BorderSize = 2 + Me.rdoSummary.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoSummary.Name = "rdoSummary" + Me.rdoSummary.UseVisualStyleBackColor = True + ' + 'rdoGraph ' - resources.ApplyResources(Me.lblGraphTitle, "lblGraphTitle") - Me.lblGraphTitle.Name = "lblGraphTitle" + resources.ApplyResources(Me.rdoGraph, "rdoGraph") + Me.rdoGraph.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraph.FlatAppearance.BorderSize = 2 + Me.rdoGraph.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraph.Name = "rdoGraph" + Me.rdoGraph.UseVisualStyleBackColor = True ' 'dlgInventoryPlot ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.Controls.Add(Me.lblGraphTitle) - Me.Controls.Add(Me.ucrChkDisplayRainDays) - Me.Controls.Add(Me.grpPlotType) - Me.Controls.Add(Me.lblFacetBy) - Me.Controls.Add(Me.ucrInputFacetBy) + Me.Controls.Add(Me.rdoGraph) + Me.Controls.Add(Me.rdoSummary) + Me.Controls.Add(Me.pnlSummary) + Me.Controls.Add(Me.pnlDetails) + Me.Controls.Add(Me.ucrPnls) Me.Controls.Add(Me.lblElement) Me.Controls.Add(Me.ucrReceiverDate) - Me.Controls.Add(Me.ucrInputTitle) Me.Controls.Add(Me.cmdInventoryPlotOptions) Me.Controls.Add(Me.lblDate) Me.Controls.Add(Me.ucrReceiverElements) - Me.Controls.Add(Me.ucrChkShowNonMissing) - Me.Controls.Add(Me.ucrSaveGraph) - Me.Controls.Add(Me.ucrChkFlipCoordinates) Me.Controls.Add(Me.cmdOptions) Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.ucrReceiverStation) @@ -234,8 +287,9 @@ Partial Class dlgInventoryPlot Me.MinimizeBox = False Me.Name = "dlgInventoryPlot" Me.Tag = "Inventory_Plot" - Me.grpPlotType.ResumeLayout(False) - Me.grpPlotType.PerformLayout() + Me.pnlDetails.ResumeLayout(False) + Me.pnlSummary.ResumeLayout(False) + Me.pnlSummary.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -243,23 +297,29 @@ Partial Class dlgInventoryPlot Friend WithEvents ucrBase As ucrButtons Friend WithEvents ucrInventoryPlotSelector As ucrSelectorByDataFrameAddRemove Friend WithEvents cmdOptions As Button - Friend WithEvents ucrChkFlipCoordinates As ucrCheck - Friend WithEvents ucrSaveGraph As ucrSave - Friend WithEvents ucrChkShowNonMissing As ucrCheck Friend WithEvents lblDate As Label Friend WithEvents ucrReceiverElements As ucrReceiverMultiple Friend WithEvents lblStation As Label Friend WithEvents ucrReceiverStation As ucrReceiverSingle Friend WithEvents cmdInventoryPlotOptions As Button - Friend WithEvents ucrInputTitle As ucrInputTextBox Friend WithEvents ucrReceiverDate As ucrReceiverSingle Friend WithEvents lblElement As Label - Friend WithEvents ucrPnlPlotType As UcrPanel - Friend WithEvents lblFacetBy As Label - Friend WithEvents ucrInputFacetBy As ucrInputComboBox - Friend WithEvents grpPlotType As GroupBox - Friend WithEvents rdoyear_doy_plot As RadioButton - Friend WithEvents rdoDatePlot As RadioButton - Friend WithEvents ucrChkDisplayRainDays As ucrCheck - Friend WithEvents lblGraphTitle As Label + Friend WithEvents ucrPnls As UcrPanel + Friend WithEvents rdoElementOrder As RadioButton + Friend WithEvents rdoDateOrder As RadioButton + Friend WithEvents ucrPnlOrder As UcrPanel + Friend WithEvents ucrChkOmitEnd As ucrCheck + Friend WithEvents ucrChkOmitStart As ucrCheck + Friend WithEvents ucrChkDetails As ucrCheck + Friend WithEvents ucrChkSummary As ucrCheck + Friend WithEvents pnlDetails As Panel + Friend WithEvents ucrChkMinute As ucrCheck + Friend WithEvents ucrChkSecond As ucrCheck + Friend WithEvents ucrChkYear As ucrCheck + Friend WithEvents ucrChkMonth As ucrCheck + Friend WithEvents ucrChkDay As ucrCheck + Friend WithEvents ucrChkHour As ucrCheck + Friend WithEvents pnlSummary As Panel + Friend WithEvents rdoGraph As RadioButton + Friend WithEvents rdoSummary As RadioButton End Class diff --git a/instat/dlgInventoryPlot.resx b/instat/dlgInventoryPlot.resx index 5de00a7b1cc..53cf2efdb4b 100644 --- a/instat/dlgInventoryPlot.resx +++ b/instat/dlgInventoryPlot.resx @@ -121,15 +121,19 @@ False + + + NoControl + - 10, 222 + 10, 244 121, 23 - 10 + 7 Options @@ -144,19 +148,22 @@ $this - 14 + 10 True + + NoControl + - 263, 20 + 263, 42 33, 13 - 1 + 24 Date: @@ -171,19 +178,22 @@ $this - 9 + 8 True + + NoControl + - 263, 178 + 263, 200 91, 13 - 5 + 26 Station (Optional): @@ -198,19 +208,22 @@ $this - 15 + 11 False + + NoControl + - 10, 194 + 10, 216 121, 23 - 7 + 6 Inventory Plot Options @@ -225,19 +238,22 @@ $this - 8 + 7 True + + NoControl + - 263, 59 + 263, 81 59, 13 - 3 + 25 Element(s): @@ -254,324 +270,599 @@ 5 - + True - - 215, 278 + + NoControl - - 52, 13 + + 239, 31 - - 8 + + 92, 17 - - Facet By: + + 13 - - lblFacetBy + + Element Order - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + rdoElementOrder - - $this + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + pnlSummary + + + 1 - + True - - 92, 21 + + NoControl - - 100, 17 + + 117, 31 - - 2 + + 77, 17 + + + 12 - - Year - DOY Plot + + Date Order - - rdoyear_doy_plot + + rdoDateOrder - + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpPlotType + + pnlSummary - + + 4 + + + ucrChkMinute + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlDetails + + 0 - - True + + ucrChkSecond - - 15, 21 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 69, 17 + + pnlDetails - + 1 - - Date Plot + + ucrChkYear - - rdoDatePlot + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + pnlDetails - - grpPlotType + + 2 - - 1 + + ucrChkMonth - - 6, 13 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 189, 33 + + pnlDetails - - 0 + + 3 - - ucrPnlPlotType + + ucrChkDay - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpPlotType + + pnlDetails - - 2 + + 4 + + + ucrChkHour - - 10, 255 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 201, 53 + + pnlDetails - - 12 + + 5 + + + 120, 329 - - Plot Type + + 249, 92 - - grpPlotType + + 22 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + pnlDetails - + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - + + 3 + + + ucrChkOmitStart + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 0 + + + ucrChkSummary + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + 2 - - 10, 340 + + ucrChkDetails - - 151, 20 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 18 + + pnlSummary + + + 3 - - ucrChkDisplayRainDays + + ucrChkOmitEnd - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + + pnlSummary + + + 5 + + + ucrPnlOrder + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 6 + + + 10, 275 + + + 376, 52 + + + 21 + + + pnlSummary + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 1 + + 2 - - 274, 274 + + 117, 3 - - 137, 21 + + 100, 20 - + 9 - - ucrInputFacetBy + + ucrChkOmitStart - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - $this + + pnlSummary - - 4 + + 0 - - True - - - 6, 13 + + 0, 3 - - 423, 475 + + 100, 20 - - True + + 8 + + + ucrChkSummary - - 10, 370 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 62, 13 + + pnlSummary - - 19 + + 2 - - Graph Title: + + 0, 31 - - lblGraphTitle + + 100, 20 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 11 - - $this + + ucrChkDetails + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 3 + + + 239, 3 + + + 100, 20 + + + 10 + + + ucrChkOmitEnd + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 5 + + + 110, 22 + + + 256, 25 + + + 38 + + + ucrPnlOrder + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 6 + + + 129, 36 + + + 100, 20 + + + 18 + + + ucrChkMinute - + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlDetails + + 0 - - 87, 367 + + 129, 65 + + + 100, 20 - - 204, 21 + + 19 + + + ucrChkSecond + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + + pnlDetails + + + 1 + + + 7, 8 + + + 100, 20 + + + 14 + + + ucrChkYear + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlDetails + + + 2 + + + 7, 36 + + + 100, 20 + + 15 - - ucrInputTitle + + ucrChkMonth - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - $this + + pnlDetails - - 7 + + 3 - - 263, 74 + + 7, 65 - - - 0, 0, 0, 0 + + 100, 20 - - 120, 100 + + 16 - + + ucrChkDay + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlDetails + + 4 - - ucrReceiverElements + + 129, 8 - - instat.ucrReceiverMultiple, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 100, 20 - + + 17 + + + ucrChkHour + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlDetails + + + 5 + + + 68, 3 + + + 277, 35 + + + 23 + + + ucrPnls + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + $this - - 10 + + 4 - - 171, 314 + + True + + + 6, 13 - - 151, 20 + + 423, 475 - - 11 + + Button - - False + + None - - ucrChkShowNonMissing + + Flat - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 206, 4 - + + 135, 27 + + + 2 + + + Graph + + + MiddleCenter + + + rdoGraph + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + $this - - 11 + + 0 - - 10, 394 + + Button - - 255, 24 + + Flat - - 16 + + NoControl + + + 72, 4 + + + 135, 27 + + + 1 + + + Summary - - ucrSaveGraph + + MiddleCenter - - instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + rdoSummary + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 12 + + 1 - - 10, 314 + + 263, 96 - - 151, 20 + + 0, 0, 0, 0 - - 13 + + 120, 100 - - ucrChkFlipCoordinates + + 5 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + ucrReceiverElements + + + instat.ucrReceiverMultiple, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 13 + + 9 - 263, 193 + 263, 215 0, 0, 0, 0 @@ -580,7 +871,7 @@ 120, 20 - 6 + 46 ucrReceiverStation @@ -592,10 +883,10 @@ $this - 16 + 12 - 10, 10 + 10, 32 0, 0, 0, 0 @@ -604,7 +895,7 @@ 210, 180 - 0 + 3 ucrInventoryPlotSelector @@ -616,16 +907,16 @@ $this - 17 + 13 - 10, 421 + 6, 421 410, 53 - 17 + 20 ucrBase @@ -637,13 +928,13 @@ $this - 18 + 14 CenterScreen - Inventory Plot + Inventory dlgInventoryPlot @@ -652,7 +943,7 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 263, 35 + 263, 57 0, 0, 0, 0 @@ -661,7 +952,7 @@ 120, 20 - 2 + 4 ucrReceiverDate diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 249e1ee07d4..986e306047c 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -19,6 +19,7 @@ Public Class dlgInventoryPlot Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private clsDefaultRFunction As New RFunction + Private clsClimaticSummary As New RFunction Private Sub dlgInventoryPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -60,50 +61,88 @@ Public Class dlgInventoryPlot ucrReceiverStation.SetParameterIsString() ucrReceiverStation.strSelectorHeading = "Factors" - ucrChkFlipCoordinates.SetParameter(New RParameter("coord_flip", 4)) - ucrChkFlipCoordinates.SetText("Flip Coordinates") - ucrChkFlipCoordinates.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ucrChkFlipCoordinates.SetRDefault("FALSE") - - ucrInputTitle.SetParameter(New RParameter("graph_title", 5)) - ucrInputTitle.SetRDefault("Inventory Plot") - - ucrChkDisplayRainDays.SetParameter(New RParameter("display_rain_days", 13), bNewChangeParameterValue:=True) - ucrChkDisplayRainDays.SetText("Display Rain Days") - ucrChkDisplayRainDays.SetRDefault("FALSE") - - ucrChkShowNonMissing.SetText("Show Non Missing") - ucrChkShowNonMissing.Enabled = False ' this currently has no parameter associated with it - - ucrPnlPlotType.SetParameter(New RParameter("year_doy_plot")) - ucrPnlPlotType.AddRadioButton(rdoyear_doy_plot, "TRUE") - ucrPnlPlotType.AddRadioButton(rdoDatePlot, "FALSE") - ucrPnlPlotType.SetRDefault("FALSE") + ucrChkSummary.SetParameter(New RParameter("summary", 4)) + ucrChkSummary.SetText("Summary") + ucrChkSummary.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkSummary.SetRDefault("TRUE") + + ucrChkDetails.SetParameter(New RParameter("details", 5)) + ucrChkDetails.SetText("Details") + ucrChkDetails.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkDetails.SetRDefault("FALSE") + + ucrChkOmitStart.SetParameter(New RParameter("start", 10)) + ucrChkOmitStart.SetText("Omit Start") + ucrChkOmitStart.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkOmitStart.SetRDefault("TRUE") + + ucrChkOmitEnd.SetParameter(New RParameter("end", 11)) + ucrChkOmitEnd.SetText("Omit End") + ucrChkOmitEnd.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkOmitEnd.SetRDefault("FALSE") + + ucrChkYear.SetParameter(New RParameter("year", 9)) + ucrChkYear.SetText("Year") + ucrChkYear.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkYear.SetRDefault("FALSE") + + ucrChkMonth.SetParameter(New RParameter("month", 8)) + ucrChkMonth.SetText("Month") + ucrChkMonth.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkMonth.SetRDefault("FALSE") + + ucrChkDay.SetParameter(New RParameter("day", 7)) + ucrChkDay.SetText("Day") + ucrChkDay.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkDay.SetRDefault("TRUE") + + ' ucrChkHour.SetParameter(New RParameter("", 13)) + ucrChkHour.SetText("Hour") + ' ucrChkHour.SetRDefault("FALSE") + + ' ucrChkMinute.SetParameter(New RParameter("", 13)) + ucrChkMinute.SetText("Minute") + ' ucrChkMinute.SetRDefault("FALSE") + + ' ucrChkSecond.SetParameter(New RParameter("", 13)) + ucrChkSecond.SetText("Second") + ' ucrChkSecond.SetRDefault("FALSE") + + ucrPnlOrder.SetParameter(New RParameter("order", 6)) + ucrPnlOrder.AddRadioButton(rdoDateOrder, "FALSE") + ucrPnlOrder.AddRadioButton(rdoElementOrder, "TRUE") + ucrPnlOrder.SetRDefault("FALSE") + + ucrPnls.AddRadioButton(rdoSummary) + ucrPnls.AddRadioButton(rdoGraph) + + ucrPnls.AddFunctionNamesCondition(rdoSummary, "climatic.summary") + ucrPnls.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") + ucrPnls.AddToLinkedControls(ucrChkSummary, {rdoSummary}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnls.AddToLinkedControls(ucrChkDetails, {rdoSummary}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDay.SetLinkedDisplayControl(pnlDetails) + ucrChkSummary.SetLinkedDisplayControl(pnlSummary) + + rdoSummary.Checked = True Dim dctFacetByPairs As New Dictionary(Of String, String) - ucrInputFacetBy.SetParameter(New RParameter("facet_by")) + dctFacetByPairs.Add("Default", "NULL") dctFacetByPairs.Add("Elements", Chr(34) & "elements" & Chr(34)) dctFacetByPairs.Add("Stations", Chr(34) & "stations" & Chr(34)) dctFacetByPairs.Add("Stations-Elements", Chr(34) & "stations-elements" & Chr(34)) dctFacetByPairs.Add("Elements-Stations", Chr(34) & "elements-stations" & Chr(34)) - ucrInputFacetBy.SetItems(dctFacetByPairs) - ucrInputFacetBy.SetRDefault("NULL") - ucrInputFacetBy.SetDropDownStyleAsNonEditable() - - ucrSaveGraph.SetPrefix("Inventory") - ucrSaveGraph.SetSaveTypeAsGraph() - ucrSaveGraph.SetDataFrameSelector(ucrInventoryPlotSelector.ucrAvailableDataFrames) - ucrSaveGraph.SetCheckBoxText("Save Graph") - ucrSaveGraph.SetIsComboBox() - ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") + + + End Sub Private Sub SetDefaults() clsDefaultRFunction = New RFunction + clsClimaticSummary = New RFunction ucrInventoryPlotSelector.Reset() - ucrSaveGraph.Reset() ucrReceiverElements.SetMeAsReceiver() clsDefaultRFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") @@ -111,17 +150,30 @@ Public Class dlgInventoryPlot clsDefaultRFunction.AddParameter("year_doy_plot", "FALSE") clsDefaultRFunction.AddParameter("facet_by", "NULL") clsDefaultRFunction.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") + clsClimaticSummary.SetRCommand("climatic.summary") ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) TestOkEnabled() End Sub Private Sub SetRCodeForControls(bReset As Boolean) - SetRCode(Me, ucrBase.clsRsyntax.clsBaseFunction, bReset) + ucrInventoryPlotSelector.SetRCode(clsDefaultRFunction, bReset) + ucrReceiverDate.SetRCode(clsDefaultRFunction, bReset) + ucrReceiverStation.SetRCode(clsDefaultRFunction, bReset) + ucrReceiverElements.SetRCode(clsDefaultRFunction, bReset) + ucrChkSummary.SetRCode(clsClimaticSummary, bReset) + ucrChkDetails.SetRCode(clsClimaticSummary, bReset) + ucrChkYear.SetRCode(clsClimaticSummary, bReset) + ucrChkMonth.SetRCode(clsClimaticSummary, bReset) + ucrChkDay.SetRCode(clsClimaticSummary, bReset) + ucrChkOmitEnd.SetRCode(clsClimaticSummary, bReset) + ucrChkOmitStart.SetRCode(clsClimaticSummary, bReset) + ucrPnlOrder.SetRCode(clsClimaticSummary, bReset) + End Sub Private Sub TestOkEnabled() - If (Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrSaveGraph.IsComplete) Then + If (Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty) Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -140,7 +192,33 @@ Public Class dlgInventoryPlot TestOkEnabled() End Sub - Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveGraph.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrInputTitle.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged + Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged TestOkEnabled() End Sub + + Private Sub ucrInventoryPlotSelector_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInventoryPlotSelector.ControlValueChanged + clsClimaticSummary.AddParameter("data", clsRFunctionParameter:=ucrInventoryPlotSelector.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) + End Sub + + Private Sub ucrReceiverDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlValueChanged + clsClimaticSummary.AddParameter("date", clsRFunctionParameter:=ucrReceiverDate.GetVariables, iPosition:=1) + End Sub + + Private Sub ucrReceiverElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElements.ControlValueChanged + clsClimaticSummary.AddParameter("elements", ucrReceiverElements.GetVariableNames(bWithQuotes:=False), iPosition:=2) + End Sub + + Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged + clsClimaticSummary.AddParameter("stations", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) + End Sub + + Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnls.ControlValueChanged + If rdoSummary.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticSummary) + ucrBase.clsRsyntax.iCallType = 2 + Else + ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) + ucrBase.clsRsyntax.iCallType = 3 + End If + End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 7d26bbc0f53..5850cb9df20 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1282,3 +1282,186 @@ summary_sample <- function(x, size, replace = FALSE){ else if(length(x)==1){return(x)} else{sample(x = x, size = size, replace = replace)} } + +climatic.summary <- function(data, date, elements = ..., stations, summary = TRUE, details = FALSE, + order = FALSE, + day = TRUE, + month = FALSE, + year = FALSE, start = TRUE, end = FALSE){ + + # if there are no stations, set it as 1 + # (can otherwise just run the function without stations present in that brackets) + if (missing(stations)){ + data %>% mutate(stations = 1) + } + + if (missing(date)){ + stop('argument "date" is missing, with no default') + } + + if (missing(elements)){ + stop('argument "elements" is missing, with no default') + } + + i <- 0 + list_tables <- NULL + + # stack data + data.stack <- data %>% + tidyr::pivot_longer(cols = c({{ elements }}), + names_to = "Element", + values_to = "value") + + # sort start/end times + + # for summary == TRUE + if (summary == TRUE){ + i = i + 1 + # set start date + if (start == TRUE){ + data.stack <- data.stack %>% + dplyr::group_by({{ stations }}, Element) %>% + dplyr::mutate(start = ({{ date }})[which.min(is.na( value ))]) + + }else{ + data.stack <- data.stack %>% group_by({{ stations }}) %>% mutate(start = dplyr::first( {{ date }} )) + } + + # set end date + if (end == TRUE){ + data.stack <- data.stack %>% + group_by({{ stations }}, Element ) %>% + dplyr::mutate(end = ({{ date }} )[dplyr::last(which(!is.na( value )))]) + }else{ + data.stack <- data.stack %>% group_by({{ stations }} ) %>% mutate(end = dplyr::last({{ date }})) + } + + # number and percentage missing + summary.data <- data.frame(data.stack %>% + group_by({{stations}}, Element) %>% + filter(({{date}}) >= start & ({{date}}) <= end) %>% + summarise(From = dplyr::first(start), + To = dplyr::last(end), + Missing = sum(is.na(value)), + Percentage = sum(is.na(value))/n()*100)) + + # complete years + complete.years <- data.stack %>% + group_by({{stations}}) %>% + filter(({{date}}) >= start & ({{date}}) <= end) %>% + group_by(lubridate::year({{date}}), {{stations}}, Element) %>% + summarise(count = sum(is.na(value))) + complete.years <- complete.years %>% + group_by({{stations}}, Element) %>% + summarise(Complete.Years = sum(count == 0)) + + + # bind together + summary.data <- merge(summary.data, complete.years) + + if (missing(stations)){ + summary.data$stations <- NULL + } + + # } + #print(summary.data) + list_tables[[i]] <- summary.data + } + + + + if (details == TRUE){ + + if (day != TRUE & month != TRUE & year != TRUE){ + warning('At least one of day, month, year need to be selected if details == TRUE') + } + + if (day == TRUE){ + i = i + 1 + detail.table.day = data.stack %>% + group_by({{stations}}, Element) %>% + mutate(element.na = data.table::rleid(value)) %>% + filter(is.na(value)) %>% + group_by(element.na, {{stations}}, Element) %>% + summarise(From = dplyr::first({{date}}), + To = dplyr::last({{date}}), + Count = n()) + + if (order == TRUE){ + detail.table.day <- detail.table.day %>% arrange(From) + } else { + detail.table.day <- detail.table.day %>% arrange(Element) + } + + detail.table.day <- detail.table.day %>% ungroup() %>% dplyr::select(-c("element.na")) + list_tables[[i]] <- detail.table.day + + } + + if (month == TRUE){ + i = i + 1 + detail.table.month <- data.stack %>% + mutate(Date.ym = zoo::as.yearmon({{date}})) %>% + group_by(Date.ym, {{stations}}, Element) + + detail.table.month <- detail.table.month %>% + summarise(no = n(), + na = sum(is.na(value)), + From = dplyr::first({{date}}), + To = dplyr::last({{date}})) %>% + mutate(is.complete = ifelse(no == na, 1, 0)) # 0 if all are missing + + detail.table.month <- detail.table.month %>% + group_by({{stations}}, Element) %>% + mutate(element.na = data.table::rleid(is.complete)) %>% + filter(is.complete == 1) %>% + group_by(element.na, {{stations}}, Element) %>% + summarise(From = dplyr::first(From), + To = dplyr::last(To), + Count = n()) + + if (order == TRUE){ + detail.table.month <- detail.table.month %>% arrange(From) + } else { + detail.table.month <- detail.table.month %>% arrange(Element) + } + + detail.table.month <- detail.table.month %>% ungroup() %>% dplyr::select(-c("element.na")) + list_tables[[i]] <- detail.table.month + } + + if (year == TRUE) { + i = i + 1 + detail.table.year <- data.stack %>% + mutate(Date.y = lubridate::year({{date}})) %>% + group_by(Date.y, {{stations}}, Element) + + detail.table.year <- detail.table.year %>% + summarise(no = n(), + na = sum(is.na(value)), + From = dplyr::first({{date}}), + To = dplyr::last({{date}})) %>% + mutate(is.complete = ifelse(no == na, 1, 0)) # 0 if all are missing + + detail.table.year <- detail.table.year %>% + group_by({{stations}}, Element) %>% + mutate(element.na = data.table::rleid(is.complete)) %>% + filter(is.complete == 1) %>% + group_by(element.na, {{stations}}, Element) %>% + summarise(From = dplyr::first(From), + To = dplyr::last(To), + Count = n()) + + if (order == TRUE){ + detail.table.year <- detail.table.year %>% arrange(From) + } else { + detail.table.year <- detail.table.year %>% arrange(Element) + } + + detail.table.year <- detail.table.year %>% ungroup() %>% dplyr::select(-c("element.na")) + list_tables[[i]] <- detail.table.year + } + } + + return(list_tables) +} From 4034ef9785f2d8b84f0de1a39f9390e3c5d1c4aa Mon Sep 17 00:00:00 2001 From: N-thony Date: Thu, 3 Sep 2020 19:17:55 +0200 Subject: [PATCH 104/277] Making Summary radiobutton default checked --- instat/dlgInventoryPlot.vb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 986e306047c..d369a1ef131 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -109,8 +109,8 @@ Public Class dlgInventoryPlot ' ucrChkSecond.SetRDefault("FALSE") ucrPnlOrder.SetParameter(New RParameter("order", 6)) - ucrPnlOrder.AddRadioButton(rdoDateOrder, "FALSE") - ucrPnlOrder.AddRadioButton(rdoElementOrder, "TRUE") + ucrPnlOrder.AddRadioButton(rdoDateOrder, "TRUE") + ucrPnlOrder.AddRadioButton(rdoElementOrder, "FALSE") ucrPnlOrder.SetRDefault("FALSE") ucrPnls.AddRadioButton(rdoSummary) @@ -124,7 +124,6 @@ Public Class dlgInventoryPlot ucrChkDay.SetLinkedDisplayControl(pnlDetails) ucrChkSummary.SetLinkedDisplayControl(pnlSummary) - rdoSummary.Checked = True Dim dctFacetByPairs As New Dictionary(Of String, String) @@ -151,7 +150,7 @@ Public Class dlgInventoryPlot clsDefaultRFunction.AddParameter("facet_by", "NULL") clsDefaultRFunction.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") clsClimaticSummary.SetRCommand("climatic.summary") - ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) + ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticSummary) TestOkEnabled() End Sub @@ -169,7 +168,7 @@ Public Class dlgInventoryPlot ucrChkOmitEnd.SetRCode(clsClimaticSummary, bReset) ucrChkOmitStart.SetRCode(clsClimaticSummary, bReset) ucrPnlOrder.SetRCode(clsClimaticSummary, bReset) - + ucrPnls.SetRCode(clsClimaticSummary, bReset) End Sub Private Sub TestOkEnabled() From fb2caa98911cd40e654106de082fbcfad498e303 Mon Sep 17 00:00:00 2001 From: N-thony Date: Thu, 3 Sep 2020 19:33:56 +0200 Subject: [PATCH 105/277] Making summary radiobutton default checked --- instat/dlgInventoryPlot.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index d369a1ef131..d7e4d870502 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -115,7 +115,6 @@ Public Class dlgInventoryPlot ucrPnls.AddRadioButton(rdoSummary) ucrPnls.AddRadioButton(rdoGraph) - ucrPnls.AddFunctionNamesCondition(rdoSummary, "climatic.summary") ucrPnls.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") ucrPnls.AddToLinkedControls(ucrChkSummary, {rdoSummary}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) From 4b91ded2600371bb80a2c32606d4275389c9e2fc Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 4 Sep 2020 18:59:46 +0300 Subject: [PATCH 106/277] BUg fixes and fixed download method to 'libcurl' --- instat/static/InstatObject/R/instat_object_R6.R | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 024981711b7..ff2b8eeabdb 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2091,10 +2091,10 @@ DataBook$set("public","package_check", function(package) { DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ init_URL <- "https://iridl.ldeo.columbia.edu/" if(source == "CHIRPS_V2P0"){prexyaddress <- paste0(init_URL, "SOURCES/.UCSB/.CHIRPS/.v2p0") - if(data == "daily_0p05") {extension <- ".daily/.global/.0p05/.prcp"} - else if(data == "daily_0p25") {extension <- ".daily/.global/.0p25/.prcp"} - else if(data == "daily_improved_0p05") {extension <- ".daily-improved/.global/.0p05/.prcp"} + if(data == "daily_0p25") {extension <- ".daily/.global/.0p25/.prcp"} else if(data == "daily_improved_0p25") {extension <- ".daily-improved/.global/.0p25/.prcp"} + else if (data == "daily_0p05") {extension <- ".daily/.global/.0p05/.prcp"} + else if(data == "daily_improved_0p05") {extension <- ".daily-improved/.global/.0p05/.prcp"} else if(data == "dekad") {extension <- ".dekad/.prcp"} else if(data == "monthly_c8113") {extension <- ".monthly/.global/.c8113/.precipitation"} else if(data == "monthly_deg1p0") {extension <- ".monthly/.global/.deg1p0/.precipitation"} @@ -2104,6 +2104,7 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi #Annual and 2Monthly and 3monthly does not exist for CHIRPS_V2P0 }else if(source == "TAMSAT") {prexyaddress <-paste0(init_URL, "home/.remic/.Reading/.Meteorology/.TAMSAT") if(data == "rainfall_estimates") {extension <- ".TAMSAT-RFE/.rfe"} + else if(data == "rainfall_estimates_0p1") {extension <- ".TAMSAT-RFE_0p1/.rfe"} else if(data == "reconstructed_rainfall_anomaly") {extension <- ".TAMSAT-RFE/.rfediff"} else if(data == "sahel_dry_mask") {extension <- ".TAMSAT-RFE/.sahel_drymask"} else if(data == "SPI_1_dekad") {extension <- ".TAMSAT-RFE/.SPI-rfe_1-dekad_Sahel"} @@ -2119,12 +2120,12 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi }else if(source=="NOAA_CMORPH_DAILY" || source=="NOAA_CMORPH_3HOURLY" || source=="NOAA_CMORPH_DAILY_CALCULATED") { if(source=="NOAA_CMORPH_DAILY") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.daily")} else if(source == "NOAA_CMORPH_3HOURLY") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.3-hourly")} - if(source == "NOAA_CMORPH_DAILY_CALCULATED") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated")} + else if(source == "NOAA_CMORPH_DAILY_CALCULATED") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated")} if(data == "mean_microwave_only_est_prcp") {extension <- ".mean/.microwave-only/.comb"} else if(data == "mean_morphed_est_prcp") {extension <- ".mean/.morphed/.cmorph"} - if(data == "orignames_mean_microwave_only_est_prcp") {extension <- ".orignames/.mean/.microwave-only/.comb"} + else if(data == "orignames_mean_microwave_only_est_prcp") {extension <- ".orignames/.mean/.microwave-only/.comb"} else if(data == "orignames_mean_morphed_est_prcp") {extension <- ".orignames/.mean/.morphed/.cmorph"} - if(data == "renamed102015_mean_microwave_only_est_prcp") {extension <- ".renamed102015/.mean/.microwave-only/.comb"} + else if(data == "renamed102015_mean_microwave_only_est_prcp") {extension <- ".renamed102015/.mean/.microwave-only/.comb"} else if(data == "renamed102015_mean_morphed_est_prcp") {extension <- ".renamed102015/.mean/.morphed/.cmorph"} else stop("Data file does not exist for NOAA CMORPH data") }else if(source=="NASA_TRMM_3B42") {prexyaddress <- paste0(init_URL, "SOURCES/.NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") @@ -2140,7 +2141,7 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi if(!missing(min_date)&!missing(max_date)){URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date)} URL <- URL %>% add_nc() file_name <- tempfile(name, tmpdir = path, fileext = ".nc") - result <- download.file(url = URL, destfile = file_name, method = "auto", mode = "wb", cacheOK = FALSE) + result <- download.file(url = URL, destfile = file_name, method = "libcurl", mode = "wb", cacheOK = FALSE) if(import & result == 0) { nc <- ncdf4::nc_open(filename = file_name) self$import_NetCDF(nc = nc, name = name) From eaea1de2509a07f3fc3484511d0d9c583968b4db Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 4 Sep 2020 19:00:37 +0300 Subject: [PATCH 107/277] code rearrangements and removed commented code --- instat/dlgImportGriddedData.vb | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 817751f83a0..1f23e2e4843 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -47,8 +47,6 @@ Public Class dlgImportGriddedData dctDownloadPairs.Add("NOAA_CMORPH_DAILY", Chr(34) & "NOAA_CMORPH_DAILY" & Chr(34)) dctDownloadPairs.Add("NOAA_CMORPH_3HOURLY", Chr(34) & "NOAA_CMORPH_3HOURLY" & Chr(34)) dctDownloadPairs.Add("NOAA_CMORPH_DAILY_CALCULATED", Chr(34) & "NOAA_CMORPH_DAILY_CALCULATED" & Chr(34)) - 'dctDownloadPairs.Add("NOAA_CMORPH_PENTAD", Chr(34) & "NOAA_CMORPH_PENTAD" & Chr(34)) - 'dctDownloadPairs.Add("NOAA_CMORPH_V0PX", Chr(34) & "NOAA_CMORPH_V0PX" & Chr(34)) dctDownloadPairs.Add("NASA_TRMM_3B42", Chr(34) & "NASA_TRMM_3B42" & Chr(34)) ucrInputSource.SetItems(dctDownloadPairs) ucrInputSource.SetDropDownStyleAsNonEditable() @@ -179,24 +177,24 @@ Public Class dlgImportGriddedData ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." Case "CHIRPS_V2P0" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily_0p05", Chr(34) & "daily_0p05" & Chr(34)) dctFiles.Add("Daily_0p25", Chr(34) & "daily_0p25" & Chr(34)) - dctFiles.Add("Daily_Improved_0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) dctFiles.Add("Daily_Improved_0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) + dctFiles.Add("Daily_0p05", Chr(34) & "daily_0p05" & Chr(34)) + dctFiles.Add("Daily_Improved_0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) dctFiles.Add("Dekad", Chr(34) & "dekad" & Chr(34)) dctFiles.Add("Monthly_c8113", Chr(34) & "monthly_c8113" & Chr(34)) dctFiles.Add("Monthly_deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) dctFiles.Add("Monthly_NMME_deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) dctFiles.Add("Monthly_Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "Daily_0p05" + ucrInputData.cboInput.SelectedItem = "Daily_0p25" Case "TAMSAT" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Rainfall_Estimates", Chr(34) & "rainfall_estimates" & Chr(34)) + dctFiles.Add("Rainfall_Estimates_0p1", Chr(34) & "rainfall_estimates_0p1" & Chr(34)) dctFiles.Add("Reconstructed_Rainfall_Anomaly", Chr(34) & "reconstructed_rainfall_anomaly" & Chr(34)) dctFiles.Add("Sahel_Dry_Mask", Chr(34) & "sahel_dry_mask" & Chr(34)) dctFiles.Add("Standard_Precipitation_Index_1-dekad", Chr(34) & "SPI_1_dekad" & Chr(34)) - 'monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Rainfall_Estimates" Case "NOAA_ARC2" @@ -208,16 +206,14 @@ Public Class dlgImportGriddedData ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." Case "NOAA_CMORPH_DAILY", "NOAA_CMORPH_3HOURLY", "NOAA_CMORPH_DAILY_CALCULATED" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Mean_Microwave_Only_Est._Prcp.", Chr(34) & "mean_microwave_only_est_prcp" & Chr(34)) dctFiles.Add("Mean_Morphed_Est._Prcp.", Chr(34) & "mean_morphed_est_prcp" & Chr(34)) + dctFiles.Add("Mean_Microwave_Only_Est._Prcp.", Chr(34) & "mean_microwave_only_est_prcp" & Chr(34)) dctFiles.Add("Orignames_Mean_Microwave_Only_Est._Prcp.", Chr(34) & "orignames_mean_microwave_only_est_prcp" & Chr(34)) dctFiles.Add("Orignames_Mean_Morphed_Est._Prcp.", Chr(34) & "orignames_mean_morphed_est_prcp" & Chr(34)) dctFiles.Add("Renamed102015_Mean_Microwave_Only_Est._Prcp.", Chr(34) & "renamed102015_mean_microwave_only_est_prcp" & Chr(34)) dctFiles.Add("Renamed102015_Mean_Morphed_Est._Prcp.", Chr(34) & "renamed102015_mean_morphed_est_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Mean_Morphed_Est._Prcp." - 'ElseIf ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_CMORPH_PENTAD" Then - 'ElseIf ucrInputDownloadFrom.cboInput.SelectedItem = "NOAA_CMORPH_V0PX" Then Case "NASA_TRMM_3B42" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) @@ -227,7 +223,6 @@ Public Class dlgImportGriddedData ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." End Select - 'other data sources to be added here. End Sub Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click From 69957cc505df6fdcabc7a4bc1338ab6be1a412fa Mon Sep 17 00:00:00 2001 From: patowhiz Date: Sat, 5 Sep 2020 05:58:23 +0300 Subject: [PATCH 108/277] fixed the coord_polar bug --- instat/dlgBarAndPieChart.vb | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/instat/dlgBarAndPieChart.vb b/instat/dlgBarAndPieChart.vb index 311f09226a3..f55d2b72b6e 100644 --- a/instat/dlgBarAndPieChart.vb +++ b/instat/dlgBarAndPieChart.vb @@ -71,8 +71,10 @@ Public Class dlgBarAndPieChart ucrPnlOptions.AddRadioButton(rdoBarChart) ucrPnlOptions.AddRadioButton(rdoPieChart) - ucrPnlOptions.AddParameterPresentCondition(rdoPieChart, "coord_polar") - ucrPnlOptions.AddParameterPresentCondition(rdoBarChart, "coord_polar", False) + + 'commented out because the parameter can be present in both radio buttons option. See issue #5950 + 'ucrPnlOptions.AddParameterPresentCondition(rdoPieChart, "coord_polar") + 'ucrPnlOptions.AddParameterPresentCondition(rdoBarChart, "coord_polar", False) ucrPnlOptions.AddToLinkedControls({ucrChkFlipCoordinates}, {rdoBarChart}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls(ucrInputBarChartPosition, {rdoBarChart}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -155,6 +157,7 @@ Public Class dlgBarAndPieChart ucrBarChartSelector.SetGgplotFunction(clsBaseOperator) ucrReceiverFirst.SetMeAsReceiver() ucrSaveBar.Reset() + rdoBarChart.Checked = True 'done manually here because the ucrPanel has no set R code bResetSubdialog = True bResetBarLayerSubdialog = True @@ -205,7 +208,11 @@ Public Class dlgBarAndPieChart ucrReceiverByFactor.SetRCode(clsBarAesFunction, bReset) ucrSaveBar.SetRCode(clsBaseOperator, bReset) ucrBarChartSelector.SetRCode(clsRggplotFunction, bReset) - ucrPnlOptions.SetRCode(clsBaseOperator, bReset) + + 'commented until when there is unique parameters that can be used as parameter present condition setting + 'for determining the radio button that will be checked. Currently its done manually. See issue #5950 + 'ucrPnlOptions.SetRCode(clsBaseOperator, bReset) + ucrChkFlipCoordinates.SetRCode(clsBaseOperator, bReset) ucrInputBarChartPosition.SetRCode(clsRgeomBarFunction, bReset) ucrInputYValue.SetRCode(clsRgeomBarFunction, bReset) From 9f55b95de01ad3a0a87e790c6ac75fbf6d4a1211 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 7 Sep 2020 17:50:40 +0300 Subject: [PATCH 109/277] Minor changes --- instat/dlgDisplayDailyData.Designer.vb | 38 ++- instat/dlgDisplayDailyData.resx | 338 +++++++++++++------------ instat/dlgDisplayDailyData.vb | 24 +- 3 files changed, 206 insertions(+), 194 deletions(-) diff --git a/instat/dlgDisplayDailyData.Designer.vb b/instat/dlgDisplayDailyData.Designer.vb index 3cdac09881e..a565fa46cdd 100644 --- a/instat/dlgDisplayDailyData.Designer.vb +++ b/instat/dlgDisplayDailyData.Designer.vb @@ -55,10 +55,10 @@ Partial Class dlgDisplayDailyData Me.grpFacet = New System.Windows.Forms.GroupBox() Me.lblScales = New System.Windows.Forms.Label() Me.lblFacetby = New System.Windows.Forms.Label() - Me.lblNumberOfColumns = New System.Windows.Forms.Label() Me.rdoGraphByYear = New System.Windows.Forms.RadioButton() Me.lblGRugColour = New System.Windows.Forms.Label() - Me.ucrInputGRugColur = New instat.ucrInputComboBox() + Me.ucrSaveGraph = New instat.ucrSave() + Me.ucrInputGraphRugColur = New instat.ucrInputComboBox() Me.ucrChkSumMissing = New instat.ucrCheck() Me.ucrChkMax = New instat.ucrCheck() Me.ucrChkIQR = New instat.ucrCheck() @@ -69,7 +69,6 @@ Partial Class dlgDisplayDailyData Me.ucrReceiverMultipleElements = New instat.ucrReceiverMultiple() Me.ucrReceiverElement = New instat.ucrReceiverSingle() Me.ucrInputComboZero = New instat.ucrInputComboBox() - Me.ucrSaveGraph = New instat.ucrSave() Me.ucrInputRugColour = New instat.ucrInputComboBox() Me.ucrInputBarColour = New instat.ucrInputComboBox() Me.ucrNudUpperYaxis = New instat.ucrNud() @@ -192,7 +191,6 @@ Partial Class dlgDisplayDailyData Me.grpFacet.Controls.Add(Me.lblFacetby) Me.grpFacet.Controls.Add(Me.ucrNudNumberOfColumns) Me.grpFacet.Controls.Add(Me.ucrInputFacetBy) - Me.grpFacet.Controls.Add(Me.lblNumberOfColumns) Me.grpFacet.Controls.Add(Me.ucrChkNumberOfColumns) resources.ApplyResources(Me.grpFacet, "grpFacet") Me.grpFacet.Name = "grpFacet" @@ -208,11 +206,6 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.lblFacetby, "lblFacetby") Me.lblFacetby.Name = "lblFacetby" ' - 'lblNumberOfColumns - ' - resources.ApplyResources(Me.lblNumberOfColumns, "lblNumberOfColumns") - Me.lblNumberOfColumns.Name = "lblNumberOfColumns" - ' 'rdoGraphByYear ' resources.ApplyResources(Me.rdoGraphByYear, "rdoGraphByYear") @@ -228,12 +221,17 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.lblGRugColour, "lblGRugColour") Me.lblGRugColour.Name = "lblGRugColour" ' - 'ucrInputGRugColur + 'ucrSaveGraph + ' + resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") + Me.ucrSaveGraph.Name = "ucrSaveGraph" + ' + 'ucrInputGraphRugColur ' - Me.ucrInputGRugColur.AddQuotesIfUnrecognised = True - Me.ucrInputGRugColur.IsReadOnly = False - resources.ApplyResources(Me.ucrInputGRugColur, "ucrInputGRugColur") - Me.ucrInputGRugColur.Name = "ucrInputGRugColur" + Me.ucrInputGraphRugColur.AddQuotesIfUnrecognised = True + Me.ucrInputGraphRugColur.IsReadOnly = False + resources.ApplyResources(Me.ucrInputGraphRugColur, "ucrInputGraphRugColur") + Me.ucrInputGraphRugColur.Name = "ucrInputGraphRugColur" ' 'ucrChkSumMissing ' @@ -302,11 +300,6 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me.ucrInputComboZero, "ucrInputComboZero") Me.ucrInputComboZero.Name = "ucrInputComboZero" ' - 'ucrSaveGraph - ' - resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") - Me.ucrSaveGraph.Name = "ucrSaveGraph" - ' 'ucrInputRugColour ' Me.ucrInputRugColour.AddQuotesIfUnrecognised = True @@ -461,15 +454,15 @@ Partial Class dlgDisplayDailyData resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.Controls.Add(Me.ucrSaveGraph) - Me.Controls.Add(Me.ucrInputGRugColur) + Me.Controls.Add(Me.ucrInputGraphRugColur) Me.Controls.Add(Me.grpSummary) Me.Controls.Add(Me.lblGRugColour) Me.Controls.Add(Me.ucrReceiverMultipleElements) Me.Controls.Add(Me.rdoGraphByYear) Me.Controls.Add(Me.lblElements) + Me.Controls.Add(Me.grpGraph) Me.Controls.Add(Me.ucrReceiverElement) Me.Controls.Add(Me.ucrInputComboZero) - Me.Controls.Add(Me.grpGraph) Me.Controls.Add(Me.grpFacet) Me.Controls.Add(Me.ucrInputComboMissing) Me.Controls.Add(Me.ucrInputComboTrace) @@ -550,10 +543,9 @@ Partial Class dlgDisplayDailyData Friend WithEvents ucrInputFacetBy As ucrInputComboBox Friend WithEvents ucrChkNumberOfColumns As ucrCheck Friend WithEvents ucrNudNumberOfColumns As ucrNud - Friend WithEvents lblNumberOfColumns As Label Friend WithEvents grpFacet As GroupBox Friend WithEvents lblScales As Label Friend WithEvents ucrInputScale As ucrInputComboBox Friend WithEvents lblGRugColour As Label - Friend WithEvents ucrInputGRugColur As ucrInputComboBox + Friend WithEvents ucrInputGraphRugColur As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.resx b/instat/dlgDisplayDailyData.resx index 9aa87de5a68..2e3df68b0d1 100644 --- a/instat/dlgDisplayDailyData.resx +++ b/instat/dlgDisplayDailyData.resx @@ -378,15 +378,6 @@ 5 - - 83, 70 - - - 96, 21 - - - 6 - ucrInputRugColour @@ -399,24 +390,6 @@ 0 - - True - - - NoControl - - - 9, 75 - - - 57, 13 - - - 4 - - - Rug Color: - lblRugColor @@ -429,15 +402,6 @@ 1 - - 83, 43 - - - 96, 21 - - - 2 - ucrInputBarColour @@ -450,24 +414,6 @@ 2 - - True - - - NoControl - - - 9, 48 - - - 59, 13 - - - 2 - - - Bar Colour: - lblBarColour @@ -480,18 +426,6 @@ 3 - - 83, 13 - - - 4, 4, 4, 4 - - - 50, 23 - - - 3 - ucrNudUpperYaxis @@ -526,7 +460,67 @@ $this - 9 + 7 + + + True + + + NoControl + + + 9, 75 + + + 57, 13 + + + 4 + + + Rug Color: + + + lblRugColor + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraph + + + 1 + + + True + + + NoControl + + + 9, 48 + + + 59, 13 + + + 2 + + + Bar Colour: + + + lblBarColour + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpGraph + + + 3 True @@ -646,7 +640,7 @@ 10, 229 - 235, 133 + 235, 127 14 @@ -726,18 +720,6 @@ 4 - - lblNumberOfColumns - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFacet - - - 5 - ucrChkNumberOfColumns @@ -748,13 +730,13 @@ grpFacet - 6 + 5 12, 228 - 188, 124 + 203, 94 34 @@ -834,36 +816,6 @@ 2 - - True - - - NoControl - - - 3, 87 - - - 104, 13 - - - 33 - - - Number Of Columns: - - - lblNumberOfColumns - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpFacet - - - 5 - Button @@ -913,7 +865,7 @@ NoControl - 11, 373 + 11, 337 63, 13 @@ -936,25 +888,49 @@ 3 - - 77, 369 + + 9, 392 + + + 4, 5, 4, 5 + + + 261, 24 + + + 4 + + + ucrSaveGraph + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 - + + 77, 333 + + 97, 21 - + 35 - - ucrInputGRugColur + + ucrInputGraphRugColur - + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - + 1 @@ -1111,31 +1087,7 @@ 6, 13 - 423, 514 - - - 10, 419 - - - 4, 5, 4, 5 - - - 261, 24 - - - 4 - - - ucrSaveGraph - - - instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 0 + 423, 483 289, 253 @@ -1159,10 +1111,10 @@ $this - 7 + 8 - 121, 422 + 121, 363 99, 21 @@ -1180,10 +1132,10 @@ $this - 8 + 9 - 121, 368 + 121, 332 99, 21 @@ -1204,7 +1156,7 @@ 11 - 121, 395 + 121, 394 99, 21 @@ -1225,7 +1177,7 @@ 12 - 12, 371 + 12, 336 100, 20 @@ -1246,7 +1198,7 @@ 13 - 12, 424 + 12, 365 100, 20 @@ -1267,7 +1219,7 @@ 14 - 12, 396 + 12, 395 100, 20 @@ -1432,7 +1384,7 @@ 28 - 10, 447 + 9, 420 4, 4, 4, 4 @@ -1518,11 +1470,77 @@ 4 + + 83, 70 + + + 96, 21 + + + 6 + + + ucrInputRugColour + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraph + + + 0 + + + 83, 43 + + + 96, 21 + + + 2 + + + ucrInputBarColour + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraph + + + 2 + + + 83, 13 + + + 4, 4, 4, 4 + + + 50, 23 + + + 3 + + + ucrNudUpperYaxis + + + instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpGraph + + + 4 + 62, 12 - 105, 21 + 117, 21 35 @@ -1540,7 +1558,7 @@ 1 - 113, 86 + 129, 63 50, 23 @@ -1564,7 +1582,7 @@ 62, 37 - 105, 21 + 117, 21 31 @@ -1600,6 +1618,6 @@ grpFacet - 6 + 5 \ No newline at end of file diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index a01d441efc7..98b2608c8da 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -105,18 +105,18 @@ Public Class dlgDisplayDailyData ucrNudUpperYaxis.SetMinMax(0, Integer.MaxValue) - ucrInputGRugColur.SetParameter(New RParameter("colour", 1)) + ucrInputGraphRugColur.SetParameter(New RParameter("colour", 1)) dctGRugColour.Add("Blue", Chr(34) & "blue" & Chr(34)) dctGRugColour.Add("Red", Chr(34) & "red" & Chr(34)) dctGRugColour.Add("Yellow", Chr(34) & "yellow" & Chr(34)) dctGRugColour.Add("Green", Chr(34) & "green" & Chr(34)) dctGRugColour.Add("Violet", Chr(34) & "violet" & Chr(34)) - ucrInputGRugColur.SetItems(dctGRugColour) + ucrInputGraphRugColur.SetItems(dctGRugColour) ucrInputBarColour.SetParameter(New RParameter("bar_colour", 7)) - dctBarColour.Add("Blue", Chr(34) & "blue" & Chr(34)) dctBarColour.Add("Red", Chr(34) & "red" & Chr(34)) + dctBarColour.Add("Blue", Chr(34) & "blue" & Chr(34)) dctBarColour.Add("Yellow", Chr(34) & "yellow" & Chr(34)) dctBarColour.Add("Green", Chr(34) & "green" & Chr(34)) dctBarColour.Add("Violet", Chr(34) & "violet" & Chr(34)) @@ -156,7 +156,7 @@ Public Class dlgDisplayDailyData ucrChkNumberOfColumns.AddParameterPresentCondition(True, "ncol") ucrChkNumberOfColumns.AddParameterPresentCondition(False, "ncol", False) - ucrChkNumberOfColumns.SetText("Number of Columns") + ucrChkNumberOfColumns.SetText("Number of Column(s):") ucrInputScale.SetParameter(New RParameter("scales", 0)) dctScale.Add("Free_y", Chr(34) & "free_y" & Chr(34)) @@ -216,18 +216,20 @@ Public Class dlgDisplayDailyData ucrPnlFrequencyDisplay.AddParameterPresentCondition(rdoTable, "daily_table") ucrPnlFrequencyDisplay.AddToLinkedControls(ucrNudUpperYaxis, {rdoGraphByYear}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=100) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrReceiverMultipleElements, ucrInputFacetBy, ucrChkNumberOfColumns}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputScale, ucrInputGRugColur}, {rdoGraph}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputScale, ucrInputGraphRugColur}, {rdoGraph}, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboMissing, ucrChkMissing}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboTrace, ucrChkTrace}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls({ucrInputComboZero, ucrChkZero}, {rdoTable}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls(ucrChkSum, {rdoTable}, bNewLinkedHideIfParameterMissing:=True) ucrPnlFrequencyDisplay.AddToLinkedControls(ucrSaveGraph, {rdoGraph, rdoGraphByYear}, bNewLinkedHideIfParameterMissing:=True) ucrChkNumberOfColumns.AddToLinkedControls(ucrNudNumberOfColumns, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) - ucrNudNumberOfColumns.SetLinkedDisplayControl(lblNumberOfColumns) ucrChkSum.SetLinkedDisplayControl(grpSummary) ucrInputScale.SetLinkedDisplayControl(grpFacet) ucrInputScale.SetLinkedDisplayControl(lblScales) - ucrInputGRugColur.SetLinkedDisplayControl(lblGRugColour) + ucrInputGraphRugColur.SetLinkedDisplayControl(lblGRugColour) + ucrReceiverMultipleElements.SetLinkedDisplayControl(lblElements) + ucrReceiverElement.SetLinkedDisplayControl(lblElement) + ucrChkMissing.AddToLinkedControls({ucrInputComboMissing}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkTrace.AddToLinkedControls({ucrInputComboTrace}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="tr") @@ -392,7 +394,7 @@ Public Class dlgDisplayDailyData ucrInputScale.SetRCode(clsFacetFunction, bReset) ucrNudNumberOfColumns.SetRCode(clsFacetFunction, bReset) ucrChkNumberOfColumns.SetRCode(clsFacetFunction, bReset) - ucrInputGRugColur.SetRCode(clsGeomRugFunction, bReset) + ucrInputGraphRugColur.SetRCode(clsGeomRugFunction, bReset) End Sub Private Sub TestOkEnabled() @@ -415,9 +417,9 @@ Public Class dlgDisplayDailyData Private Sub DialogSize() If rdoGraphByYear.Checked Then - Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight * 0.86) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY / 1.2) - ucrSaveGraph.Location = New Point(ucrSaveGraph.Location.X, iSaveYLocation / 1.2) + Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight * 0.93) + ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY / 1.1) + ucrSaveGraph.Location = New Point(ucrSaveGraph.Location.X, iSaveYLocation / 1.1) ElseIf rdoTable.Checked OrElse rdoGraph.Checked Then Me.Size = New System.Drawing.Size(Me.Width, iBasicHeight) ucrBase.Location = New Point(ucrBase.Location.X, iBaseMaxY) From e1a5ec6d2bcdfeb1988eafb951592682ea4f5d44 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Tue, 8 Sep 2020 06:46:01 +0000 Subject: [PATCH 110/277] Added a new MenuItem to Structured Menu --- instat/frmMain.Designer.vb | 9 +- instat/frmMain.resx | 1126 ++++++++++++++++++------------------ 2 files changed, 577 insertions(+), 558 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 302a164c4c8..0e1432721e7 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -629,6 +629,7 @@ 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.mnuStructuredCircularCalculator = New System.Windows.Forms.ToolStripMenuItem() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3342,7 +3343,7 @@ Partial Class frmMain ' 'mnuStructuredCircular ' - Me.mnuStructuredCircular.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuStructuredCircularDefine}) + Me.mnuStructuredCircular.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuStructuredCircularDefine, Me.mnuStructuredCircularCalculator}) Me.mnuStructuredCircular.Name = "mnuStructuredCircular" resources.ApplyResources(Me.mnuStructuredCircular, "mnuStructuredCircular") ' @@ -3990,6 +3991,11 @@ Partial Class frmMain Me.mnuLogFile.Name = "mnuLogFile" resources.ApplyResources(Me.mnuLogFile, "mnuLogFile") ' + 'mnuStructuredCircularCalculator + ' + Me.mnuStructuredCircularCalculator.Name = "mnuStructuredCircularCalculator" + resources.ApplyResources(Me.mnuStructuredCircularCalculator, "mnuStructuredCircularCalculator") + ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4626,4 +4632,5 @@ Partial Class frmMain Friend WithEvents mnuClimaticCompareDensityPlot As ToolStripMenuItem Friend WithEvents mnuClimaticCompareConditionalQuantiles As ToolStripMenuItem Friend WithEvents mnuClimaticCompareTaylorDiagram As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularCalculator As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 1487e6bf72c..5fb624ad62f 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -118,20 +118,8 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 64, 20 - - - Describe - - - 172, 22 - - - One Variable - - 180, 22 + 146, 22 Summarise... @@ -157,11 +145,11 @@ Rating Data... - + 172, 22 - - Two Variables + + One Variable 146, 22 @@ -184,11 +172,11 @@ Frequencies... - + 172, 22 - - Three Variables + + Two Variables @@ -218,11 +206,11 @@ Frequencies - + 172, 22 - - Specific + + Three Variables 209, 22 @@ -311,11 +299,11 @@ Mosaic Plot... - + 172, 22 - - General + + Specific 188, 22 @@ -347,14 +335,14 @@ Use Summaries... - - 169, 6 - - + 172, 22 - - Multivariate + + General + + + 169, 6 203, 22 @@ -374,6 +362,12 @@ Canonical Correlations... + + 172, 22 + + + Multivariate + 169, 6 @@ -404,17 +398,11 @@ View Graph... - - 53, 20 - - - Model - - - 201, 22 + + 64, 20 - - Probability Distributions + + Describe 242, 22 @@ -437,14 +425,14 @@ Random Samples (Use Model)... - - 198, 6 - - + 201, 22 - - Fit Model + + Probability Distributions + + + 198, 6 223, 22 @@ -494,11 +482,11 @@ Fit Model Keyboard... - + 201, 22 - - Compare Models + + Fit Model 149, 22 @@ -506,11 +494,11 @@ One Variable... - + 201, 22 - - Use Model + + Compare Models 192, 22 @@ -554,14 +542,11 @@ Use Model Keyboard... - - False - - + 201, 22 - - Other (One Variable) + + Use Model 166, 22 @@ -596,14 +581,14 @@ Goodness of Fit... - + False - + 201, 22 - - Other (Two Variables) + + Other (One Variable) False @@ -650,14 +635,14 @@ Non Parameteric One Way ANOVA... - + False - + 201, 22 - - Other (Three Variable) + + Other (Two Variables) False @@ -680,14 +665,14 @@ Chi-square Test... - + False - + 201, 22 - - Other (General) + + Other (Three Variable) False @@ -716,6 +701,21 @@ Log Linear... + + False + + + 201, 22 + + + Other (General) + + + 53, 20 + + + Model + False @@ -740,15 +740,6 @@ False - - 212, 22 - - - Evaporation - - - False - False @@ -767,13 +758,13 @@ Penman... - + 212, 22 - - Crop + + Evaporation - + False @@ -794,6 +785,15 @@ Water Satisfaction Index... + + 212, 22 + + + Crop + + + False + False @@ -806,12 +806,6 @@ False - - 44, 20 - - - View - 211, 22 @@ -878,11 +872,11 @@ Reset to Default Layout - + 44, 20 - - Help + + View 221, 22 @@ -944,12 +938,6 @@ 218, 6 - - 221, 22 - - - Guides - 166, 22 @@ -971,195 +959,48 @@ More... - - False - - + 221, 22 - - About R-Instat - - - 221, 22 + + Guides - - Licence... + + False - + 221, 22 - - Acknowlegments - - - 538, 56 - - - 209, 6 - - - 638, 56 - - - 212, 22 - - - File - - - 209, 6 - - - 212, 22 - - - Tidy and Examine - - - 212, 22 - - - Dates - - - 212, 22 - - - Define Climatic Data... - - - 212, 22 - - - Check Data - - - 212, 22 - - - Prepare - - - 209, 6 - - - 212, 22 - - - Describe - - - 212, 22 - - - PICSA - - - 212, 22 - - - CM SAF - - - 198, 22 - - - Calculation... - - - 198, 22 - - - Summary... - - - 195, 6 - - - 198, 22 - - - Correlations... - - - 198, 22 - - - Scatterplot... - - - 198, 22 - - - Time Series Plot... - - - 198, 22 - - - Seasonal Plot... - - - 198, 22 - - - Density Plot... - - - 198, 22 - - - Conditional Quantiles... - - - 198, 22 - - - Taylor Diagram... - - - 212, 22 - - - Compare - - - 212, 22 - - - Mapping... - - - 212, 22 - - - Model - - - 209, 6 + + About R-Instat - - 212, 22 + + 221, 22 - - Seasonal Forecast Support + + Licence... - - 212, 22 + + 221, 22 - - Climate Methods + + Acknowlegments - - False + + 44, 20 - - 63, 20 + + Help - - Climatic + + 538, 56 + + + 209, 6 + + 638, 56 + 211, 22 @@ -1208,6 +1049,15 @@ Export to CPT... + + 212, 22 + + + File + + + 209, 6 + 211, 22 @@ -1286,6 +1136,12 @@ One Variable Frequencies + + 212, 22 + + + Tidy and Examine + 162, 22 @@ -1328,6 +1184,18 @@ Use Time... + + 212, 22 + + + Dates + + + 212, 22 + + + Define Climatic Data... + 178, 22 @@ -1373,6 +1241,12 @@ Homogenization... + + 212, 22 + + + Check Data + 189, 22 @@ -1532,6 +1406,15 @@ False + + 212, 22 + + + Prepare + + + 209, 6 + False @@ -1550,18 +1433,18 @@ Temperature... - - 199, 22 - - - Wind Speed/Direction... - 139, 22 Wind Rose... + + 199, 22 + + + Wind Speed/Direction... + False @@ -1586,6 +1469,12 @@ 196, 6 + + 212, 22 + + + Describe + 246, 22 @@ -1613,6 +1502,12 @@ Crops... + + 212, 22 + + + PICSA + 231, 22 @@ -1625,6 +1520,81 @@ Export to CM SAF R Toolbox... + + 212, 22 + + + CM SAF + + + 198, 22 + + + Calculation... + + + 198, 22 + + + Summary... + + + 195, 6 + + + 198, 22 + + + Correlations... + + + 198, 22 + + + Scatterplot... + + + 198, 22 + + + Time Series Plot... + + + 198, 22 + + + Seasonal Plot... + + + 198, 22 + + + Density Plot... + + + 198, 22 + + + Conditional Quantiles... + + + 198, 22 + + + Taylor Diagram... + + + 212, 22 + + + Compare + + + 212, 22 + + + Mapping... + 180, 22 @@ -1646,6 +1616,15 @@ Markov Modelling... + + 212, 22 + + + Model + + + 209, 6 + 246, 22 @@ -1685,11 +1664,11 @@ Cumulative/Exceedance Graph... - - 199, 22 + + 212, 22 - - Data Manipulation + + Seasonal Forecast Support False @@ -1826,11 +1805,11 @@ Output for CDT... - + 199, 22 - - Graphics + + Data Manipulation False @@ -1949,6 +1928,12 @@ Three Summaries... + + 199, 22 + + + Graphics + False @@ -1958,12 +1943,6 @@ Model... - - 199, 22 - - - Additional - False @@ -2009,6 +1988,12 @@ Water Balance... + + 199, 22 + + + Additional + False @@ -2018,6 +2003,21 @@ Create Climate Object... + + 212, 22 + + + Climate Methods + + + False + + + 63, 20 + + + Climatic + Ctrl+S @@ -2028,12 +2028,6 @@ Save... - - 232, 22 - - - Save As - 164, 22 @@ -2058,6 +2052,12 @@ Save Script As... + + 232, 22 + + + Save As + False @@ -2088,12 +2088,6 @@ Exit - - 39, 20 - - - Edit - False @@ -2178,12 +2172,24 @@ Select All + + 39, 20 + + + Edit + 775, 56 946, 56 + + 119, 17 + + + No worksheet loaded + 0, 460 @@ -2208,42 +2214,9 @@ 1 - - 119, 17 - - - No worksheet loaded - 17, 95 - - 0, 24 - - - No - - - 834, 37 - - - 7 - - - Tool - - - Tool_strip - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - Magenta @@ -2307,6 +2280,18 @@ Edit Last Dialog + + 57, 6 + + + False + + + 57, 6 + + + False + Magenta @@ -2316,17 +2301,17 @@ Last 10 Dialogs - - 57, 6 + + 128, 22 - - False + + R Viewer... - - 57, 6 + + 128, 22 - - False + + Plotly... @@ -2366,18 +2351,6 @@ View Last Graph - - 128, 22 - - - R Viewer... - - - 128, 22 - - - Plotly... - 6, 37 @@ -2399,6 +2372,18 @@ Output Window + + 196, 22 + + + Column Metadata... + + + 196, 22 + + + Data Frame Metadata... + iVBORw0KGgoAAAANSUhEUgAAAG8AAABvCAYAAADixZ5gAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -2455,17 +2440,17 @@ Column Metadata - - 196, 22 + + 160, 22 - - Column Metadata... + + Log Window... - - 196, 22 + + 160, 22 - - Data Frame Metadata... + + Script Window... @@ -2595,18 +2580,6 @@ Log Window - - 160, 22 - - - Log Window... - - - 160, 22 - - - Script Window... - Magenta @@ -2628,71 +2601,38 @@ He&lp - - 122, 95 - - - On - - - 37, 20 - - - File - - - 59, 20 - - - Prepare - - - 74, 20 - - - Structured - - - 88, 20 - - - Procurement - - - 122, 20 - - - Options by Context - - - 46, 20 - - - Tools + + 0, 24 - - 0, 0 + + No - - 834, 24 + + 834, 37 - - 6 + + 7 - - Menu_strip + + Tool - - mnuBar + + Tool_strip - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 3 + + 2 + + + 122, 95 + + + On Ctrl+N @@ -2766,12 +2706,6 @@ 229, 6 - - 232, 22 - - - Export - 204, 22 @@ -2796,6 +2730,12 @@ Export Graph As Image... + + 232, 22 + + + Export + 232, 22 @@ -2805,11 +2745,11 @@ 229, 6 - - 172, 22 + + 37, 20 - - Data Frame + + File 200, 22 @@ -2919,11 +2859,11 @@ Colour by Property... - + 172, 22 - - Check Data + + Data Frame 245, 22 @@ -3018,6 +2958,12 @@ Anonymise ID Column... + + 172, 22 + + + Check Data + 169, 6 @@ -3027,12 +2973,6 @@ Calculator... - - 172, 22 - - - Column: Calculate - 179, 22 @@ -3087,11 +3027,11 @@ Permute Columns... - + 172, 22 - - Column: Factor + + Column: Calculate 179, 22 @@ -3180,11 +3120,11 @@ Factor Data Frame... - + 172, 22 - - Column: Text + + Column: Factor 152, 22 @@ -3225,11 +3165,11 @@ Distance... - + 172, 22 - - Column: Date + + Column: Text 162, 22 @@ -3273,11 +3213,11 @@ Use Time... - + 172, 22 - - Column: Define + + Column: Date 176, 22 @@ -3294,14 +3234,14 @@ Circular... - - 169, 6 - - + 172, 22 - - Data Reshape + + Column: Define + + + 169, 6 193, 22 @@ -3363,14 +3303,14 @@ Transpose... - - 169, 6 - - + 172, 22 - - Keys and Links + + Data Reshape + + + 169, 6 207, 22 @@ -3402,11 +3342,11 @@ Add Comment... - + 172, 22 - - Data Object + + Keys and Links False @@ -3486,11 +3426,11 @@ Delete Metadata... - + 172, 22 - - R Objects + + Data Object 126, 22 @@ -3516,26 +3456,38 @@ Delete... - - 183, 6 + + 172, 22 - - 186, 22 + + R Objects - - Circular + + 59, 20 + + + Prepare + + + 183, 6 - 117, 22 + 180, 22 Define... - + + 180, 22 + + + Calculator... + + 186, 22 - - Low_Flow + + Circular 117, 22 @@ -3543,11 +3495,11 @@ Define... - + 186, 22 - - Survival + + Low_Flow 117, 22 @@ -3555,11 +3507,11 @@ Define... - + 186, 22 - - Time Series + + Survival 119, 22 @@ -3570,12 +3522,6 @@ 116, 6 - - 119, 22 - - - Describe - 149, 22 @@ -3588,14 +3534,14 @@ General... - - 116, 6 - - + 119, 22 - - Model + + Describe + + + 116, 6 149, 22 @@ -3609,9 +3555,21 @@ General... + + 119, 22 + + + Model + 116, 6 + + 186, 22 + + + Time Series + 183, 6 @@ -3633,6 +3591,12 @@ Options by Context... + + 74, 20 + + + Structured + 216, 22 @@ -3645,12 +3609,6 @@ Define Procurement Data... - - 216, 22 - - - Prepare - 358, 22 @@ -3705,11 +3663,11 @@ Merge Additional Data... - + 216, 22 - - Describe + + Prepare 211, 22 @@ -3726,12 +3684,6 @@ 208, 6 - - 211, 22 - - - Categorical - 319, 22 @@ -3771,11 +3723,11 @@ Display Top N... - + 211, 22 - - Numeric + + Categorical 258, 22 @@ -3798,11 +3750,17 @@ Correlations (Red Flags or others)... - + + 211, 22 + + + Numeric + + 216, 22 - - Mapping + + Describe 189, 22 @@ -3810,11 +3768,11 @@ Map Country Values... - + 216, 22 - - Model + + Mapping 292, 22 @@ -3828,6 +3786,12 @@ Fit Model... + + 216, 22 + + + Model + 213, 6 @@ -3837,12 +3801,6 @@ Define Red Flag Variables... - - 216, 22 - - - Corruption Risk Index - 278, 22 @@ -3855,11 +3813,17 @@ Summarise CRI by Country (or other)... - - 250, 22 + + 216, 22 - - Check Data + + Corruption Risk Index + + + 88, 20 + + + Procurement 215, 22 @@ -3894,17 +3858,17 @@ One Variable Frequencies... - + 250, 22 - - Define Options by Context Data... + + Check Data - + 250, 22 - - Prepare + + Define Options by Context Data... 282, 22 @@ -3933,11 +3897,11 @@ Unstack... - + 250, 22 - - Describe + + Prepare 224, 22 @@ -3960,11 +3924,11 @@ Boxplot... - + 250, 22 - - Model + + Describe 176, 22 @@ -3978,6 +3942,18 @@ General Fit Model... + + 250, 22 + + + Model + + + 122, 20 + + + Options by Context + False @@ -4044,6 +4020,36 @@ Options... + + 46, 20 + + + Tools + + + 0, 0 + + + 834, 24 + + + 6 + + + Menu_strip + + + mnuBar + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + 126, 22 @@ -9738,6 +9744,12 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuStructuredCircularCalculator + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain From 5321fd8a65c560b1d743a0fca5717ed853c802e5 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Tue, 8 Sep 2020 11:33:08 +0000 Subject: [PATCH 111/277] Setting the menus and the properties of the menu items. --- instat/dlgCalculator.vb | 3 +- instat/frmMain.Designer.vb | 169 +++++++++++++++++++++++++++---------- instat/frmMain.resx | 148 +++++++++++++++++++++++++++++++- instat/frmMain.vb | 20 +++++ instat/sdgSummaries.vb | 5 +- 5 files changed, 294 insertions(+), 51 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 873adf49098..910c245dd76 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -25,6 +25,7 @@ Public Class dlgCalculator Public bFirstLoad As Boolean = True Public iHelpCalcID As Integer Private iBasicWidth As Integer + Public strDefaultItem As String Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -53,7 +54,7 @@ Public Class dlgCalculator Private Sub SetDefaults() ucrCalc.ucrSaveResultInto.SetPrefix("Calc") - ucrCalc.ucrInputCalOptions.SetName("Basic") + ucrCalc.ucrInputCalOptions.SetName(strDefaultItem) ucrCalc.Reset() ucrCalc.chkShowParameters.Checked = False ucrCalc.chkSaveResultInto.Checked = True diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 0e1432721e7..3affe318178 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -615,14 +615,8 @@ Partial Class frmMain Me.splOverall = New System.Windows.Forms.SplitContainer() Me.splExtraWindows = New System.Windows.Forms.SplitContainer() Me.splMetadata = New System.Windows.Forms.SplitContainer() - Me.ucrColumnMeta = New instat.ucrColumnMetadata() - Me.ucrDataFrameMeta = New instat.ucrDataFrameMetadata() Me.splLogScript = New System.Windows.Forms.SplitContainer() - Me.ucrLogWindow = New instat.ucrLog() - Me.ucrScriptWindow = New instat.ucrScript() Me.splDataOutput = New System.Windows.Forms.SplitContainer() - Me.ucrDataViewer = New instat.ucrDataView() - Me.ucrOutput = New instat.ucrOutputWindow() Me.mnuRViewer = New System.Windows.Forms.ToolStripMenuItem() Me.mnuPlotly = New System.Windows.Forms.ToolStripMenuItem() Me.mnuColumnMetadata = New System.Windows.Forms.ToolStripMenuItem() @@ -630,6 +624,23 @@ Partial Class frmMain Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructuredCircularCalculator = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularSummaries = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator46 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuStructuredCircularScatterPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularDensityPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularRosePlot = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator67 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuStructuredCircularWindRose = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularWindPollutionRose = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularOtherRosePlots = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator68 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuStructuredCircularCirclize = New System.Windows.Forms.ToolStripMenuItem() + Me.ucrColumnMeta = New instat.ucrColumnMetadata() + Me.ucrDataFrameMeta = New instat.ucrDataFrameMetadata() + Me.ucrLogWindow = New instat.ucrLog() + Me.ucrScriptWindow = New instat.ucrScript() + Me.ucrDataViewer = New instat.ucrDataView() + Me.ucrOutput = New instat.ucrOutputWindow() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3343,7 +3354,7 @@ Partial Class frmMain ' 'mnuStructuredCircular ' - Me.mnuStructuredCircular.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuStructuredCircularDefine, Me.mnuStructuredCircularCalculator}) + Me.mnuStructuredCircular.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuStructuredCircularDefine, Me.mnuStructuredCircularCalculator, Me.mnuStructuredCircularSummaries, Me.ToolStripSeparator46, Me.mnuStructuredCircularScatterPlot, Me.mnuStructuredCircularDensityPlot, Me.mnuStructuredCircularRosePlot, Me.ToolStripSeparator67, Me.mnuStructuredCircularWindRose, Me.mnuStructuredCircularWindPollutionRose, Me.mnuStructuredCircularOtherRosePlots, Me.ToolStripSeparator68, Me.mnuStructuredCircularCirclize}) Me.mnuStructuredCircular.Name = "mnuStructuredCircular" resources.ApplyResources(Me.mnuStructuredCircular, "mnuStructuredCircular") ' @@ -3890,18 +3901,6 @@ Partial Class frmMain Me.splMetadata.Panel2.BackColor = System.Drawing.SystemColors.Control Me.splMetadata.Panel2.Controls.Add(Me.ucrDataFrameMeta) ' - 'ucrColumnMeta - ' - Me.ucrColumnMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrColumnMeta, "ucrColumnMeta") - Me.ucrColumnMeta.Name = "ucrColumnMeta" - ' - 'ucrDataFrameMeta - ' - Me.ucrDataFrameMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrDataFrameMeta, "ucrDataFrameMeta") - Me.ucrDataFrameMeta.Name = "ucrDataFrameMeta" - ' 'splLogScript ' Me.splLogScript.BackColor = System.Drawing.Color.LightGray @@ -3918,19 +3917,6 @@ Partial Class frmMain Me.splLogScript.Panel2.BackColor = System.Drawing.SystemColors.Control Me.splLogScript.Panel2.Controls.Add(Me.ucrScriptWindow) ' - 'ucrLogWindow - ' - Me.ucrLogWindow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrLogWindow, "ucrLogWindow") - Me.ucrLogWindow.Name = "ucrLogWindow" - ' - 'ucrScriptWindow - ' - Me.ucrScriptWindow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrScriptWindow, "ucrScriptWindow") - Me.ucrScriptWindow.Name = "ucrScriptWindow" - Me.ucrScriptWindow.Tag = "Script_Window" - ' 'splDataOutput ' Me.splDataOutput.BackColor = System.Drawing.Color.LightGray @@ -3947,20 +3933,6 @@ Partial Class frmMain Me.splDataOutput.Panel2.BackColor = System.Drawing.SystemColors.Control Me.splDataOutput.Panel2.Controls.Add(Me.ucrOutput) ' - 'ucrDataViewer - ' - Me.ucrDataViewer.BackColor = System.Drawing.SystemColors.Control - Me.ucrDataViewer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrDataViewer, "ucrDataViewer") - Me.ucrDataViewer.Name = "ucrDataViewer" - Me.ucrDataViewer.Tag = "Data_View" - ' - 'ucrOutput - ' - Me.ucrOutput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrOutput, "ucrOutput") - Me.ucrOutput.Name = "ucrOutput" - ' 'mnuRViewer ' Me.mnuRViewer.Name = "mnuRViewer" @@ -3996,6 +3968,100 @@ Partial Class frmMain Me.mnuStructuredCircularCalculator.Name = "mnuStructuredCircularCalculator" resources.ApplyResources(Me.mnuStructuredCircularCalculator, "mnuStructuredCircularCalculator") ' + 'mnuStructuredCircularSummaries + ' + Me.mnuStructuredCircularSummaries.Name = "mnuStructuredCircularSummaries" + resources.ApplyResources(Me.mnuStructuredCircularSummaries, "mnuStructuredCircularSummaries") + ' + 'ToolStripSeparator46 + ' + Me.ToolStripSeparator46.Name = "ToolStripSeparator46" + resources.ApplyResources(Me.ToolStripSeparator46, "ToolStripSeparator46") + ' + 'mnuStructuredCircularScatterPlot + ' + resources.ApplyResources(Me.mnuStructuredCircularScatterPlot, "mnuStructuredCircularScatterPlot") + Me.mnuStructuredCircularScatterPlot.Name = "mnuStructuredCircularScatterPlot" + ' + 'mnuStructuredCircularDensityPlot + ' + resources.ApplyResources(Me.mnuStructuredCircularDensityPlot, "mnuStructuredCircularDensityPlot") + Me.mnuStructuredCircularDensityPlot.Name = "mnuStructuredCircularDensityPlot" + ' + 'mnuStructuredCircularRosePlot + ' + resources.ApplyResources(Me.mnuStructuredCircularRosePlot, "mnuStructuredCircularRosePlot") + Me.mnuStructuredCircularRosePlot.Name = "mnuStructuredCircularRosePlot" + ' + 'ToolStripSeparator67 + ' + Me.ToolStripSeparator67.Name = "ToolStripSeparator67" + resources.ApplyResources(Me.ToolStripSeparator67, "ToolStripSeparator67") + ' + 'mnuStructuredCircularWindRose + ' + Me.mnuStructuredCircularWindRose.Name = "mnuStructuredCircularWindRose" + resources.ApplyResources(Me.mnuStructuredCircularWindRose, "mnuStructuredCircularWindRose") + ' + 'mnuStructuredCircularWindPollutionRose + ' + resources.ApplyResources(Me.mnuStructuredCircularWindPollutionRose, "mnuStructuredCircularWindPollutionRose") + Me.mnuStructuredCircularWindPollutionRose.Name = "mnuStructuredCircularWindPollutionRose" + ' + 'mnuStructuredCircularOtherRosePlots + ' + resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlots, "mnuStructuredCircularOtherRosePlots") + Me.mnuStructuredCircularOtherRosePlots.Name = "mnuStructuredCircularOtherRosePlots" + ' + 'ToolStripSeparator68 + ' + Me.ToolStripSeparator68.Name = "ToolStripSeparator68" + resources.ApplyResources(Me.ToolStripSeparator68, "ToolStripSeparator68") + ' + 'mnuStructuredCircularCirclize + ' + resources.ApplyResources(Me.mnuStructuredCircularCirclize, "mnuStructuredCircularCirclize") + Me.mnuStructuredCircularCirclize.Name = "mnuStructuredCircularCirclize" + ' + 'ucrColumnMeta + ' + Me.ucrColumnMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrColumnMeta, "ucrColumnMeta") + Me.ucrColumnMeta.Name = "ucrColumnMeta" + ' + 'ucrDataFrameMeta + ' + Me.ucrDataFrameMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrDataFrameMeta, "ucrDataFrameMeta") + Me.ucrDataFrameMeta.Name = "ucrDataFrameMeta" + ' + 'ucrLogWindow + ' + Me.ucrLogWindow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrLogWindow, "ucrLogWindow") + Me.ucrLogWindow.Name = "ucrLogWindow" + ' + 'ucrScriptWindow + ' + Me.ucrScriptWindow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrScriptWindow, "ucrScriptWindow") + Me.ucrScriptWindow.Name = "ucrScriptWindow" + Me.ucrScriptWindow.Tag = "Script_Window" + ' + 'ucrDataViewer + ' + Me.ucrDataViewer.BackColor = System.Drawing.SystemColors.Control + Me.ucrDataViewer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrDataViewer, "ucrDataViewer") + Me.ucrDataViewer.Name = "ucrDataViewer" + Me.ucrDataViewer.Tag = "Data_View" + ' + 'ucrOutput + ' + Me.ucrOutput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrOutput, "ucrOutput") + Me.ucrOutput.Name = "ucrOutput" + ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4633,4 +4699,15 @@ Partial Class frmMain Friend WithEvents mnuClimaticCompareConditionalQuantiles As ToolStripMenuItem Friend WithEvents mnuClimaticCompareTaylorDiagram As ToolStripMenuItem Friend WithEvents mnuStructuredCircularCalculator As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularSummaries As ToolStripMenuItem + Friend WithEvents ToolStripSeparator46 As ToolStripSeparator + Friend WithEvents mnuStructuredCircularScatterPlot As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularDensityPlot As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularRosePlot As ToolStripMenuItem + Friend WithEvents ToolStripSeparator67 As ToolStripSeparator + Friend WithEvents mnuStructuredCircularWindRose As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularWindPollutionRose As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularOtherRosePlots As ToolStripMenuItem + Friend WithEvents ToolStripSeparator68 As ToolStripSeparator + Friend WithEvents mnuStructuredCircularCirclize As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 5fb624ad62f..3f7d505e868 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -3472,17 +3472,92 @@ 183, 6 - 180, 22 + 192, 22 Define... - 180, 22 + 192, 22 Calculator... + + 192, 22 + + + Summaries... + + + 189, 6 + + + False + + + 192, 22 + + + Scatter Plot... + + + False + + + 192, 22 + + + Density Plot... + + + False + + + 192, 22 + + + Rose Plot... + + + 189, 6 + + + 192, 22 + + + Wind Rose... + + + False + + + 192, 22 + + + Wind/Pollution Rose... + + + False + + + 192, 22 + + + Other Rose Plots... + + + 189, 6 + + + False + + + 192, 22 + + + Circlize... + 186, 22 @@ -6285,6 +6360,9 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + + NoControl + R-Instat @@ -9750,6 +9828,72 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuStructuredCircularSummaries + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ToolStripSeparator46 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularScatterPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularDensityPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularRosePlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ToolStripSeparator67 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularWindRose + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularWindPollutionRose + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularOtherRosePlots + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ToolStripSeparator68 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularCirclize + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + frmMain diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 39edda45570..b3ff77d144b 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -559,6 +559,7 @@ Public Class frmMain End Sub Private Sub mnuPrepareRechapeColumnSummaries_Click(sender As Object, e As EventArgs) Handles mnuPrepareColumnReshapeColumnSummaries.Click + sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -1101,6 +1102,7 @@ Public Class frmMain End Sub Private Sub mnuDescribeGeneralColumnSummaries_Click(sender As Object, e As EventArgs) Handles mnuDescribeGeneralColumnSummaries.Click + sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -1492,6 +1494,7 @@ Public Class frmMain dlgColumnStats.strDefaultVariables = Nothing dlgColumnStats.strDefaultFactors = Nothing End If + sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -1644,6 +1647,7 @@ Public Class frmMain dlgColumnStats.strDefaultVariables = Nothing dlgColumnStats.strDefaultFactors = Nothing End If + sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -1670,6 +1674,7 @@ Public Class frmMain dlgColumnStats.strDefaultVariables = Nothing dlgColumnStats.strDefaultFactors = Nothing End If + sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -2002,6 +2007,7 @@ Public Class frmMain End Sub Private Sub mnuPrepareCalculateCalculations_Click(sender As Object, e As EventArgs) Handles mnuPrepareCalculator.Click + dlgCalculator.strDefaultItem = "Basic" dlgCalculator.ShowDialog() End Sub @@ -2170,4 +2176,18 @@ Public Class frmMain Private Sub mnuClimaticCompareDensityPlot_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareDensityPlot.Click dlgHistogram.ShowDialog() End Sub + + Private Sub mnuStructuredCircularSummaries_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularSummaries.Click + sdgSummaries.iIndex = 5 + dlgColumnStats.ShowDialog() + End Sub + + Private Sub mnuStructuredCircularWindRose_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularWindRose.Click + dlgWindrose.ShowDialog() + End Sub + + Private Sub mnuStructuredCircularCalculator_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularCalculator.Click + dlgCalculator.strDefaultItem = "Circular" + dlgCalculator.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index ad500da0e6c..534f14cbe99 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -26,7 +26,7 @@ Public Class sdgSummaries Private strWeightLabel As String Public bEnable2VariableTab As Boolean = True Public bOkEnabled As Boolean = True - + Public iIndex As Integer Private Sub sdgDescribe_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) tbTwoVariables.Enabled = bEnable2VariableTab @@ -363,6 +363,7 @@ Public Class sdgSummaries Public Sub SetRFunction(clsNewRFunction As RFunction, clsNewDefaultFunction As RFunction, clsNewConcFunction As RFunction, Optional ucrNewBaseSelector As ucrSelector = Nothing, Optional bReset As Boolean = False, Optional strNewWeightLabel As String = Nothing) If Not bControlsInitialised Then InitialiseControls() + End If clsListFunction = clsNewRFunction clsDefaultFunction = clsNewDefaultFunction @@ -481,7 +482,7 @@ Public Class sdgSummaries ucrChkVolumetricEfficiency.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) If bReset Then - tbSummaries.SelectedIndex = 0 + tbSummaries.SelectedIndex = iIndex ucrSelectorSecondVariable.Reset() ucrSelectorOrderBy.Reset() End If From 7fcf5ce32f1975772aa5e96d0157d6c6515bd479 Mon Sep 17 00:00:00 2001 From: N-thony Date: Wed, 9 Sep 2020 10:12:24 +0200 Subject: [PATCH 112/277] Making changes in the design and code of some comment --- instat/dlgInventoryPlot.designer.vb | 157 +++--- instat/dlgInventoryPlot.resx | 507 +++++++----------- instat/dlgInventoryPlot.vb | 33 +- .../InstatObject/R/stand_alone_functions.R | 26 +- 4 files changed, 323 insertions(+), 400 deletions(-) diff --git a/instat/dlgInventoryPlot.designer.vb b/instat/dlgInventoryPlot.designer.vb index a48f349a569..8a5bb33f6ba 100644 --- a/instat/dlgInventoryPlot.designer.vb +++ b/instat/dlgInventoryPlot.designer.vb @@ -39,44 +39,39 @@ Partial Class dlgInventoryPlot Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(dlgInventoryPlot)) - Me.cmdOptions = New System.Windows.Forms.Button() Me.lblDate = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() - Me.cmdInventoryPlotOptions = New System.Windows.Forms.Button() Me.lblElement = New System.Windows.Forms.Label() Me.rdoElementOrder = New System.Windows.Forms.RadioButton() Me.rdoDateOrder = New System.Windows.Forms.RadioButton() Me.pnlDetails = New System.Windows.Forms.Panel() - Me.pnlSummary = New System.Windows.Forms.Panel() - Me.ucrChkOmitStart = New instat.ucrCheck() - Me.ucrChkSummary = New instat.ucrCheck() - Me.ucrChkDetails = New instat.ucrCheck() - Me.ucrChkOmitEnd = New instat.ucrCheck() - Me.ucrPnlOrder = New instat.UcrPanel() + Me.ucrChkSaveDetails = New instat.ucrCheck() Me.ucrChkMinute = New instat.ucrCheck() Me.ucrChkSecond = New instat.ucrCheck() Me.ucrChkYear = New instat.ucrCheck() Me.ucrChkMonth = New instat.ucrCheck() Me.ucrChkDay = New instat.ucrCheck() Me.ucrChkHour = New instat.ucrCheck() + Me.pnlSummary = New System.Windows.Forms.Panel() + Me.ucrChkOmitStart = New instat.ucrCheck() + Me.ucrChkSummary = New instat.ucrCheck() + Me.ucrChkDetails = New instat.ucrCheck() + Me.ucrChkOmitEnd = New instat.ucrCheck() + Me.ucrPnlOrder = New instat.UcrPanel() + Me.rdoMissing = New System.Windows.Forms.RadioButton() + Me.rdoGraph = New System.Windows.Forms.RadioButton() Me.ucrPnls = New instat.UcrPanel() Me.ucrReceiverDate = New instat.ucrReceiverSingle() Me.ucrReceiverElements = New instat.ucrReceiverMultiple() Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.ucrInventoryPlotSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.rdoSummary = New System.Windows.Forms.RadioButton() - Me.rdoGraph = New System.Windows.Forms.RadioButton() + Me.cmdInventoryPlotOptions = New System.Windows.Forms.Button() + Me.cmdOptions = New System.Windows.Forms.Button() Me.pnlDetails.SuspendLayout() Me.pnlSummary.SuspendLayout() Me.SuspendLayout() ' - 'cmdOptions - ' - resources.ApplyResources(Me.cmdOptions, "cmdOptions") - Me.cmdOptions.Name = "cmdOptions" - Me.cmdOptions.UseVisualStyleBackColor = True - ' 'lblDate ' resources.ApplyResources(Me.lblDate, "lblDate") @@ -87,12 +82,6 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.lblStation, "lblStation") Me.lblStation.Name = "lblStation" ' - 'cmdInventoryPlotOptions - ' - resources.ApplyResources(Me.cmdInventoryPlotOptions, "cmdInventoryPlotOptions") - Me.cmdInventoryPlotOptions.Name = "cmdInventoryPlotOptions" - Me.cmdInventoryPlotOptions.UseVisualStyleBackColor = True - ' 'lblElement ' resources.ApplyResources(Me.lblElement, "lblElement") @@ -114,6 +103,7 @@ Partial Class dlgInventoryPlot ' 'pnlDetails ' + Me.pnlDetails.Controls.Add(Me.ucrChkSaveDetails) Me.pnlDetails.Controls.Add(Me.ucrChkMinute) Me.pnlDetails.Controls.Add(Me.ucrChkSecond) Me.pnlDetails.Controls.Add(Me.ucrChkYear) @@ -123,6 +113,48 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.pnlDetails, "pnlDetails") Me.pnlDetails.Name = "pnlDetails" ' + 'ucrChkSaveDetails + ' + Me.ucrChkSaveDetails.Checked = False + resources.ApplyResources(Me.ucrChkSaveDetails, "ucrChkSaveDetails") + Me.ucrChkSaveDetails.Name = "ucrChkSaveDetails" + ' + 'ucrChkMinute + ' + Me.ucrChkMinute.Checked = False + resources.ApplyResources(Me.ucrChkMinute, "ucrChkMinute") + Me.ucrChkMinute.Name = "ucrChkMinute" + ' + 'ucrChkSecond + ' + Me.ucrChkSecond.Checked = False + resources.ApplyResources(Me.ucrChkSecond, "ucrChkSecond") + Me.ucrChkSecond.Name = "ucrChkSecond" + ' + 'ucrChkYear + ' + Me.ucrChkYear.Checked = False + resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") + Me.ucrChkYear.Name = "ucrChkYear" + ' + 'ucrChkMonth + ' + Me.ucrChkMonth.Checked = False + resources.ApplyResources(Me.ucrChkMonth, "ucrChkMonth") + Me.ucrChkMonth.Name = "ucrChkMonth" + ' + 'ucrChkDay + ' + Me.ucrChkDay.Checked = False + resources.ApplyResources(Me.ucrChkDay, "ucrChkDay") + Me.ucrChkDay.Name = "ucrChkDay" + ' + 'ucrChkHour + ' + Me.ucrChkHour.Checked = False + resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") + Me.ucrChkHour.Name = "ucrChkHour" + ' 'pnlSummary ' Me.pnlSummary.Controls.Add(Me.ucrChkOmitStart) @@ -164,41 +196,23 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrPnlOrder, "ucrPnlOrder") Me.ucrPnlOrder.Name = "ucrPnlOrder" ' - 'ucrChkMinute + 'rdoMissing ' - Me.ucrChkMinute.Checked = False - resources.ApplyResources(Me.ucrChkMinute, "ucrChkMinute") - Me.ucrChkMinute.Name = "ucrChkMinute" - ' - 'ucrChkSecond + resources.ApplyResources(Me.rdoMissing, "rdoMissing") + Me.rdoMissing.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMissing.FlatAppearance.BorderSize = 2 + Me.rdoMissing.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMissing.Name = "rdoMissing" + Me.rdoMissing.UseVisualStyleBackColor = True ' - Me.ucrChkSecond.Checked = False - resources.ApplyResources(Me.ucrChkSecond, "ucrChkSecond") - Me.ucrChkSecond.Name = "ucrChkSecond" - ' - 'ucrChkYear - ' - Me.ucrChkYear.Checked = False - resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") - Me.ucrChkYear.Name = "ucrChkYear" - ' - 'ucrChkMonth - ' - Me.ucrChkMonth.Checked = False - resources.ApplyResources(Me.ucrChkMonth, "ucrChkMonth") - Me.ucrChkMonth.Name = "ucrChkMonth" - ' - 'ucrChkDay - ' - Me.ucrChkDay.Checked = False - resources.ApplyResources(Me.ucrChkDay, "ucrChkDay") - Me.ucrChkDay.Name = "ucrChkDay" - ' - 'ucrChkHour + 'rdoGraph ' - Me.ucrChkHour.Checked = False - resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") - Me.ucrChkHour.Name = "ucrChkHour" + resources.ApplyResources(Me.rdoGraph, "rdoGraph") + Me.rdoGraph.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraph.FlatAppearance.BorderSize = 2 + Me.rdoGraph.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraph.Name = "rdoGraph" + Me.rdoGraph.UseVisualStyleBackColor = True ' 'ucrPnls ' @@ -245,39 +259,33 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'rdoSummary + 'cmdInventoryPlotOptions ' - resources.ApplyResources(Me.rdoSummary, "rdoSummary") - Me.rdoSummary.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoSummary.FlatAppearance.BorderSize = 2 - Me.rdoSummary.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoSummary.Name = "rdoSummary" - Me.rdoSummary.UseVisualStyleBackColor = True + resources.ApplyResources(Me.cmdInventoryPlotOptions, "cmdInventoryPlotOptions") + Me.cmdInventoryPlotOptions.Name = "cmdInventoryPlotOptions" + Me.cmdInventoryPlotOptions.UseVisualStyleBackColor = True ' - 'rdoGraph + 'cmdOptions ' - resources.ApplyResources(Me.rdoGraph, "rdoGraph") - Me.rdoGraph.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGraph.FlatAppearance.BorderSize = 2 - Me.rdoGraph.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGraph.Name = "rdoGraph" - Me.rdoGraph.UseVisualStyleBackColor = True + resources.ApplyResources(Me.cmdOptions, "cmdOptions") + Me.cmdOptions.Name = "cmdOptions" + Me.cmdOptions.UseVisualStyleBackColor = True ' 'dlgInventoryPlot ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.cmdInventoryPlotOptions) + Me.Controls.Add(Me.cmdOptions) Me.Controls.Add(Me.rdoGraph) - Me.Controls.Add(Me.rdoSummary) + Me.Controls.Add(Me.rdoMissing) Me.Controls.Add(Me.pnlSummary) Me.Controls.Add(Me.pnlDetails) Me.Controls.Add(Me.ucrPnls) Me.Controls.Add(Me.lblElement) Me.Controls.Add(Me.ucrReceiverDate) - Me.Controls.Add(Me.cmdInventoryPlotOptions) Me.Controls.Add(Me.lblDate) Me.Controls.Add(Me.ucrReceiverElements) - Me.Controls.Add(Me.cmdOptions) Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.ucrReceiverStation) Me.Controls.Add(Me.ucrInventoryPlotSelector) @@ -296,12 +304,10 @@ Partial Class dlgInventoryPlot End Sub Friend WithEvents ucrBase As ucrButtons Friend WithEvents ucrInventoryPlotSelector As ucrSelectorByDataFrameAddRemove - Friend WithEvents cmdOptions As Button Friend WithEvents lblDate As Label Friend WithEvents ucrReceiverElements As ucrReceiverMultiple Friend WithEvents lblStation As Label Friend WithEvents ucrReceiverStation As ucrReceiverSingle - Friend WithEvents cmdInventoryPlotOptions As Button Friend WithEvents ucrReceiverDate As ucrReceiverSingle Friend WithEvents lblElement As Label Friend WithEvents ucrPnls As UcrPanel @@ -321,5 +327,8 @@ Partial Class dlgInventoryPlot Friend WithEvents ucrChkHour As ucrCheck Friend WithEvents pnlSummary As Panel Friend WithEvents rdoGraph As RadioButton - Friend WithEvents rdoSummary As RadioButton + Friend WithEvents rdoMissing As RadioButton + Friend WithEvents ucrChkSaveDetails As ucrCheck + Friend WithEvents cmdInventoryPlotOptions As Button + Friend WithEvents cmdOptions As Button End Class diff --git a/instat/dlgInventoryPlot.resx b/instat/dlgInventoryPlot.resx index 53cf2efdb4b..d7a4d8b1e45 100644 --- a/instat/dlgInventoryPlot.resx +++ b/instat/dlgInventoryPlot.resx @@ -118,44 +118,14 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - False - - - - NoControl - - - - 10, 244 - - - 121, 23 - - - 7 - - - Options - - - cmdOptions - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 10 - True + NoControl + 263, 42 @@ -178,7 +148,7 @@ $this - 8 + 9 True @@ -210,36 +180,6 @@ 11 - - False - - - NoControl - - - 10, 216 - - - 121, 23 - - - 6 - - - Inventory Plot Options - - - cmdInventoryPlotOptions - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 7 - True @@ -268,7 +208,7 @@ $this - 5 + 7 True @@ -277,7 +217,7 @@ NoControl - 239, 31 + 248, 31 92, 17 @@ -307,7 +247,7 @@ NoControl - 117, 31 + 126, 31 77, 17 @@ -330,6 +270,39 @@ 4 + + 10, 70 + + + 100, 20 + + + 20 + + + ucrChkSaveDetails + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlDetails + + + 0 + + + False + + + 248, 41 + + + 100, 20 + + + 18 + ucrChkMinute @@ -340,7 +313,19 @@ pnlDetails - 0 + 1 + + + False + + + 248, 70 + + + 100, 20 + + + 19 ucrChkSecond @@ -352,7 +337,16 @@ pnlDetails - 1 + 2 + + + 126, 13 + + + 100, 20 + + + 14 ucrChkYear @@ -364,7 +358,16 @@ pnlDetails - 2 + 3 + + + 126, 41 + + + 100, 20 + + + 15 ucrChkMonth @@ -376,7 +379,16 @@ pnlDetails - 3 + 4 + + + 126, 70 + + + 100, 20 + + + 16 ucrChkDay @@ -388,7 +400,19 @@ pnlDetails - 4 + 5 + + + False + + + 248, 13 + + + 100, 20 + + + 17 ucrChkHour @@ -400,13 +424,13 @@ pnlDetails - 5 + 6 - 120, 329 + 2, 325 - 249, 92 + 402, 92 22 @@ -421,91 +445,10 @@ $this - 3 - - - ucrChkOmitStart - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 0 - - - ucrChkSummary - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 2 - - - ucrChkDetails - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 3 - - - ucrChkOmitEnd - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - 5 - - ucrPnlOrder - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 6 - - - 10, 275 - - - 376, 52 - - - 21 - - - pnlSummary - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - - 117, 3 + 126, 3 100, 20 @@ -526,7 +469,7 @@ 0 - 0, 3 + 10, 3 100, 20 @@ -547,7 +490,7 @@ 2 - 0, 31 + 10, 31 100, 20 @@ -568,7 +511,7 @@ 3 - 239, 3 + 248, 3 100, 20 @@ -609,134 +552,104 @@ 6 - - 129, 36 - - - 100, 20 + + 4, 271 - - 18 + + 376, 52 - - ucrChkMinute + + 21 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + pnlSummary - - pnlDetails + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + $this - - 129, 65 + + 4 - - 100, 20 + + Button - - 19 + + Flat - - ucrChkSecond + + NoControl - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 214, 3 - - pnlDetails + + 135, 27 - + 1 - - 7, 8 - - - 100, 20 - - - 14 - - - ucrChkYear - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlDetails - - - 2 - - - 7, 36 - - - 100, 20 + + Missing - - 15 + + MiddleCenter - - ucrChkMonth + + rdoMissing - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - pnlDetails + + $this - + 3 - - 7, 65 - - - 100, 20 + + Button - - 16 + + None - - ucrChkDay + + Flat - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + NoControl - - pnlDetails + + 81, 3 - - 4 + + 135, 27 - - 129, 8 + + 2 - - 100, 20 + + Graph - - 17 + + MiddleCenter - - ucrChkHour + + rdoGraph - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - pnlDetails + + $this - - 5 + + 2 - 68, 3 + 76, 3 277, 35 @@ -754,7 +667,7 @@ $this - 4 + 6 True @@ -765,76 +678,64 @@ 423, 475 - - Button - - - None - - - Flat + + False - - 206, 4 + + NoControl - - 135, 27 + + 10, 215 - - 2 + + 121, 23 - - Graph + + 50 - - MiddleCenter + + Inventory Plot Options - - rdoGraph + + cmdInventoryPlotOptions - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 0 - - Button - - - Flat + + False - + NoControl - - 72, 4 - - - 135, 27 + + 10, 241 - - 1 + + 121, 23 - - Summary + + 51 - - MiddleCenter + + Options - - rdoSummary + + cmdOptions - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - + 1 @@ -859,7 +760,7 @@ $this - 9 + 10 263, 215 @@ -910,7 +811,7 @@ 13 - 6, 421 + 10, 421 410, 53 @@ -964,6 +865,6 @@ $this - 6 + 8 \ No newline at end of file diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index d7e4d870502..71508a87dcf 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -21,8 +21,13 @@ Public Class dlgInventoryPlot Private clsDefaultRFunction As New RFunction Private clsClimaticSummary As New RFunction + Private iPnlSummaryY As Integer + Private iPnlDetailsY As Integer + Private Sub dlgInventoryPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then + iPnlSummaryY = pnlSummary.Location.Y + iPnlDetailsY = pnlDetails.Location.Y InitialiseDialog() bFirstLoad = False End If @@ -96,6 +101,10 @@ Public Class dlgInventoryPlot ucrChkDay.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkDay.SetRDefault("TRUE") + ' ucrChkHour.SetParameter(New RParameter("", 13)) + ucrChkSaveDetails.SetText("Save Details") + ' ucrChkHour.SetRDefault("FALSE") + ' ucrChkHour.SetParameter(New RParameter("", 13)) ucrChkHour.SetText("Hour") ' ucrChkHour.SetRDefault("FALSE") @@ -113,12 +122,12 @@ Public Class dlgInventoryPlot ucrPnlOrder.AddRadioButton(rdoElementOrder, "FALSE") ucrPnlOrder.SetRDefault("FALSE") - ucrPnls.AddRadioButton(rdoSummary) + ucrPnls.AddRadioButton(rdoMissing) ucrPnls.AddRadioButton(rdoGraph) - ucrPnls.AddFunctionNamesCondition(rdoSummary, "climatic.summary") + ucrPnls.AddFunctionNamesCondition(rdoMissing, "climatic_missing") ucrPnls.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") - ucrPnls.AddToLinkedControls(ucrChkSummary, {rdoSummary}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnls.AddToLinkedControls(ucrChkDetails, {rdoSummary}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnls.AddToLinkedControls(ucrChkSummary, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnls.AddToLinkedControls(ucrChkDetails, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDay.SetLinkedDisplayControl(pnlDetails) ucrChkSummary.SetLinkedDisplayControl(pnlSummary) @@ -148,8 +157,8 @@ Public Class dlgInventoryPlot clsDefaultRFunction.AddParameter("year_doy_plot", "FALSE") clsDefaultRFunction.AddParameter("facet_by", "NULL") clsDefaultRFunction.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") - clsClimaticSummary.SetRCommand("climatic.summary") - ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticSummary) + clsClimaticSummary.SetRCommand("climatic_missing") + ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) TestOkEnabled() End Sub @@ -167,7 +176,7 @@ Public Class dlgInventoryPlot ucrChkOmitEnd.SetRCode(clsClimaticSummary, bReset) ucrChkOmitStart.SetRCode(clsClimaticSummary, bReset) ucrPnlOrder.SetRCode(clsClimaticSummary, bReset) - ucrPnls.SetRCode(clsClimaticSummary, bReset) + ucrPnls.SetRCode(clsDefaultRFunction, bReset) End Sub Private Sub TestOkEnabled() @@ -178,7 +187,7 @@ Public Class dlgInventoryPlot End If End Sub - Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + Private Sub cmdOptions_Click(sender As Object, e As EventArgs) 'there needs to be work on sdgplots before this could be linked 'sdgPlots.SetRSyntax(ucrBase.clsRsyntax) 'sdgPlots.ShowDialog() @@ -211,12 +220,18 @@ Public Class dlgInventoryPlot End Sub Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnls.ControlValueChanged - If rdoSummary.Checked Then + If rdoMissing.Checked Then ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticSummary) ucrBase.clsRsyntax.iCallType = 2 + pnlSummary.Location = New Point(pnlSummary.Location.X, iPnlSummaryY / 1.12) + pnlDetails.Location = New Point(pnlDetails.Location.X, iPnlDetailsY / 1.09) + cmdInventoryPlotOptions.Visible = False + cmdOptions.Visible = False Else ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) ucrBase.clsRsyntax.iCallType = 3 + cmdInventoryPlotOptions.Visible = True + cmdOptions.Visible = True End If End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 5850cb9df20..8983dff38e3 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1283,7 +1283,7 @@ summary_sample <- function(x, size, replace = FALSE){ else{sample(x = x, size = size, replace = replace)} } -climatic.summary <- function(data, date, elements = ..., stations, summary = TRUE, details = FALSE, +climatic_missing <- function(data, date, elements = ..., stations, summary = TRUE, details = FALSE, order = FALSE, day = TRUE, month = FALSE, @@ -1315,10 +1315,10 @@ climatic.summary <- function(data, date, elements = ..., stations, summary = TRU # sort start/end times # for summary == TRUE - if (summary == TRUE){ + if (summary){ i = i + 1 # set start date - if (start == TRUE){ + if (start){ data.stack <- data.stack %>% dplyr::group_by({{ stations }}, Element) %>% dplyr::mutate(start = ({{ date }})[which.min(is.na( value ))]) @@ -1328,9 +1328,9 @@ climatic.summary <- function(data, date, elements = ..., stations, summary = TRU } # set end date - if (end == TRUE){ + if (end){ data.stack <- data.stack %>% - group_by({{ stations }}, Element ) %>% + dplyr::group_by({{ stations }}, Element ) %>% dplyr::mutate(end = ({{ date }} )[dplyr::last(which(!is.na( value )))]) }else{ data.stack <- data.stack %>% group_by({{ stations }} ) %>% mutate(end = dplyr::last({{ date }})) @@ -1363,20 +1363,18 @@ climatic.summary <- function(data, date, elements = ..., stations, summary = TRU summary.data$stations <- NULL } - # } - #print(summary.data) list_tables[[i]] <- summary.data } - if (details == TRUE){ + if (details){ if (day != TRUE & month != TRUE & year != TRUE){ warning('At least one of day, month, year need to be selected if details == TRUE') } - if (day == TRUE){ + if (day){ i = i + 1 detail.table.day = data.stack %>% group_by({{stations}}, Element) %>% @@ -1387,7 +1385,7 @@ climatic.summary <- function(data, date, elements = ..., stations, summary = TRU To = dplyr::last({{date}}), Count = n()) - if (order == TRUE){ + if (order){ detail.table.day <- detail.table.day %>% arrange(From) } else { detail.table.day <- detail.table.day %>% arrange(Element) @@ -1398,7 +1396,7 @@ climatic.summary <- function(data, date, elements = ..., stations, summary = TRU } - if (month == TRUE){ + if (month){ i = i + 1 detail.table.month <- data.stack %>% mutate(Date.ym = zoo::as.yearmon({{date}})) %>% @@ -1420,7 +1418,7 @@ climatic.summary <- function(data, date, elements = ..., stations, summary = TRU To = dplyr::last(To), Count = n()) - if (order == TRUE){ + if (order){ detail.table.month <- detail.table.month %>% arrange(From) } else { detail.table.month <- detail.table.month %>% arrange(Element) @@ -1430,7 +1428,7 @@ climatic.summary <- function(data, date, elements = ..., stations, summary = TRU list_tables[[i]] <- detail.table.month } - if (year == TRUE) { + if (year) { i = i + 1 detail.table.year <- data.stack %>% mutate(Date.y = lubridate::year({{date}})) %>% @@ -1452,7 +1450,7 @@ climatic.summary <- function(data, date, elements = ..., stations, summary = TRU To = dplyr::last(To), Count = n()) - if (order == TRUE){ + if (order){ detail.table.year <- detail.table.year %>% arrange(From) } else { detail.table.year <- detail.table.year %>% arrange(Element) From 36fb8fb96dea747c28573a213640b6e2760b2908 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Thu, 10 Sep 2020 13:32:14 +0300 Subject: [PATCH 113/277] changed argument paramter name --- instat/dlgBarAndPieChart.vb | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/instat/dlgBarAndPieChart.vb b/instat/dlgBarAndPieChart.vb index f55d2b72b6e..433118ec4c3 100644 --- a/instat/dlgBarAndPieChart.vb +++ b/instat/dlgBarAndPieChart.vb @@ -72,9 +72,8 @@ Public Class dlgBarAndPieChart ucrPnlOptions.AddRadioButton(rdoBarChart) ucrPnlOptions.AddRadioButton(rdoPieChart) - 'commented out because the parameter can be present in both radio buttons option. See issue #5950 - 'ucrPnlOptions.AddParameterPresentCondition(rdoPieChart, "coord_polar") - 'ucrPnlOptions.AddParameterPresentCondition(rdoBarChart, "coord_polar", False) + ucrPnlOptions.AddParameterPresentCondition(rdoPieChart, "coordpolar") + ucrPnlOptions.AddParameterPresentCondition(rdoBarChart, "coordpolar", False) ucrPnlOptions.AddToLinkedControls({ucrChkFlipCoordinates}, {rdoBarChart}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls(ucrInputBarChartPosition, {rdoBarChart}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -116,7 +115,7 @@ Public Class dlgBarAndPieChart clsRCoordPolarFunction.SetPackageName("ggplot2") clsRCoordPolarFunction.SetRCommand("coord_polar") clsRCoordPolarFunction.AddParameter("theta", Chr(34) & "y" & Chr(34)) - clsRCoordPolarParam.SetArgumentName("coord_polar") + clsRCoordPolarParam.SetArgumentName("coordpolar") clsRCoordPolarParam.SetArgument(clsRCoordPolarFunction) clsCoordFlipFunc.SetPackageName("ggplot2") @@ -157,7 +156,6 @@ Public Class dlgBarAndPieChart ucrBarChartSelector.SetGgplotFunction(clsBaseOperator) ucrReceiverFirst.SetMeAsReceiver() ucrSaveBar.Reset() - rdoBarChart.Checked = True 'done manually here because the ucrPanel has no set R code bResetSubdialog = True bResetBarLayerSubdialog = True @@ -208,11 +206,7 @@ Public Class dlgBarAndPieChart ucrReceiverByFactor.SetRCode(clsBarAesFunction, bReset) ucrSaveBar.SetRCode(clsBaseOperator, bReset) ucrBarChartSelector.SetRCode(clsRggplotFunction, bReset) - - 'commented until when there is unique parameters that can be used as parameter present condition setting - 'for determining the radio button that will be checked. Currently its done manually. See issue #5950 - 'ucrPnlOptions.SetRCode(clsBaseOperator, bReset) - + ucrPnlOptions.SetRCode(clsBaseOperator, bReset) ucrChkFlipCoordinates.SetRCode(clsBaseOperator, bReset) ucrInputBarChartPosition.SetRCode(clsRgeomBarFunction, bReset) ucrInputYValue.SetRCode(clsRgeomBarFunction, bReset) From eaa77408b2cf8bfc8854db4c16e86f6d6252ad3c Mon Sep 17 00:00:00 2001 From: patowhiz Date: Thu, 10 Sep 2020 13:37:18 +0300 Subject: [PATCH 114/277] removed space --- instat/dlgBarAndPieChart.vb | 1 - 1 file changed, 1 deletion(-) diff --git a/instat/dlgBarAndPieChart.vb b/instat/dlgBarAndPieChart.vb index 433118ec4c3..623a25ca576 100644 --- a/instat/dlgBarAndPieChart.vb +++ b/instat/dlgBarAndPieChart.vb @@ -71,7 +71,6 @@ Public Class dlgBarAndPieChart ucrPnlOptions.AddRadioButton(rdoBarChart) ucrPnlOptions.AddRadioButton(rdoPieChart) - ucrPnlOptions.AddParameterPresentCondition(rdoPieChart, "coordpolar") ucrPnlOptions.AddParameterPresentCondition(rdoBarChart, "coordpolar", False) From 69332a9cfea7bd5404416ebc0238ef704ac2f7f2 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 10 Sep 2020 17:15:19 +0300 Subject: [PATCH 115/277] changed minimum and maximum latitudes and allowed:-90 to 90 --- instat/dlgImportGriddedData.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 1f23e2e4843..0433b5fc119 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -68,11 +68,11 @@ Public Class dlgImportGriddedData ucrInputMinLat.SetParameter(New RParameter("min_lat", 5)) ucrInputMinLat.AddQuotesIfUnrecognised = False - ucrInputMinLat.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) + ucrInputMinLat.SetValidationTypeAsNumeric(dcmMin:=-90, dcmMax:=90) ucrInputMaxLat.SetParameter(New RParameter("max_lat", 6)) ucrInputMaxLat.AddQuotesIfUnrecognised = False - ucrInputMaxLat.SetValidationTypeAsNumeric(dcmMin:=-180, dcmMax:=180) + ucrInputMaxLat.SetValidationTypeAsNumeric(dcmMin:=-90, dcmMax:=90) ucrDtpMinDate.SetParameter(New RParameter("min_date", 7)) From 3e9020baa4cddd22612a7916921a45f88a0ed4e8 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Fri, 11 Sep 2020 08:43:55 +0000 Subject: [PATCH 116/277] Added an empty dialog for Wind/Pollution Rose --- instat/dlgWindPollutionRose.Designer.vb | 51 ++++++++++ instat/dlgWindPollutionRose.resx | 120 ++++++++++++++++++++++++ instat/dlgWindPollutionRose.vb | 3 + instat/frmMain.vb | 4 + instat/instat.vbproj | 9 ++ 5 files changed, 187 insertions(+) create mode 100644 instat/dlgWindPollutionRose.Designer.vb create mode 100644 instat/dlgWindPollutionRose.resx create mode 100644 instat/dlgWindPollutionRose.vb diff --git a/instat/dlgWindPollutionRose.Designer.vb b/instat/dlgWindPollutionRose.Designer.vb new file mode 100644 index 00000000000..15cc5750cd5 --- /dev/null +++ b/instat/dlgWindPollutionRose.Designer.vb @@ -0,0 +1,51 @@ + _ +Partial Class dlgWindPollutionRose + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.ucrBase = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(8, 279) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 1 + ' + 'dlgWindPollutionRose + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(437, 338) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgWindPollutionRose" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Wind/Pollution Rose" + Me.ResumeLayout(False) + + End Sub + Friend WithEvents ucrBase As ucrButtons +End Class diff --git a/instat/dlgWindPollutionRose.resx b/instat/dlgWindPollutionRose.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgWindPollutionRose.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgWindPollutionRose.vb b/instat/dlgWindPollutionRose.vb new file mode 100644 index 00000000000..70e1c9b4914 --- /dev/null +++ b/instat/dlgWindPollutionRose.vb @@ -0,0 +1,3 @@ +Public Class dlgWindPollutionRose + +End Class \ No newline at end of file diff --git a/instat/frmMain.vb b/instat/frmMain.vb index b3ff77d144b..c6bbceb9705 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2190,4 +2190,8 @@ Public Class frmMain dlgCalculator.strDefaultItem = "Circular" dlgCalculator.ShowDialog() End Sub + + Private Sub mnuStructuredCircularWindPollutionRose_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularWindPollutionRose.Click + dlgWindPollutionRose.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 11e81a3cc88..584ee5446ce 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -232,6 +232,12 @@ Form + + dlgWindPollutionRose.vb + + + Form + sdgExtremesDisplayOptions.vb @@ -2564,6 +2570,9 @@ dlgTaylorDiagram.vb + + dlgWindPollutionRose.vb + sdgExtremesDisplayOptions.vb From 73adb12cad4d503f9c18ab4f8b3d4ae1fe11fe36 Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Fri, 11 Sep 2020 11:17:33 +0200 Subject: [PATCH 117/277] Revert "Proper Setting of the Save Control in the Prepare > Column: Calculate >Regular Sequence and prepare > Column: Date > Generate Dates" --- instat/dlgRegularSequence.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgRegularSequence.vb b/instat/dlgRegularSequence.vb index 2b2418e4fff..10d3d548dde 100644 --- a/instat/dlgRegularSequence.vb +++ b/instat/dlgRegularSequence.vb @@ -188,6 +188,7 @@ Public Class dlgRegularSequence 'Set to base function so that control is set correctly 'After then set to nothing so that updating is done manually ucrNewColumnName.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) + ucrNewColumnName.SetRCode(Nothing, bReset:=False, bUpdate:=False) ucrPnlSequenceType.SetRCode(clsRepFunction, bReset) ucrInputFrom.SetRCode(clsSeqFunction, bReset) From 1a6f65b774e72c17c82080be1d7f45033d50b378 Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Fri, 11 Sep 2020 11:20:31 +0200 Subject: [PATCH 118/277] Update instat/dlgRegularSequence.vb --- instat/dlgRegularSequence.vb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/instat/dlgRegularSequence.vb b/instat/dlgRegularSequence.vb index 10d3d548dde..bda92295035 100644 --- a/instat/dlgRegularSequence.vb +++ b/instat/dlgRegularSequence.vb @@ -186,9 +186,7 @@ Public Class dlgRegularSequence ucrInputComboDatesBy.SetRCode(clsByDateOperator, bReset) 'Set to base function so that control is set correctly - 'After then set to nothing so that updating is done manually ucrNewColumnName.SetRCode(ucrBase.clsRsyntax.clsBaseFunction, bReset) - ucrNewColumnName.SetRCode(Nothing, bReset:=False, bUpdate:=False) ucrPnlSequenceType.SetRCode(clsRepFunction, bReset) ucrInputFrom.SetRCode(clsSeqFunction, bReset) @@ -388,4 +386,4 @@ Public Class dlgRegularSequence Private Sub ucrNewColumnName_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrNewColumnName.ControlContentsChanged, ucrInputTo.ControlContentsChanged, ucrInputFrom.ControlContentsChanged, ucrInputInStepsOf.ControlContentsChanged, ucrSelectDataFrameRegularSequence.ControlContentsChanged, ucrInputFrom.ControlContentsChanged, ucrInputTo.ControlContentsChanged, ucrInputInStepsOf.ControlContentsChanged, ucrNudRepeatValues.ControlContentsChanged, ucrPnlSequenceType.ControlContentsChanged, ucrInputComboDatesBy.ControlContentsChanged TestOKEnabled() End Sub -End Class \ No newline at end of file +End Class From abf0464cf8d80bf67168f251007a1ec83f517e9a Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Fri, 11 Sep 2020 09:48:48 +0000 Subject: [PATCH 119/277] Added a time series plot and Other rose plots empty dialogs --- instat/dlgOtherRosePlots.Designer.vb | 52 ++++++++++++ instat/dlgOtherRosePlots.resx | 120 +++++++++++++++++++++++++++ instat/dlgOtherRosePlots.vb | 3 + instat/dlgTimeSeriesPlot.Designer.vb | 52 ++++++++++++ instat/dlgTimeSeriesPlot.resx | 120 +++++++++++++++++++++++++++ instat/dlgTimeSeriesPlot.vb | 3 + instat/frmMain.vb | 8 ++ instat/instat.vbproj | 18 ++++ 8 files changed, 376 insertions(+) create mode 100644 instat/dlgOtherRosePlots.Designer.vb create mode 100644 instat/dlgOtherRosePlots.resx create mode 100644 instat/dlgOtherRosePlots.vb create mode 100644 instat/dlgTimeSeriesPlot.Designer.vb create mode 100644 instat/dlgTimeSeriesPlot.resx create mode 100644 instat/dlgTimeSeriesPlot.vb diff --git a/instat/dlgOtherRosePlots.Designer.vb b/instat/dlgOtherRosePlots.Designer.vb new file mode 100644 index 00000000000..94f911f5cc8 --- /dev/null +++ b/instat/dlgOtherRosePlots.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class dlgOtherRosePlots + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.ucrBase = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(10, 351) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 0 + ' + 'dlgOtherRosePlots + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(426, 408) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgOtherRosePlots" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Other Rose Plots" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents ucrBase As ucrButtons +End Class diff --git a/instat/dlgOtherRosePlots.resx b/instat/dlgOtherRosePlots.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgOtherRosePlots.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgOtherRosePlots.vb b/instat/dlgOtherRosePlots.vb new file mode 100644 index 00000000000..5c57f689907 --- /dev/null +++ b/instat/dlgOtherRosePlots.vb @@ -0,0 +1,3 @@ +Public Class dlgOtherRosePlots + +End Class \ No newline at end of file diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb new file mode 100644 index 00000000000..74fef489f0c --- /dev/null +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class dlgTimeSeriesPlot + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.ucrBase = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(12, 297) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 0 + ' + 'dlgTimeSeriesPlot + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(428, 358) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgTimeSeriesPlot" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Time Series Plot" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents ucrBase As ucrButtons +End Class diff --git a/instat/dlgTimeSeriesPlot.resx b/instat/dlgTimeSeriesPlot.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgTimeSeriesPlot.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb new file mode 100644 index 00000000000..c11a3ab8840 --- /dev/null +++ b/instat/dlgTimeSeriesPlot.vb @@ -0,0 +1,3 @@ +Public Class dlgTimeSeriesPlot + +End Class \ No newline at end of file diff --git a/instat/frmMain.vb b/instat/frmMain.vb index c6bbceb9705..515b7f7c761 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2194,4 +2194,12 @@ Public Class frmMain Private Sub mnuStructuredCircularWindPollutionRose_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularWindPollutionRose.Click dlgWindPollutionRose.ShowDialog() End Sub + + Private Sub mnuStructuredCircularOtherRosePlots_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularOtherRosePlots.Click + dlgOtherRosePlots.ShowDialog() + End Sub + + Private Sub mnuClimaticCompareTimeSeriesPlot_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareTimeSeriesPlot.Click + dlgTimeSeriesPlot.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 584ee5446ce..4fff453cca2 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -226,12 +226,24 @@ Form + + dlgOtherRosePlots.vb + + + Form + dlgTaylorDiagram.vb Form + + dlgTimeSeriesPlot.vb + + + Form + dlgWindPollutionRose.vb @@ -2567,9 +2579,15 @@ dlgInfillMissingValues.vb + + dlgOtherRosePlots.vb + dlgTaylorDiagram.vb + + dlgTimeSeriesPlot.vb + dlgWindPollutionRose.vb From db128b1e9f7ff011c073ebe32032dbb50a7e86af Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Fri, 11 Sep 2020 10:00:24 +0000 Subject: [PATCH 120/277] Added Conditional quantile and Seasonal Plot empty dialogs --- instat/dlgConditionalQuantilePlot.Designer.vb | 52 ++++++++ instat/dlgConditionalQuantilePlot.resx | 120 ++++++++++++++++++ instat/dlgConditionalQuantilePlot.vb | 3 + instat/dlgSeasonalPlot.Designer.vb | 52 ++++++++ instat/dlgSeasonalPlot.resx | 120 ++++++++++++++++++ instat/dlgSeasonalPlot.vb | 3 + instat/frmMain.vb | 8 ++ instat/instat.vbproj | 18 +++ 8 files changed, 376 insertions(+) create mode 100644 instat/dlgConditionalQuantilePlot.Designer.vb create mode 100644 instat/dlgConditionalQuantilePlot.resx create mode 100644 instat/dlgConditionalQuantilePlot.vb create mode 100644 instat/dlgSeasonalPlot.Designer.vb create mode 100644 instat/dlgSeasonalPlot.resx create mode 100644 instat/dlgSeasonalPlot.vb diff --git a/instat/dlgConditionalQuantilePlot.Designer.vb b/instat/dlgConditionalQuantilePlot.Designer.vb new file mode 100644 index 00000000000..291a550b5e0 --- /dev/null +++ b/instat/dlgConditionalQuantilePlot.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class dlgConditionalQuantilePlot + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.UcrButtons1 = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'UcrButtons1 + ' + Me.UcrButtons1.Location = New System.Drawing.Point(7, 299) + Me.UcrButtons1.Name = "UcrButtons1" + Me.UcrButtons1.Size = New System.Drawing.Size(410, 52) + Me.UcrButtons1.TabIndex = 0 + ' + 'dlgConditionalQuantilePlot + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(425, 364) + Me.Controls.Add(Me.UcrButtons1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgConditionalQuantilePlot" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Conditional Quantile Plot" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents UcrButtons1 As ucrButtons +End Class diff --git a/instat/dlgConditionalQuantilePlot.resx b/instat/dlgConditionalQuantilePlot.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgConditionalQuantilePlot.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgConditionalQuantilePlot.vb b/instat/dlgConditionalQuantilePlot.vb new file mode 100644 index 00000000000..37d74dde44d --- /dev/null +++ b/instat/dlgConditionalQuantilePlot.vb @@ -0,0 +1,3 @@ +Public Class dlgConditionalQuantilePlot + +End Class \ No newline at end of file diff --git a/instat/dlgSeasonalPlot.Designer.vb b/instat/dlgSeasonalPlot.Designer.vb new file mode 100644 index 00000000000..a116782b3ac --- /dev/null +++ b/instat/dlgSeasonalPlot.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class dlgSeasonalPlot + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.UcrButtons1 = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'UcrButtons1 + ' + Me.UcrButtons1.Location = New System.Drawing.Point(8, 258) + Me.UcrButtons1.Name = "UcrButtons1" + Me.UcrButtons1.Size = New System.Drawing.Size(410, 52) + Me.UcrButtons1.TabIndex = 0 + ' + 'dlgSeasonalPlot + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(426, 317) + Me.Controls.Add(Me.UcrButtons1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgSeasonalPlot" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent + Me.Text = "Seasonal Plot" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents UcrButtons1 As ucrButtons +End Class diff --git a/instat/dlgSeasonalPlot.resx b/instat/dlgSeasonalPlot.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgSeasonalPlot.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb new file mode 100644 index 00000000000..184afc038cc --- /dev/null +++ b/instat/dlgSeasonalPlot.vb @@ -0,0 +1,3 @@ +Public Class dlgSeasonalPlot + +End Class \ No newline at end of file diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 515b7f7c761..c063f84b892 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2202,4 +2202,12 @@ Public Class frmMain Private Sub mnuClimaticCompareTimeSeriesPlot_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareTimeSeriesPlot.Click dlgTimeSeriesPlot.ShowDialog() End Sub + + Private Sub mnuClimaticCompareSeasonalPlot_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareSeasonalPlot.Click + dlgSeasonalPlot.ShowDialog() + End Sub + + Private Sub mnuClimaticCompareConditionalQuantiles_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareConditionalQuantiles.Click + dlgConditionalQuantilePlot.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 4fff453cca2..9a6cf6009f9 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -208,6 +208,12 @@ Form + + dlgConditionalQuantilePlot.vb + + + Form + dlgDisplayTopN.vb @@ -232,6 +238,12 @@ Form + + dlgSeasonalPlot.vb + + + Form + dlgTaylorDiagram.vb @@ -2569,6 +2581,9 @@ dlgCompareSummary.vb + + dlgConditionalQuantilePlot.vb + dlgDisplayTopN.vb Designer @@ -2582,6 +2597,9 @@ dlgOtherRosePlots.vb + + dlgSeasonalPlot.vb + dlgTaylorDiagram.vb From 4b045fb489e8551fde21e7cb945f751d81e87c3f Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 11 Sep 2020 14:58:02 +0300 Subject: [PATCH 121/277] updating the selector when data frame changes --- instat/dlgClimaticCheckDataTemperature.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgClimaticCheckDataTemperature.vb b/instat/dlgClimaticCheckDataTemperature.vb index e3ec5d79ebf..06a039b206e 100644 --- a/instat/dlgClimaticCheckDataTemperature.vb +++ b/instat/dlgClimaticCheckDataTemperature.vb @@ -615,6 +615,7 @@ Public Class dlgClimaticCheckDataTemperature Private Sub ucrSelectorTemperature_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTemperature.ControlValueChanged strCurrDataFrame = Chr(34) & ucrSelectorTemperature.ucrAvailableDataFrames.cboAvailableDataFrames.SelectedItem & Chr(34) GroupByOptions() + FilterFunc() End Sub Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged From 33cf387742accc0017a1722539f37054ddb507d0 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 11 Sep 2020 15:51:31 +0300 Subject: [PATCH 122/277] edits to allow use of file with file_name+extension --- instat/static/InstatObject/R/instat_object_R6.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index ff2b8eeabdb..c771b1585e8 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2088,7 +2088,7 @@ DataBook$set("public","package_check", function(package) { } ) -DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ +DataBook$set("public", "download_from_IRI", function(source, data, path, min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ init_URL <- "https://iridl.ldeo.columbia.edu/" if(source == "CHIRPS_V2P0"){prexyaddress <- paste0(init_URL, "SOURCES/.UCSB/.CHIRPS/.v2p0") if(data == "daily_0p25") {extension <- ".daily/.global/.0p25/.prcp"} @@ -2140,7 +2140,8 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi else if(download_type == "point"){URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat)} if(!missing(min_date)&!missing(max_date)){URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date)} URL <- URL %>% add_nc() - file_name <- tempfile(name, tmpdir = path, fileext = ".nc") + if(missing(path)){file_name <- tempfile(name, fileext = ".nc")} + else{file_name <- path} result <- download.file(url = URL, destfile = file_name, method = "libcurl", mode = "wb", cacheOK = FALSE) if(import & result == 0) { nc <- ncdf4::nc_open(filename = file_name) From f8ae52662b0b7f839eae155f84d5eb7ca045f8e1 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 11 Sep 2020 16:02:15 +0300 Subject: [PATCH 123/277] changed browser to allow selection of a file --- instat/dlgImportGriddedData.vb | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 0433b5fc119..5116fb149eb 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -226,14 +226,11 @@ Public Class dlgImportGriddedData End Sub Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click - Dim strPath As String - - Using dlgFolder As New FolderBrowserDialog - dlgFolder.Description = "Choose Folder" - If dlgFolder.ShowDialog() = DialogResult.OK Then - ucrInputFilePath.SetName("") - strPath = dlgFolder.SelectedPath - ucrInputFilePath.SetName(Replace(strPath, "\", "/")) + Using dlgSave As New SaveFileDialog + dlgSave.Title = "Import from IRI Data Library Dialog" + dlgSave.Filter = "NetCDF files|*.nc" + If dlgSave.ShowDialog() = DialogResult.OK Then + ucrInputFilePath.SetName(dlgSave.FileName.Replace("\", "/")) End If End Using End Sub From b5193e7ba54827d1acc7b65c6f44efcbe235c97b Mon Sep 17 00:00:00 2001 From: N-thony Date: Fri, 11 Sep 2020 15:46:01 +0200 Subject: [PATCH 124/277] Adding dplyr:: in front of mutate, group_by, arrange, filter, and summarise in the R function. --- .../InstatObject/R/stand_alone_functions.R | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 8983dff38e3..76419988733 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1292,7 +1292,7 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU # if there are no stations, set it as 1 # (can otherwise just run the function without stations present in that brackets) if (missing(stations)){ - data %>% mutate(stations = 1) + data %>% dplyr::mutate(stations = 1) } if (missing(date)){ @@ -1324,7 +1324,7 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU dplyr::mutate(start = ({{ date }})[which.min(is.na( value ))]) }else{ - data.stack <- data.stack %>% group_by({{ stations }}) %>% mutate(start = dplyr::first( {{ date }} )) + data.stack <- data.stack %>% dplyr::group_by({{ stations }}) %>% dplyr::mutate(start = dplyr::first( {{ date }} )) } # set end date @@ -1333,27 +1333,27 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU dplyr::group_by({{ stations }}, Element ) %>% dplyr::mutate(end = ({{ date }} )[dplyr::last(which(!is.na( value )))]) }else{ - data.stack <- data.stack %>% group_by({{ stations }} ) %>% mutate(end = dplyr::last({{ date }})) + data.stack <- data.stack %>% dplyr::group_by({{ stations }} ) %>% dplyr::mutate(end = dplyr::last({{ date }})) } # number and percentage missing summary.data <- data.frame(data.stack %>% - group_by({{stations}}, Element) %>% - filter(({{date}}) >= start & ({{date}}) <= end) %>% - summarise(From = dplyr::first(start), + dplyr::group_by({{stations}}, Element) %>% + dplyr::filter(({{date}}) >= start & ({{date}}) <= end) %>% + dplyr::summarise(From = dplyr::first(start), To = dplyr::last(end), Missing = sum(is.na(value)), Percentage = sum(is.na(value))/n()*100)) # complete years complete.years <- data.stack %>% - group_by({{stations}}) %>% - filter(({{date}}) >= start & ({{date}}) <= end) %>% - group_by(lubridate::year({{date}}), {{stations}}, Element) %>% - summarise(count = sum(is.na(value))) + dplyr::group_by({{stations}}) %>% + dplyr::filter(({{date}}) >= start & ({{date}}) <= end) %>% + dplyr::group_by(lubridate::year({{date}}), {{stations}}, Element) %>% + dplyr::summarise(count = sum(is.na(value))) complete.years <- complete.years %>% - group_by({{stations}}, Element) %>% - summarise(Complete.Years = sum(count == 0)) + dplyr::group_by({{stations}}, Element) %>% + dplyr::summarise(Complete.Years = sum(count == 0)) # bind together @@ -1377,18 +1377,18 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU if (day){ i = i + 1 detail.table.day = data.stack %>% - group_by({{stations}}, Element) %>% - mutate(element.na = data.table::rleid(value)) %>% - filter(is.na(value)) %>% - group_by(element.na, {{stations}}, Element) %>% - summarise(From = dplyr::first({{date}}), + dplyr::group_by({{stations}}, Element) %>% + dplyr::mutate(element.na = data.table::rleid(value)) %>% + dplyr::filter(is.na(value)) %>% + dplyr::group_by(element.na, {{stations}}, Element) %>% + dplyr::summarise(From = dplyr::first({{date}}), To = dplyr::last({{date}}), Count = n()) if (order){ - detail.table.day <- detail.table.day %>% arrange(From) + detail.table.day <- detail.table.day %>% dplyr::arrange(From) } else { - detail.table.day <- detail.table.day %>% arrange(Element) + detail.table.day <- detail.table.day %>% dplyr::arrange(Element) } detail.table.day <- detail.table.day %>% ungroup() %>% dplyr::select(-c("element.na")) @@ -1399,29 +1399,29 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU if (month){ i = i + 1 detail.table.month <- data.stack %>% - mutate(Date.ym = zoo::as.yearmon({{date}})) %>% - group_by(Date.ym, {{stations}}, Element) + dplyr::mutate(Date.ym = zoo::as.yearmon({{date}})) %>% + dplyr::group_by(Date.ym, {{stations}}, Element) detail.table.month <- detail.table.month %>% - summarise(no = n(), + dplyr::summarise(no = n(), na = sum(is.na(value)), From = dplyr::first({{date}}), To = dplyr::last({{date}})) %>% - mutate(is.complete = ifelse(no == na, 1, 0)) # 0 if all are missing + dplyr::mutate(is.complete = ifelse(no == na, 1, 0)) # 0 if all are missing detail.table.month <- detail.table.month %>% - group_by({{stations}}, Element) %>% - mutate(element.na = data.table::rleid(is.complete)) %>% - filter(is.complete == 1) %>% - group_by(element.na, {{stations}}, Element) %>% - summarise(From = dplyr::first(From), + dplyr::group_by({{stations}}, Element) %>% + dplyr::mutate(element.na = data.table::rleid(is.complete)) %>% + dplyr::filter(is.complete == 1) %>% + dplyr::group_by(element.na, {{stations}}, Element) %>% + dplyr::summarise(From = dplyr::first(From), To = dplyr::last(To), Count = n()) if (order){ - detail.table.month <- detail.table.month %>% arrange(From) + detail.table.month <- detail.table.month %>% dplyr::arrange(From) } else { - detail.table.month <- detail.table.month %>% arrange(Element) + detail.table.month <- detail.table.month %>% dplyr::arrange(Element) } detail.table.month <- detail.table.month %>% ungroup() %>% dplyr::select(-c("element.na")) @@ -1431,29 +1431,29 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU if (year) { i = i + 1 detail.table.year <- data.stack %>% - mutate(Date.y = lubridate::year({{date}})) %>% - group_by(Date.y, {{stations}}, Element) + dplyr::mutate(Date.y = lubridate::year({{date}})) %>% + dplyr::group_by(Date.y, {{stations}}, Element) detail.table.year <- detail.table.year %>% - summarise(no = n(), + dplyr::summarise(no = n(), na = sum(is.na(value)), From = dplyr::first({{date}}), To = dplyr::last({{date}})) %>% - mutate(is.complete = ifelse(no == na, 1, 0)) # 0 if all are missing + dplyr::mutate(is.complete = ifelse(no == na, 1, 0)) # 0 if all are missing detail.table.year <- detail.table.year %>% - group_by({{stations}}, Element) %>% - mutate(element.na = data.table::rleid(is.complete)) %>% - filter(is.complete == 1) %>% - group_by(element.na, {{stations}}, Element) %>% - summarise(From = dplyr::first(From), + dplyr::group_by({{stations}}, Element) %>% + dplyr::mutate(element.na = data.table::rleid(is.complete)) %>% + dplyr::filter(is.complete == 1) %>% + dplyr::group_by(element.na, {{stations}}, Element) %>% + dplyr::summarise(From = dplyr::first(From), To = dplyr::last(To), Count = n()) if (order){ - detail.table.year <- detail.table.year %>% arrange(From) + detail.table.year <- detail.table.year %>% dplyr::arrange(From) } else { - detail.table.year <- detail.table.year %>% arrange(Element) + detail.table.year <- detail.table.year %>% dplyr::arrange(Element) } detail.table.year <- detail.table.year %>% ungroup() %>% dplyr::select(-c("element.na")) From 8600e6d034645434990fba6226fb0a3b15d920e2 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Fri, 11 Sep 2020 15:42:32 +0000 Subject: [PATCH 125/277] Added controls to the Time Series dialog --- instat/dlgTimeSeriesPlot.Designer.vb | 184 ++++++++++++++++++++++++++- 1 file changed, 181 insertions(+), 3 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb index 74fef489f0c..38200b5c2f4 100644 --- a/instat/dlgTimeSeriesPlot.Designer.vb +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -23,30 +23,208 @@ Partial Class dlgTimeSeriesPlot _ Private Sub InitializeComponent() Me.ucrBase = New instat.ucrButtons() + Me.ucrDataSelector = New instat.ucrSelectorByDataFrameAddRemove() + Me.lblReference = New System.Windows.Forms.Label() + Me.ucrReceiverReference = New instat.ucrReceiverSingle() + Me.UcrReceiverSingle2 = New instat.ucrReceiverSingle() + Me.lblEstimate = New System.Windows.Forms.Label() + Me.lblYear = New System.Windows.Forms.Label() + Me.ucrReceiverYear = New instat.ucrReceiverSingle() + Me.lblStation = New System.Windows.Forms.Label() + Me.UcrReceiverSingle4 = New instat.ucrReceiverSingle() + Me.ucrChkValues = New instat.ucrCheck() + Me.ucrChkIncludeMeanLines = New instat.ucrCheck() + Me.ucrChkIncludePoints = New instat.ucrCheck() + Me.cmdSummaries = New System.Windows.Forms.Button() + Me.ucrSavePlot = New instat.ucrSaveGraph() Me.SuspendLayout() ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(12, 297) + Me.ucrBase.Location = New System.Drawing.Point(9, 425) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 0 ' + 'ucrDataSelector + ' + Me.ucrDataSelector.bDropUnusedFilterLevels = False + Me.ucrDataSelector.bShowHiddenColumns = False + Me.ucrDataSelector.bUseCurrentFilter = True + Me.ucrDataSelector.Location = New System.Drawing.Point(12, 9) + Me.ucrDataSelector.Margin = New System.Windows.Forms.Padding(0) + Me.ucrDataSelector.Name = "ucrDataSelector" + Me.ucrDataSelector.Size = New System.Drawing.Size(218, 180) + Me.ucrDataSelector.TabIndex = 1 + ' + 'lblReference + ' + Me.lblReference.AutoSize = True + Me.lblReference.Location = New System.Drawing.Point(286, 15) + Me.lblReference.Name = "lblReference" + Me.lblReference.Size = New System.Drawing.Size(60, 13) + Me.lblReference.TabIndex = 2 + Me.lblReference.Text = "Reference:" + ' + 'ucrReceiverReference + ' + Me.ucrReceiverReference.frmParent = Me + Me.ucrReceiverReference.Location = New System.Drawing.Point(286, 39) + Me.ucrReceiverReference.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverReference.Name = "ucrReceiverReference" + Me.ucrReceiverReference.Selector = Nothing + Me.ucrReceiverReference.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverReference.strNcFilePath = "" + Me.ucrReceiverReference.TabIndex = 3 + Me.ucrReceiverReference.ucrSelector = Nothing + ' + 'UcrReceiverSingle2 + ' + Me.UcrReceiverSingle2.frmParent = Me + Me.UcrReceiverSingle2.Location = New System.Drawing.Point(286, 92) + Me.UcrReceiverSingle2.Margin = New System.Windows.Forms.Padding(0) + Me.UcrReceiverSingle2.Name = "UcrReceiverSingle2" + Me.UcrReceiverSingle2.Selector = Nothing + Me.UcrReceiverSingle2.Size = New System.Drawing.Size(120, 20) + Me.UcrReceiverSingle2.strNcFilePath = "" + Me.UcrReceiverSingle2.TabIndex = 4 + Me.UcrReceiverSingle2.ucrSelector = Nothing + ' + 'lblEstimate + ' + Me.lblEstimate.AutoSize = True + Me.lblEstimate.Location = New System.Drawing.Point(286, 67) + Me.lblEstimate.Name = "lblEstimate" + Me.lblEstimate.Size = New System.Drawing.Size(50, 13) + Me.lblEstimate.TabIndex = 5 + Me.lblEstimate.Text = "Estimate:" + ' + 'lblYear + ' + Me.lblYear.AutoSize = True + Me.lblYear.Location = New System.Drawing.Point(286, 119) + Me.lblYear.Name = "lblYear" + Me.lblYear.Size = New System.Drawing.Size(32, 13) + Me.lblYear.TabIndex = 6 + Me.lblYear.Text = "Year:" + ' + 'ucrReceiverYear + ' + Me.ucrReceiverYear.frmParent = Me + Me.ucrReceiverYear.Location = New System.Drawing.Point(286, 151) + Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverYear.Name = "ucrReceiverYear" + Me.ucrReceiverYear.Selector = Nothing + Me.ucrReceiverYear.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverYear.strNcFilePath = "" + Me.ucrReceiverYear.TabIndex = 7 + Me.ucrReceiverYear.ucrSelector = Nothing + ' + 'lblStation + ' + Me.lblStation.AutoSize = True + Me.lblStation.Location = New System.Drawing.Point(286, 180) + Me.lblStation.Name = "lblStation" + Me.lblStation.Size = New System.Drawing.Size(43, 13) + Me.lblStation.TabIndex = 8 + Me.lblStation.Text = "Station:" + ' + 'UcrReceiverSingle4 + ' + Me.UcrReceiverSingle4.frmParent = Me + Me.UcrReceiverSingle4.Location = New System.Drawing.Point(286, 208) + Me.UcrReceiverSingle4.Margin = New System.Windows.Forms.Padding(0) + Me.UcrReceiverSingle4.Name = "UcrReceiverSingle4" + Me.UcrReceiverSingle4.Selector = Nothing + Me.UcrReceiverSingle4.Size = New System.Drawing.Size(120, 20) + Me.UcrReceiverSingle4.strNcFilePath = "" + Me.UcrReceiverSingle4.TabIndex = 9 + Me.UcrReceiverSingle4.ucrSelector = Nothing + ' + 'ucrChkValues + ' + Me.ucrChkValues.Checked = False + Me.ucrChkValues.Location = New System.Drawing.Point(12, 235) + Me.ucrChkValues.Name = "ucrChkValues" + Me.ucrChkValues.Size = New System.Drawing.Size(100, 20) + Me.ucrChkValues.TabIndex = 10 + ' + 'ucrChkIncludeMeanLines + ' + Me.ucrChkIncludeMeanLines.Checked = False + Me.ucrChkIncludeMeanLines.Location = New System.Drawing.Point(12, 310) + Me.ucrChkIncludeMeanLines.Name = "ucrChkIncludeMeanLines" + Me.ucrChkIncludeMeanLines.Size = New System.Drawing.Size(100, 20) + Me.ucrChkIncludeMeanLines.TabIndex = 11 + ' + 'ucrChkIncludePoints + ' + Me.ucrChkIncludePoints.Checked = False + Me.ucrChkIncludePoints.Location = New System.Drawing.Point(12, 274) + Me.ucrChkIncludePoints.Name = "ucrChkIncludePoints" + Me.ucrChkIncludePoints.Size = New System.Drawing.Size(100, 20) + Me.ucrChkIncludePoints.TabIndex = 12 + ' + 'cmdSummaries + ' + Me.cmdSummaries.Location = New System.Drawing.Point(12, 336) + Me.cmdSummaries.Name = "cmdSummaries" + Me.cmdSummaries.Size = New System.Drawing.Size(115, 32) + Me.cmdSummaries.TabIndex = 13 + Me.cmdSummaries.Text = "Summaries" + Me.cmdSummaries.UseVisualStyleBackColor = True + ' + 'ucrSavePlot + ' + Me.ucrSavePlot.Location = New System.Drawing.Point(12, 385) + Me.ucrSavePlot.Name = "ucrSavePlot" + Me.ucrSavePlot.Size = New System.Drawing.Size(265, 20) + Me.ucrSavePlot.TabIndex = 14 + ' 'dlgTimeSeriesPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(428, 358) + Me.ClientSize = New System.Drawing.Size(428, 482) + Me.Controls.Add(Me.ucrSavePlot) + Me.Controls.Add(Me.cmdSummaries) + Me.Controls.Add(Me.ucrChkIncludePoints) + Me.Controls.Add(Me.ucrChkIncludeMeanLines) + Me.Controls.Add(Me.ucrChkValues) + Me.Controls.Add(Me.UcrReceiverSingle4) + Me.Controls.Add(Me.lblStation) + Me.Controls.Add(Me.ucrReceiverYear) + Me.Controls.Add(Me.lblYear) + Me.Controls.Add(Me.lblEstimate) + Me.Controls.Add(Me.UcrReceiverSingle2) + Me.Controls.Add(Me.ucrReceiverReference) + Me.Controls.Add(Me.lblReference) + Me.Controls.Add(Me.ucrDataSelector) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgTimeSeriesPlot" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "Time Series Plot" + Me.Text = "Time Series Comparisons" Me.ResumeLayout(False) + Me.PerformLayout() End Sub Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrDataSelector As ucrSelectorByDataFrameAddRemove + Friend WithEvents lblReference As Label + Friend WithEvents ucrReceiverReference As ucrReceiverSingle + Friend WithEvents ucrSavePlot As ucrSaveGraph + Friend WithEvents cmdSummaries As Button + Friend WithEvents ucrChkIncludePoints As ucrCheck + Friend WithEvents ucrChkIncludeMeanLines As ucrCheck + Friend WithEvents ucrChkValues As ucrCheck + Friend WithEvents UcrReceiverSingle4 As ucrReceiverSingle + Friend WithEvents lblStation As Label + Friend WithEvents ucrReceiverYear As ucrReceiverSingle + Friend WithEvents lblYear As Label + Friend WithEvents lblEstimate As Label + Friend WithEvents UcrReceiverSingle2 As ucrReceiverSingle End Class From c8f5635a223478e3e1eea645217e69b73a2772a7 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Fri, 11 Sep 2020 15:59:37 +0000 Subject: [PATCH 126/277] Added time series sub dialog --- instat/instat.vbproj | 9 ++ instat/sdgTimeSeries.Designer.vb | 203 +++++++++++++++++++++++++++++++ instat/sdgTimeSeries.resx | 120 ++++++++++++++++++ instat/sdgTimeSeries.vb | 3 + 4 files changed, 335 insertions(+) create mode 100644 instat/sdgTimeSeries.Designer.vb create mode 100644 instat/sdgTimeSeries.resx create mode 100644 instat/sdgTimeSeries.vb diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 9a6cf6009f9..74a764bf5a9 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -1188,6 +1188,12 @@ Form + + sdgTimeSeries.vb + + + Form + sdgTwoWayFrequencies.vb @@ -4350,6 +4356,9 @@ sdgThemes.vb + + sdgTimeSeries.vb + sdgTwoWayFrequencies.vb diff --git a/instat/sdgTimeSeries.Designer.vb b/instat/sdgTimeSeries.Designer.vb new file mode 100644 index 00000000000..f5f705cb0c5 --- /dev/null +++ b/instat/sdgTimeSeries.Designer.vb @@ -0,0 +1,203 @@ + _ +Partial Class sdgTimeSeries + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.Summaries = New System.Windows.Forms.GroupBox() + Me.UcrCheck6 = New instat.ucrCheck() + Me.UcrCheck5 = New instat.ucrCheck() + Me.UcrCheck4 = New instat.ucrCheck() + Me.UcrCheck3 = New instat.ucrCheck() + Me.UcrCheck2 = New instat.ucrCheck() + Me.UcrCheck1 = New instat.ucrCheck() + Me.ucrInputSeparator = New System.Windows.Forms.TextBox() + Me.lblSeparator = New System.Windows.Forms.Label() + Me.lblPosition = New System.Windows.Forms.Label() + Me.lblFontSize = New System.Windows.Forms.Label() + Me.ucrInputPosition = New instat.ucrInputComboBox() + Me.ucrInputFontSize = New System.Windows.Forms.TextBox() + Me.ucrButtonsSummaries = New instat.ucrButtonsSubdialogue() + Me.Summaries.SuspendLayout() + Me.SuspendLayout() + ' + 'Summaries + ' + Me.Summaries.Controls.Add(Me.UcrCheck6) + Me.Summaries.Controls.Add(Me.UcrCheck5) + Me.Summaries.Controls.Add(Me.UcrCheck4) + Me.Summaries.Controls.Add(Me.UcrCheck3) + Me.Summaries.Controls.Add(Me.UcrCheck2) + Me.Summaries.Controls.Add(Me.UcrCheck1) + Me.Summaries.Location = New System.Drawing.Point(11, 13) + Me.Summaries.Name = "Summaries" + Me.Summaries.Size = New System.Drawing.Size(332, 139) + Me.Summaries.TabIndex = 0 + Me.Summaries.TabStop = False + Me.Summaries.Text = "grpSummaries" + ' + 'UcrCheck6 + ' + Me.UcrCheck6.Checked = False + Me.UcrCheck6.Location = New System.Drawing.Point(219, 65) + Me.UcrCheck6.Name = "UcrCheck6" + Me.UcrCheck6.Size = New System.Drawing.Size(100, 20) + Me.UcrCheck6.TabIndex = 5 + ' + 'UcrCheck5 + ' + Me.UcrCheck5.Checked = False + Me.UcrCheck5.Location = New System.Drawing.Point(113, 65) + Me.UcrCheck5.Name = "UcrCheck5" + Me.UcrCheck5.Size = New System.Drawing.Size(100, 20) + Me.UcrCheck5.TabIndex = 4 + ' + 'UcrCheck4 + ' + Me.UcrCheck4.Checked = False + Me.UcrCheck4.Location = New System.Drawing.Point(7, 65) + Me.UcrCheck4.Name = "UcrCheck4" + Me.UcrCheck4.Size = New System.Drawing.Size(100, 20) + Me.UcrCheck4.TabIndex = 3 + ' + 'UcrCheck3 + ' + Me.UcrCheck3.Checked = False + Me.UcrCheck3.Location = New System.Drawing.Point(219, 29) + Me.UcrCheck3.Name = "UcrCheck3" + Me.UcrCheck3.Size = New System.Drawing.Size(100, 20) + Me.UcrCheck3.TabIndex = 2 + ' + 'UcrCheck2 + ' + Me.UcrCheck2.Checked = False + Me.UcrCheck2.Location = New System.Drawing.Point(113, 29) + Me.UcrCheck2.Name = "UcrCheck2" + Me.UcrCheck2.Size = New System.Drawing.Size(100, 20) + Me.UcrCheck2.TabIndex = 1 + ' + 'UcrCheck1 + ' + Me.UcrCheck1.Checked = False + Me.UcrCheck1.Location = New System.Drawing.Point(7, 29) + Me.UcrCheck1.Name = "UcrCheck1" + Me.UcrCheck1.Size = New System.Drawing.Size(100, 20) + Me.UcrCheck1.TabIndex = 0 + ' + 'ucrInputSeparator + ' + Me.ucrInputSeparator.Location = New System.Drawing.Point(87, 167) + Me.ucrInputSeparator.Name = "ucrInputSeparator" + Me.ucrInputSeparator.Size = New System.Drawing.Size(100, 20) + Me.ucrInputSeparator.TabIndex = 1 + ' + 'lblSeparator + ' + Me.lblSeparator.AutoSize = True + Me.lblSeparator.Location = New System.Drawing.Point(13, 170) + Me.lblSeparator.Name = "lblSeparator" + Me.lblSeparator.Size = New System.Drawing.Size(56, 13) + Me.lblSeparator.TabIndex = 2 + Me.lblSeparator.Text = "Separator:" + ' + 'lblPosition + ' + Me.lblPosition.AutoSize = True + Me.lblPosition.Location = New System.Drawing.Point(22, 203) + Me.lblPosition.Name = "lblPosition" + Me.lblPosition.Size = New System.Drawing.Size(47, 13) + Me.lblPosition.TabIndex = 3 + Me.lblPosition.Text = "Position:" + ' + 'lblFontSize + ' + Me.lblFontSize.AutoSize = True + Me.lblFontSize.Location = New System.Drawing.Point(15, 238) + Me.lblFontSize.Name = "lblFontSize" + Me.lblFontSize.Size = New System.Drawing.Size(54, 13) + Me.lblFontSize.TabIndex = 4 + Me.lblFontSize.Text = "Font Size:" + ' + 'ucrInputPosition + ' + Me.ucrInputPosition.AddQuotesIfUnrecognised = True + Me.ucrInputPosition.GetSetSelectedIndex = -1 + Me.ucrInputPosition.IsReadOnly = False + Me.ucrInputPosition.Location = New System.Drawing.Point(87, 200) + Me.ucrInputPosition.Name = "ucrInputPosition" + Me.ucrInputPosition.Size = New System.Drawing.Size(100, 21) + Me.ucrInputPosition.TabIndex = 5 + ' + 'ucrInputFontSize + ' + Me.ucrInputFontSize.Location = New System.Drawing.Point(87, 231) + Me.ucrInputFontSize.Name = "ucrInputFontSize" + Me.ucrInputFontSize.Size = New System.Drawing.Size(100, 20) + Me.ucrInputFontSize.TabIndex = 6 + ' + 'ucrButtonsSummaries + ' + Me.ucrButtonsSummaries.Location = New System.Drawing.Point(96, 277) + Me.ucrButtonsSummaries.Margin = New System.Windows.Forms.Padding(4) + Me.ucrButtonsSummaries.Name = "ucrButtonsSummaries" + Me.ucrButtonsSummaries.Size = New System.Drawing.Size(150, 31) + Me.ucrButtonsSummaries.TabIndex = 7 + ' + 'sdgTimeSeries + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(349, 321) + Me.Controls.Add(Me.ucrButtonsSummaries) + Me.Controls.Add(Me.ucrInputFontSize) + Me.Controls.Add(Me.ucrInputPosition) + Me.Controls.Add(Me.lblFontSize) + Me.Controls.Add(Me.lblPosition) + Me.Controls.Add(Me.lblSeparator) + Me.Controls.Add(Me.ucrInputSeparator) + Me.Controls.Add(Me.Summaries) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgTimeSeries" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Summaries" + Me.Summaries.ResumeLayout(False) + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents Summaries As GroupBox + Friend WithEvents UcrCheck6 As ucrCheck + Friend WithEvents UcrCheck5 As ucrCheck + Friend WithEvents UcrCheck4 As ucrCheck + Friend WithEvents UcrCheck3 As ucrCheck + Friend WithEvents UcrCheck2 As ucrCheck + Friend WithEvents UcrCheck1 As ucrCheck + Friend WithEvents ucrInputSeparator As TextBox + Friend WithEvents lblSeparator As Label + Friend WithEvents lblPosition As Label + Friend WithEvents lblFontSize As Label + Friend WithEvents ucrInputPosition As ucrInputComboBox + Friend WithEvents ucrInputFontSize As TextBox + Friend WithEvents ucrButtonsSummaries As ucrButtonsSubdialogue +End Class diff --git a/instat/sdgTimeSeries.resx b/instat/sdgTimeSeries.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgTimeSeries.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb new file mode 100644 index 00000000000..8e40a5f2814 --- /dev/null +++ b/instat/sdgTimeSeries.vb @@ -0,0 +1,3 @@ +Public Class sdgTimeSeries + +End Class \ No newline at end of file From cb6df38b2198351079a3ce4753328e820fd7ecfe Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 14 Sep 2020 12:21:06 +0300 Subject: [PATCH 127/277] fixing minimum dates according to the sources --- instat/dlgImportGriddedData.vb | 6 ++ .../static/InstatObject/R/instat_object_R6.R | 58 +++++++++---------- 2 files changed, 35 insertions(+), 29 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 5116fb149eb..b98f94b2f64 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -175,6 +175,7 @@ Public Class dlgImportGriddedData dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." + ucrDtpMinDate.MinDate = New Date(2000, 10, 31) Case "CHIRPS_V2P0" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily_0p25", Chr(34) & "daily_0p25" & Chr(34)) @@ -188,6 +189,7 @@ Public Class dlgImportGriddedData dctFiles.Add("Monthly_Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_0p25" + ucrDtpMinDate.MinDate = New Date(1981, 1, 1) Case "TAMSAT" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Rainfall_Estimates", Chr(34) & "rainfall_estimates" & Chr(34)) @@ -197,6 +199,7 @@ Public Class dlgImportGriddedData dctFiles.Add("Standard_Precipitation_Index_1-dekad", Chr(34) & "SPI_1_dekad" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Rainfall_Estimates" + ucrDtpMinDate.MinDate = New Date(1983, 1, 11) Case "NOAA_ARC2" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) @@ -204,6 +207,7 @@ Public Class dlgImportGriddedData 'monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." + ucrDtpMinDate.MinDate = New Date(1983, 1, 1) Case "NOAA_CMORPH_DAILY", "NOAA_CMORPH_3HOURLY", "NOAA_CMORPH_DAILY_CALCULATED" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Mean_Morphed_Est._Prcp.", Chr(34) & "mean_morphed_est_prcp" & Chr(34)) @@ -214,6 +218,7 @@ Public Class dlgImportGriddedData dctFiles.Add("Renamed102015_Mean_Morphed_Est._Prcp.", Chr(34) & "renamed102015_mean_morphed_est_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Mean_Morphed_Est._Prcp." + 'ucrDtpMinDate.MinDate = New Date(2000, 10, 31) This source(CMORPH) is currently not available seems to have been moved elsewhere! Case "NASA_TRMM_3B42" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) @@ -222,6 +227,7 @@ Public Class dlgImportGriddedData dctFiles.Add("3-Hourly_Pre-gauge_Adjusted_Microwave_Est._Prcp.", Chr(34) & "3_hourly_pre_gauge_adjusted_microwave_est_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." + ucrDtpMinDate.MinDate = New Date(1998, 1, 1) End Select End Sub diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index c771b1585e8..572d33f9cd4 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2089,38 +2089,38 @@ DataBook$set("public","package_check", function(package) { ) DataBook$set("public", "download_from_IRI", function(source, data, path, min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ - init_URL <- "https://iridl.ldeo.columbia.edu/" - if(source == "CHIRPS_V2P0"){prexyaddress <- paste0(init_URL, "SOURCES/.UCSB/.CHIRPS/.v2p0") - if(data == "daily_0p25") {extension <- ".daily/.global/.0p25/.prcp"} - else if(data == "daily_improved_0p25") {extension <- ".daily-improved/.global/.0p25/.prcp"} - else if (data == "daily_0p05") {extension <- ".daily/.global/.0p05/.prcp"} - else if(data == "daily_improved_0p05") {extension <- ".daily-improved/.global/.0p05/.prcp"} - else if(data == "dekad") {extension <- ".dekad/.prcp"} - else if(data == "monthly_c8113") {extension <- ".monthly/.global/.c8113/.precipitation"} - else if(data == "monthly_deg1p0") {extension <- ".monthly/.global/.deg1p0/.precipitation"} - else if(data == "monthly_NMME_deg1p0") {extension <- ".monthly/.global/.NMME_deg1p0/.precipitation"} - else if(data == "monthly_prcp") {extension <- ".monthly/.global/.precipitation"} + init_URL <- "https://iridl.ldeo.columbia.edu/SOURCES/" + if(source == "CHIRPS_V2P0"){prexyaddress <- paste0(init_URL, ".UCSB/.CHIRPS/.v2p0") + if(data == "daily_0p25") {extension <- ".daily/.global/.0p25/.prcp"} #1 Jan 1981 to 30 Nov 2015 + else if(data == "daily_improved_0p25") {extension <- ".daily-improved/.global/.0p25/.prcp"}#1 Jan 1981 to 31 Jul 2020 + else if (data == "daily_0p05") {extension <- ".daily/.global/.0p05/.prcp"}# Jan 1981 to 30 Nov 2015 + else if(data == "daily_improved_0p05") {extension <- ".daily-improved/.global/.0p05/.prcp"}#1 Jan 1981 to 31 Jul 2020 + else if(data == "dekad") {extension <- ".dekad/.prcp"}#(days since 1960-01-01) ordered [ (1-10 Jan 1981) (11-20 Jan 1981) (21-31 Jan 1981) ... (21-31 Aug 2020)] + else if(data == "monthly_c8113") {extension <- ".monthly/.global/.c8113/.precipitation"}#months since 01-Jan) periodic (Jan) to (Dec) + else if(data == "monthly_deg1p0") {extension <- ".monthly/.global/.deg1p0/.precipitation"}#months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) + else if(data == "monthly_NMME_deg1p0") {extension <- ".monthly/.global/.NMME_deg1p0/.precipitation"}#months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) + else if(data == "monthly_prcp") {extension <- ".monthly/.global/.precipitation"}#months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) else stop("Data file does not exist for CHIRPS V2P0 data") #Annual and 2Monthly and 3monthly does not exist for CHIRPS_V2P0 }else if(source == "TAMSAT") {prexyaddress <-paste0(init_URL, "home/.remic/.Reading/.Meteorology/.TAMSAT") - if(data == "rainfall_estimates") {extension <- ".TAMSAT-RFE/.rfe"} - else if(data == "rainfall_estimates_0p1") {extension <- ".TAMSAT-RFE_0p1/.rfe"} - else if(data == "reconstructed_rainfall_anomaly") {extension <- ".TAMSAT-RFE/.rfediff"} - else if(data == "sahel_dry_mask") {extension <- ".TAMSAT-RFE/.sahel_drymask"} - else if(data == "SPI_1_dekad") {extension <- ".TAMSAT-RFE/.SPI-rfe_1-dekad_Sahel"} + if(data == "rainfall_estimates") {extension <- ".TAMSAT-RFE/.rfe"}#days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] + else if(data == "rainfall_estimates_0p1") {extension <- ".TAMSAT-RFE_0p1/.rfe"}#(days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] + else if(data == "reconstructed_rainfall_anomaly") {extension <- ".TAMSAT-RFE/.rfediff"}#(days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] + else if(data == "sahel_dry_mask") {extension <- ".TAMSAT-RFE/.sahel_drymask"}#(days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] + else if(data == "SPI_1_dekad") {extension <- ".TAMSAT-RFE/.SPI-rfe_1-dekad_Sahel"}#(days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] else stop("Data file does not exist for TAMSAT data") #monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. - }else if(source == "NOAA_ARC2") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.FEWS/.Africa/.DAILY/.ARC2") - if(data == "daily_estimated_prcp") {extension <- ".daily/.est_prcp"} - else if(data == "monthly_average_estimated_prcp") {extension <- ".monthly/.est_prcp"} + }else if(source == "NOAA_ARC2") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa/.DAILY/.ARC2") + if(data == "daily_estimated_prcp") {extension <- ".daily/.est_prcp"}#(days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) + else if(data == "monthly_average_estimated_prcp") {extension <- ".monthly/.est_prcp"}#(months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) else stop("Data file does not exist for NOAA ARC2 data") - }else if(source=="NOAA_RFE2") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.FEWS/.Africa") - if(data == "daily_estimated_prcp"){extension <- ".DAILY/.RFEv2/.est_prcp"} + }else if(source=="NOAA_RFE2") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa") + if(data == "daily_estimated_prcp"){extension <- ".DAILY/.RFEv2/.est_prcp"}#(days since 2000-10-31 12:00:00) ordered (31 Oct 2000) to (12 Sep 2020) else stop("Data file does not exist for NOAA RFE2 data") }else if(source=="NOAA_CMORPH_DAILY" || source=="NOAA_CMORPH_3HOURLY" || source=="NOAA_CMORPH_DAILY_CALCULATED") { - if(source=="NOAA_CMORPH_DAILY") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.daily")} - else if(source == "NOAA_CMORPH_3HOURLY") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.3-hourly")} - else if(source == "NOAA_CMORPH_DAILY_CALCULATED") {prexyaddress <- paste0(init_URL, "SOURCES/.NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated")} + if(source=="NOAA_CMORPH_DAILY") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily")} + else if(source == "NOAA_CMORPH_3HOURLY") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.3-hourly")} + else if(source == "NOAA_CMORPH_DAILY_CALCULATED") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated")} if(data == "mean_microwave_only_est_prcp") {extension <- ".mean/.microwave-only/.comb"} else if(data == "mean_morphed_est_prcp") {extension <- ".mean/.morphed/.cmorph"} else if(data == "orignames_mean_microwave_only_est_prcp") {extension <- ".orignames/.mean/.microwave-only/.comb"} @@ -2128,11 +2128,11 @@ DataBook$set("public", "download_from_IRI", function(source, data, path, min_lon else if(data == "renamed102015_mean_microwave_only_est_prcp") {extension <- ".renamed102015/.mean/.microwave-only/.comb"} else if(data == "renamed102015_mean_morphed_est_prcp") {extension <- ".renamed102015/.mean/.morphed/.cmorph"} else stop("Data file does not exist for NOAA CMORPH data") - }else if(source=="NASA_TRMM_3B42") {prexyaddress <- paste0(init_URL, "SOURCES/.NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") - if(data == "daily_estimated_prcp") {extension <- ".daily/.precipitation"} - else if(data == "3_hourly_estimated_prcp") {extension <- ".three-hourly/.precipitation"} - else if(data == "3_hourly_pre_gauge_adjusted_infrared_est_prcp") {extension <- ".three-hourly/.IRprecipitation"} - else if(data == "3_hourly_pre_gauge_adjusted_microwave_est_prcp") {extension <- ".three-hourly/.HQprecipitation"} + }else if(source=="NASA_TRMM_3B42") {prexyaddress <- paste0(init_URL, ".NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") + if(data == "daily_estimated_prcp") {extension <- ".daily/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (1 Jan 1998) to (31 May 2015) + else if(data == "3_hourly_estimated_prcp") {extension <- ".three-hourly/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) + else if(data == "3_hourly_pre_gauge_adjusted_infrared_est_prcp") {extension <- ".three-hourly/.IRprecipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) + else if(data == "3_hourly_pre_gauge_adjusted_microwave_est_prcp") {extension <- ".three-hourly/.HQprecipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) else stop("Data file does not exist for NASA TRMM 3B42 data") }else{stop("Source not specified correctly.")} prexyaddress <- paste(prexyaddress, extension, sep="/") From ee6eb0f3d45f8ffed5c5d70c3d77ca9306d6e8a0 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 14 Sep 2020 12:47:52 +0300 Subject: [PATCH 128/277] Preventing the user from selecting From date above To date --- instat/dlgImportGriddedData.vb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index b98f94b2f64..5f35709c767 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -145,7 +145,7 @@ Public Class dlgImportGriddedData End Sub Private Sub TestOkEnabled() - If ucrInputNewDataFrameName.IsEmpty OrElse (rdoPoint.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty)) OrElse (rdoArea.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty OrElse ucrInputMaxLon.IsEmpty OrElse ucrInputMaxLat.IsEmpty)) OrElse (ucrChkSaveFileLocation.Checked AndAlso ucrInputFilePath.IsEmpty) Then + If ucrInputNewDataFrameName.IsEmpty OrElse (rdoPoint.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty)) OrElse (rdoArea.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty OrElse ucrInputMaxLon.IsEmpty OrElse ucrInputMaxLat.IsEmpty)) OrElse (ucrChkSaveFileLocation.Checked AndAlso ucrInputFilePath.IsEmpty) OrElse (Not ucrChkWholeRange.Checked AndAlso ucrDtpMinDate.DateValue > ucrDtpMaxDate.DateValue) Then ucrBase.OKEnabled(False) Else ucrBase.OKEnabled(True) @@ -253,7 +253,13 @@ Public Class dlgImportGriddedData End If End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrPnlDownloadType.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrChkSaveFileLocation.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged + Private Sub ucrDtpMaxDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDtpMaxDate.ControlValueChanged, ucrDtpMinDate.ControlValueChanged + If ucrDtpMinDate.DateValue > ucrDtpMaxDate.DateValue Then + MsgBox("From date is greater than To date. Ok will Not be enabled on the dialog.", Title:="Date bounds", Buttons:=MsgBoxStyle.Information) + End If + End Sub + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrPnlDownloadType.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrChkSaveFileLocation.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged, ucrChkWholeRange.ControlContentsChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged TestOkEnabled() End Sub End Class \ No newline at end of file From 15b67b13bd61d729e130d2b7c91f41e1e10bae70 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 14 Sep 2020 21:22:56 +0300 Subject: [PATCH 129/277] removed current date function and added a boolean to allow showing of message box only once --- instat/dlgImportGriddedData.vb | 9 +++++---- instat/ucrDateTimePicker.vb | 8 -------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 5f35709c767..6567be602b4 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -19,6 +19,7 @@ Imports instat.Translations Public Class dlgImportGriddedData Private bFirstLoad As Boolean = True Private bReset As Boolean = True + Private bShowMessageBox As Boolean Private clsDownloadFromIRIFunction As New RFunction Private clsDefaultStartDate, clsDefaultEndDate As New RFunction Private dctDownloadPairs, dctFiles As New Dictionary(Of String, String) @@ -114,13 +115,12 @@ Public Class dlgImportGriddedData clsDefaultStartDate.SetRCommand("as.Date") clsDefaultStartDate.AddParameter("x", Chr(34) & "2000/10/31" & Chr(34)) - clsDefaultEndDate = New RFunction - clsDefaultEndDate.SetRCommand("as.Date") - clsDefaultEndDate.AddParameter("x", ucrDtpMaxDate.CurrentDate()) + clsDefaultEndDate = ucrDtpMaxDate.ValueAsRDate End Sub Private Sub SetDefaults() clsDownloadFromIRIFunction = New RFunction + bShowMessageBox = True clsDownloadFromIRIFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$download_from_IRI") clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NOAA_RFE2" & Chr(34), iPosition:=0) @@ -254,8 +254,9 @@ Public Class dlgImportGriddedData End Sub Private Sub ucrDtpMaxDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDtpMaxDate.ControlValueChanged, ucrDtpMinDate.ControlValueChanged - If ucrDtpMinDate.DateValue > ucrDtpMaxDate.DateValue Then + If ucrDtpMinDate.DateValue > ucrDtpMaxDate.DateValue AndAlso bShowMessageBox Then MsgBox("From date is greater than To date. Ok will Not be enabled on the dialog.", Title:="Date bounds", Buttons:=MsgBoxStyle.Information) + bShowMessageBox = False End If End Sub diff --git a/instat/ucrDateTimePicker.vb b/instat/ucrDateTimePicker.vb index 467e3f8dad0..dd5a97ff9f5 100644 --- a/instat/ucrDateTimePicker.vb +++ b/instat/ucrDateTimePicker.vb @@ -185,12 +185,4 @@ Public Class ucrDateTimePicker Public Function DateValue() As Date Return dtpDateTime.Value End Function - - Public Function CurrentDate(Optional bWithQuotes As Boolean = True) As String - Dim strCurrDate As String = dtpDateTime.Value.Year & "/" & dtpDateTime.Value.Month & "/" & dtpDateTime.Value.Day - If bWithQuotes Then - strCurrDate = Chr(34) & strCurrDate & Chr(34) - End If - Return strCurrDate - End Function End Class From 249a9d017a83a70287e491aa1934e0c9aef0b51b Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 14 Sep 2020 21:26:58 +0300 Subject: [PATCH 130/277] restricted maximum date pickers --- instat/dlgImportGriddedData.vb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 6567be602b4..f4e0f133d05 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -176,6 +176,7 @@ Public Class dlgImportGriddedData ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." ucrDtpMinDate.MinDate = New Date(2000, 10, 31) + ucrDtpMaxDate.MinDate = New Date(2000, 10, 31) Case "CHIRPS_V2P0" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily_0p25", Chr(34) & "daily_0p25" & Chr(34)) @@ -190,6 +191,7 @@ Public Class dlgImportGriddedData ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_0p25" ucrDtpMinDate.MinDate = New Date(1981, 1, 1) + ucrDtpMaxDate.MinDate = New Date(1981, 1, 1) Case "TAMSAT" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Rainfall_Estimates", Chr(34) & "rainfall_estimates" & Chr(34)) @@ -200,6 +202,7 @@ Public Class dlgImportGriddedData ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Rainfall_Estimates" ucrDtpMinDate.MinDate = New Date(1983, 1, 11) + ucrDtpMaxDate.MinDate = New Date(1983, 1, 11) Case "NOAA_ARC2" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) @@ -208,6 +211,7 @@ Public Class dlgImportGriddedData ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." ucrDtpMinDate.MinDate = New Date(1983, 1, 1) + ucrDtpMaxDate.MinDate = New Date(1983, 1, 1) Case "NOAA_CMORPH_DAILY", "NOAA_CMORPH_3HOURLY", "NOAA_CMORPH_DAILY_CALCULATED" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Mean_Morphed_Est._Prcp.", Chr(34) & "mean_morphed_est_prcp" & Chr(34)) @@ -228,6 +232,7 @@ Public Class dlgImportGriddedData ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." ucrDtpMinDate.MinDate = New Date(1998, 1, 1) + ucrDtpMaxDate.MinDate = New Date(1998, 1, 1) End Select End Sub From 97fe69607aea7eb8c6b22a25b503e266a6310e79 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 15 Sep 2020 12:15:33 +0300 Subject: [PATCH 131/277] redesigning the dialog --- instat/dlgImportGriddedData.Designer.vb | 286 +++++---- instat/dlgImportGriddedData.resx | 758 +++++++++++++----------- 2 files changed, 576 insertions(+), 468 deletions(-) diff --git a/instat/dlgImportGriddedData.Designer.vb b/instat/dlgImportGriddedData.Designer.vb index e0fcc051adb..a30b5260f35 100644 --- a/instat/dlgImportGriddedData.Designer.vb +++ b/instat/dlgImportGriddedData.Designer.vb @@ -39,53 +39,57 @@ Partial Class dlgImportGriddedData Private Sub InitializeComponent() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(dlgImportGriddedData)) - Me.lblMinLat = New System.Windows.Forms.Label() + Me.lblLat = New System.Windows.Forms.Label() Me.lblMaxLat = New System.Windows.Forms.Label() - Me.lblMinLon = New System.Windows.Forms.Label() + Me.lblLon = New System.Windows.Forms.Label() Me.lblMaxLon = New System.Windows.Forms.Label() Me.lblNewDataFrameName = New System.Windows.Forms.Label() Me.lblSource = New System.Windows.Forms.Label() Me.lblData = New System.Windows.Forms.Label() Me.cmdBrowse = New System.Windows.Forms.Button() - Me.grpDownloadType = New System.Windows.Forms.GroupBox() - Me.rdoPoint = New System.Windows.Forms.RadioButton() - Me.rdoArea = New System.Windows.Forms.RadioButton() - Me.grpDataRange = New System.Windows.Forms.GroupBox() + Me.grpDateRange = New System.Windows.Forms.GroupBox() + Me.rdoCustomRange = New System.Windows.Forms.RadioButton() + Me.rdoEntireRange = New System.Windows.Forms.RadioButton() Me.lblTo = New System.Windows.Forms.Label() Me.lblFrom = New System.Windows.Forms.Label() + Me.grpLocationRange = New System.Windows.Forms.GroupBox() + Me.rdoPoint = New System.Windows.Forms.RadioButton() + Me.rdoArea = New System.Windows.Forms.RadioButton() + Me.lblMinLon = New System.Windows.Forms.Label() + Me.lblMinLat = New System.Windows.Forms.Label() + Me.lblSaveDownloadedFileTo = New System.Windows.Forms.Label() Me.ucrInputNewDataFrameName = New instat.ucrInputTextBox() Me.ucrChkDontImportData = New instat.ucrCheck() - Me.ucrChkSaveFileLocation = New instat.ucrCheck() - Me.ucrInputMinLat = New instat.ucrInputTextBox() - Me.ucrInputMaxLat = New instat.ucrInputTextBox() - Me.ucrInputMinLon = New instat.ucrInputTextBox() - Me.ucrInputMaxLon = New instat.ucrInputTextBox() - Me.ucrChkWholeRange = New instat.ucrCheck() Me.ucrDtpMinDate = New instat.ucrDateTimePicker() Me.ucrDtpMaxDate = New instat.ucrDateTimePicker() - Me.ucrPnlDownloadType = New instat.UcrPanel() + Me.ucrPnlDateRange = New instat.UcrPanel() Me.ucrInputFilePath = New instat.ucrInputTextBox() Me.ucrInputData = New instat.ucrInputComboBox() Me.ucrInputSource = New instat.ucrInputComboBox() Me.ucrBase = New instat.ucrButtons() - Me.grpDownloadType.SuspendLayout() - Me.grpDataRange.SuspendLayout() + Me.ucrPnlLocationRange = New instat.UcrPanel() + Me.ucrInputMinLon = New instat.ucrInputTextBox() + Me.ucrInputMinLat = New instat.ucrInputTextBox() + Me.ucrInputMaxLat = New instat.ucrInputTextBox() + Me.ucrInputMaxLon = New instat.ucrInputTextBox() + Me.grpDateRange.SuspendLayout() + Me.grpLocationRange.SuspendLayout() Me.SuspendLayout() ' - 'lblMinLat + 'lblLat ' - resources.ApplyResources(Me.lblMinLat, "lblMinLat") - Me.lblMinLat.Name = "lblMinLat" + resources.ApplyResources(Me.lblLat, "lblLat") + Me.lblLat.Name = "lblLat" ' 'lblMaxLat ' resources.ApplyResources(Me.lblMaxLat, "lblMaxLat") Me.lblMaxLat.Name = "lblMaxLat" ' - 'lblMinLon + 'lblLon ' - resources.ApplyResources(Me.lblMinLon, "lblMinLon") - Me.lblMinLon.Name = "lblMinLon" + resources.ApplyResources(Me.lblLon, "lblLon") + Me.lblLon.Name = "lblLon" ' 'lblMaxLon ' @@ -113,49 +117,110 @@ Partial Class dlgImportGriddedData Me.cmdBrowse.Name = "cmdBrowse" Me.cmdBrowse.UseVisualStyleBackColor = True ' - 'grpDownloadType + 'grpDateRange + ' + Me.grpDateRange.Controls.Add(Me.rdoCustomRange) + Me.grpDateRange.Controls.Add(Me.rdoEntireRange) + Me.grpDateRange.Controls.Add(Me.lblTo) + Me.grpDateRange.Controls.Add(Me.lblFrom) + Me.grpDateRange.Controls.Add(Me.ucrDtpMinDate) + Me.grpDateRange.Controls.Add(Me.ucrDtpMaxDate) + Me.grpDateRange.Controls.Add(Me.ucrPnlDateRange) + resources.ApplyResources(Me.grpDateRange, "grpDateRange") + Me.grpDateRange.Name = "grpDateRange" + Me.grpDateRange.TabStop = False + ' + 'rdoCustomRange + ' + resources.ApplyResources(Me.rdoCustomRange, "rdoCustomRange") + Me.rdoCustomRange.BackColor = System.Drawing.SystemColors.Control + Me.rdoCustomRange.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoCustomRange.FlatAppearance.BorderSize = 2 + Me.rdoCustomRange.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoCustomRange.Name = "rdoCustomRange" + Me.rdoCustomRange.TabStop = True + Me.rdoCustomRange.Tag = "" + Me.rdoCustomRange.UseVisualStyleBackColor = False + ' + 'rdoEntireRange + ' + resources.ApplyResources(Me.rdoEntireRange, "rdoEntireRange") + Me.rdoEntireRange.BackColor = System.Drawing.SystemColors.Control + Me.rdoEntireRange.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoEntireRange.FlatAppearance.BorderSize = 2 + Me.rdoEntireRange.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoEntireRange.Name = "rdoEntireRange" + Me.rdoEntireRange.TabStop = True + Me.rdoEntireRange.Tag = "" + Me.rdoEntireRange.UseVisualStyleBackColor = False + ' + 'lblTo ' - Me.grpDownloadType.Controls.Add(Me.rdoPoint) - Me.grpDownloadType.Controls.Add(Me.rdoArea) - Me.grpDownloadType.Controls.Add(Me.ucrPnlDownloadType) - resources.ApplyResources(Me.grpDownloadType, "grpDownloadType") - Me.grpDownloadType.Name = "grpDownloadType" - Me.grpDownloadType.TabStop = False + resources.ApplyResources(Me.lblTo, "lblTo") + Me.lblTo.Name = "lblTo" + ' + 'lblFrom + ' + resources.ApplyResources(Me.lblFrom, "lblFrom") + Me.lblFrom.Name = "lblFrom" + ' + 'grpLocationRange + ' + Me.grpLocationRange.Controls.Add(Me.rdoPoint) + Me.grpLocationRange.Controls.Add(Me.rdoArea) + Me.grpLocationRange.Controls.Add(Me.ucrPnlLocationRange) + Me.grpLocationRange.Controls.Add(Me.lblMinLon) + Me.grpLocationRange.Controls.Add(Me.lblMinLat) + Me.grpLocationRange.Controls.Add(Me.ucrInputMinLon) + Me.grpLocationRange.Controls.Add(Me.ucrInputMinLat) + Me.grpLocationRange.Controls.Add(Me.lblMaxLon) + Me.grpLocationRange.Controls.Add(Me.lblMaxLat) + Me.grpLocationRange.Controls.Add(Me.ucrInputMaxLat) + Me.grpLocationRange.Controls.Add(Me.ucrInputMaxLon) + Me.grpLocationRange.Controls.Add(Me.lblLon) + Me.grpLocationRange.Controls.Add(Me.lblLat) + resources.ApplyResources(Me.grpLocationRange, "grpLocationRange") + Me.grpLocationRange.Name = "grpLocationRange" + Me.grpLocationRange.TabStop = False ' 'rdoPoint ' resources.ApplyResources(Me.rdoPoint, "rdoPoint") + Me.rdoPoint.BackColor = System.Drawing.SystemColors.Control + Me.rdoPoint.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoPoint.FlatAppearance.BorderSize = 2 + Me.rdoPoint.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoPoint.Name = "rdoPoint" Me.rdoPoint.TabStop = True - Me.rdoPoint.UseVisualStyleBackColor = True + Me.rdoPoint.Tag = "" + Me.rdoPoint.UseVisualStyleBackColor = False ' 'rdoArea ' resources.ApplyResources(Me.rdoArea, "rdoArea") + Me.rdoArea.BackColor = System.Drawing.SystemColors.Control + Me.rdoArea.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoArea.FlatAppearance.BorderSize = 2 + Me.rdoArea.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption Me.rdoArea.Name = "rdoArea" Me.rdoArea.TabStop = True - Me.rdoArea.UseVisualStyleBackColor = True + Me.rdoArea.Tag = "" + Me.rdoArea.UseVisualStyleBackColor = False ' - 'grpDataRange + 'lblMinLon ' - Me.grpDataRange.Controls.Add(Me.ucrChkWholeRange) - Me.grpDataRange.Controls.Add(Me.lblTo) - Me.grpDataRange.Controls.Add(Me.lblFrom) - Me.grpDataRange.Controls.Add(Me.ucrDtpMinDate) - Me.grpDataRange.Controls.Add(Me.ucrDtpMaxDate) - resources.ApplyResources(Me.grpDataRange, "grpDataRange") - Me.grpDataRange.Name = "grpDataRange" - Me.grpDataRange.TabStop = False + resources.ApplyResources(Me.lblMinLon, "lblMinLon") + Me.lblMinLon.Name = "lblMinLon" ' - 'lblTo + 'lblMinLat ' - resources.ApplyResources(Me.lblTo, "lblTo") - Me.lblTo.Name = "lblTo" + resources.ApplyResources(Me.lblMinLat, "lblMinLat") + Me.lblMinLat.Name = "lblMinLat" ' - 'lblFrom + 'lblSaveDownloadedFileTo ' - resources.ApplyResources(Me.lblFrom, "lblFrom") - Me.lblFrom.Name = "lblFrom" + resources.ApplyResources(Me.lblSaveDownloadedFileTo, "lblSaveDownloadedFileTo") + Me.lblSaveDownloadedFileTo.Name = "lblSaveDownloadedFileTo" ' 'ucrInputNewDataFrameName ' @@ -171,50 +236,6 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.ucrChkDontImportData, "ucrChkDontImportData") Me.ucrChkDontImportData.Name = "ucrChkDontImportData" ' - 'ucrChkSaveFileLocation - ' - Me.ucrChkSaveFileLocation.Checked = False - resources.ApplyResources(Me.ucrChkSaveFileLocation, "ucrChkSaveFileLocation") - Me.ucrChkSaveFileLocation.Name = "ucrChkSaveFileLocation" - ' - 'ucrInputMinLat - ' - Me.ucrInputMinLat.AddQuotesIfUnrecognised = True - Me.ucrInputMinLat.IsMultiline = False - Me.ucrInputMinLat.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMinLat, "ucrInputMinLat") - Me.ucrInputMinLat.Name = "ucrInputMinLat" - ' - 'ucrInputMaxLat - ' - Me.ucrInputMaxLat.AddQuotesIfUnrecognised = True - Me.ucrInputMaxLat.IsMultiline = False - Me.ucrInputMaxLat.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMaxLat, "ucrInputMaxLat") - Me.ucrInputMaxLat.Name = "ucrInputMaxLat" - ' - 'ucrInputMinLon - ' - Me.ucrInputMinLon.AddQuotesIfUnrecognised = True - Me.ucrInputMinLon.IsMultiline = False - Me.ucrInputMinLon.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMinLon, "ucrInputMinLon") - Me.ucrInputMinLon.Name = "ucrInputMinLon" - ' - 'ucrInputMaxLon - ' - Me.ucrInputMaxLon.AddQuotesIfUnrecognised = True - Me.ucrInputMaxLon.IsMultiline = False - Me.ucrInputMaxLon.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMaxLon, "ucrInputMaxLon") - Me.ucrInputMaxLon.Name = "ucrInputMaxLon" - ' - 'ucrChkWholeRange - ' - Me.ucrChkWholeRange.Checked = False - resources.ApplyResources(Me.ucrChkWholeRange, "ucrChkWholeRange") - Me.ucrChkWholeRange.Name = "ucrChkWholeRange" - ' 'ucrDtpMinDate ' resources.ApplyResources(Me.ucrDtpMinDate, "ucrDtpMinDate") @@ -229,10 +250,10 @@ Partial Class dlgImportGriddedData Me.ucrDtpMaxDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) Me.ucrDtpMaxDate.Name = "ucrDtpMaxDate" ' - 'ucrPnlDownloadType + 'ucrPnlDateRange ' - resources.ApplyResources(Me.ucrPnlDownloadType, "ucrPnlDownloadType") - Me.ucrPnlDownloadType.Name = "ucrPnlDownloadType" + resources.ApplyResources(Me.ucrPnlDateRange, "ucrPnlDateRange") + Me.ucrPnlDateRange.Name = "ucrPnlDateRange" ' 'ucrInputFilePath ' @@ -263,19 +284,51 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' + 'ucrPnlLocationRange + ' + resources.ApplyResources(Me.ucrPnlLocationRange, "ucrPnlLocationRange") + Me.ucrPnlLocationRange.Name = "ucrPnlLocationRange" + ' + 'ucrInputMinLon + ' + Me.ucrInputMinLon.AddQuotesIfUnrecognised = True + Me.ucrInputMinLon.IsMultiline = False + Me.ucrInputMinLon.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMinLon, "ucrInputMinLon") + Me.ucrInputMinLon.Name = "ucrInputMinLon" + ' + 'ucrInputMinLat + ' + Me.ucrInputMinLat.AddQuotesIfUnrecognised = True + Me.ucrInputMinLat.IsMultiline = False + Me.ucrInputMinLat.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMinLat, "ucrInputMinLat") + Me.ucrInputMinLat.Name = "ucrInputMinLat" + ' + 'ucrInputMaxLat + ' + Me.ucrInputMaxLat.AddQuotesIfUnrecognised = True + Me.ucrInputMaxLat.IsMultiline = False + Me.ucrInputMaxLat.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMaxLat, "ucrInputMaxLat") + Me.ucrInputMaxLat.Name = "ucrInputMaxLat" + ' + 'ucrInputMaxLon + ' + Me.ucrInputMaxLon.AddQuotesIfUnrecognised = True + Me.ucrInputMaxLon.IsMultiline = False + Me.ucrInputMaxLon.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMaxLon, "ucrInputMaxLon") + Me.ucrInputMaxLon.Name = "ucrInputMaxLon" + ' 'dlgImportGriddedData ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.lblSaveDownloadedFileTo) Me.Controls.Add(Me.ucrInputNewDataFrameName) Me.Controls.Add(Me.ucrChkDontImportData) - Me.Controls.Add(Me.ucrChkSaveFileLocation) - Me.Controls.Add(Me.ucrInputMinLat) - Me.Controls.Add(Me.ucrInputMaxLat) - Me.Controls.Add(Me.ucrInputMinLon) - Me.Controls.Add(Me.ucrInputMaxLon) - Me.Controls.Add(Me.grpDataRange) - Me.Controls.Add(Me.grpDownloadType) + Me.Controls.Add(Me.grpDateRange) Me.Controls.Add(Me.ucrInputFilePath) Me.Controls.Add(Me.cmdBrowse) Me.Controls.Add(Me.lblData) @@ -283,28 +336,25 @@ Partial Class dlgImportGriddedData Me.Controls.Add(Me.lblSource) Me.Controls.Add(Me.ucrInputSource) Me.Controls.Add(Me.lblNewDataFrameName) - Me.Controls.Add(Me.lblMaxLon) - Me.Controls.Add(Me.lblMinLon) - Me.Controls.Add(Me.lblMaxLat) - Me.Controls.Add(Me.lblMinLat) Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.grpLocationRange) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgImportGriddedData" - Me.grpDownloadType.ResumeLayout(False) - Me.grpDownloadType.PerformLayout() - Me.grpDataRange.ResumeLayout(False) - Me.grpDataRange.PerformLayout() + Me.grpDateRange.ResumeLayout(False) + Me.grpDateRange.PerformLayout() + Me.grpLocationRange.ResumeLayout(False) + Me.grpLocationRange.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents ucrBase As ucrButtons - Friend WithEvents lblMinLat As Label + Friend WithEvents lblLat As Label Friend WithEvents lblMaxLat As Label - Friend WithEvents lblMinLon As Label + Friend WithEvents lblLon As Label Friend WithEvents lblMaxLon As Label Friend WithEvents lblNewDataFrameName As Label Friend WithEvents ucrInputSource As ucrInputComboBox @@ -313,21 +363,25 @@ Partial Class dlgImportGriddedData Friend WithEvents lblData As Label Friend WithEvents ucrInputFilePath As ucrInputTextBox Friend WithEvents cmdBrowse As Button - Friend WithEvents grpDownloadType As GroupBox - Friend WithEvents rdoPoint As RadioButton - Friend WithEvents rdoArea As RadioButton - Friend WithEvents ucrPnlDownloadType As UcrPanel Friend WithEvents ucrDtpMinDate As ucrDateTimePicker Friend WithEvents ucrDtpMaxDate As ucrDateTimePicker - Friend WithEvents grpDataRange As GroupBox + Friend WithEvents grpDateRange As GroupBox Friend WithEvents lblTo As Label Friend WithEvents lblFrom As Label Friend WithEvents ucrInputMaxLon As ucrInputTextBox Friend WithEvents ucrInputMinLon As ucrInputTextBox Friend WithEvents ucrInputMaxLat As ucrInputTextBox Friend WithEvents ucrInputMinLat As ucrInputTextBox - Friend WithEvents ucrChkSaveFileLocation As ucrCheck Friend WithEvents ucrChkDontImportData As ucrCheck Friend WithEvents ucrInputNewDataFrameName As ucrInputTextBox - Friend WithEvents ucrChkWholeRange As ucrCheck + Friend WithEvents rdoCustomRange As RadioButton + Friend WithEvents rdoEntireRange As RadioButton + Friend WithEvents ucrPnlDateRange As UcrPanel + Friend WithEvents grpLocationRange As GroupBox + Friend WithEvents lblMinLon As Label + Friend WithEvents lblMinLat As Label + Friend WithEvents rdoPoint As RadioButton + Friend WithEvents rdoArea As RadioButton + Friend WithEvents ucrPnlLocationRange As UcrPanel + Friend WithEvents lblSaveDownloadedFileTo As Label End Class diff --git a/instat/dlgImportGriddedData.resx b/instat/dlgImportGriddedData.resx index 1bea4487374..8f4667442a8 100644 --- a/instat/dlgImportGriddedData.resx +++ b/instat/dlgImportGriddedData.resx @@ -118,37 +118,37 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + True - + NoControl - - 11, 196 + + 11, 92 - - 92, 13 + + 48, 13 - + 10 - - Minimum Latitude: + + Latitude: - - lblMinLat + + lblLat - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + grpLocationRange - - 19 + + 12 True @@ -157,16 +157,16 @@ NoControl - 225, 196 + 179, 92 - 95, 13 + 27, 13 12 - Maximum Latitude: + Max lblMaxLat @@ -175,40 +175,40 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + grpLocationRange - 18 + 8 - + True - + NoControl - - 11, 172 + + 11, 67 - - 101, 13 + + 57, 13 - + 6 - - Minimum Longitude: + + Longitude: - - lblMinLon + + lblLon - + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - $this + + grpLocationRange - - 17 + + 11 True @@ -217,16 +217,16 @@ NoControl - 225, 171 + 179, 67 - 104, 13 + 27, 13 8 - Maximum Longitude: + Max lblMaxLon @@ -235,10 +235,10 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - $this + grpLocationRange - 16 + 7 True @@ -247,13 +247,13 @@ NoControl - 9, 275 + 11, 348 121, 13 - 18 + 10 New Data Frame Name: @@ -268,7 +268,7 @@ $this - 15 + 10 True @@ -277,7 +277,7 @@ NoControl - 11, 25 + 11, 10 44, 13 @@ -298,7 +298,7 @@ $this - 13 + 8 True @@ -307,7 +307,7 @@ NoControl - 11, 52 + 11, 37 33, 13 @@ -328,19 +328,19 @@ $this - 11 + 6 NoControl - 347, 220 + 341, 295 - 59, 23 + 71, 23 - 16 + 8 Browse @@ -355,139 +355,97 @@ $this - 10 - - - rdoPoint - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDownloadType - - - 0 - - - rdoArea - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + 5 - - grpDownloadType + + Button - - 1 - - - ucrPnlDownloadType + + Flat - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + NoControl - - grpDownloadType + + 201, 25 - - 2 + + 102, 28 - - 11, 78 + + 21 - - 116, 82 + + Custom Range - - 4 + + MiddleCenter - - Download Type + + rdoCustomRange - - grpDownloadType + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + grpDateRange - - $this + + 0 - - 8 + + Button - - True + + Flat - + NoControl - - 10, 42 + + 101, 25 - - 49, 17 + + 102, 28 - - 2 + + 22 - - Point + + Entire Range - - rdoPoint + + MiddleCenter - + + rdoEntireRange + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDownloadType + + grpDateRange - - 0 + + 1 - + True - + NoControl - - 10, 19 - - - 47, 17 - - - 1 - - - Area - - - rdoArea - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDownloadType - - - 1 - - - ucrChkWholeRange + + 11, 93 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 23, 13 - - grpDataRange + + 2 - - 0 + + To: lblTo @@ -496,10 +454,28 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - grpDataRange + grpDateRange - 1 + 2 + + + True + + + NoControl + + + 11, 69 + + + 33, 13 + + + 0 + + + From: lblFrom @@ -508,10 +484,19 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - grpDataRange + grpDateRange - 2 + 3 + + + 48, 65 + + + 180, 20 + + + 1 ucrDtpMinDate @@ -520,9 +505,18 @@ instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - grpDataRange + grpDateRange + 4 + + + 48, 90 + + + 180, 20 + + 3 @@ -532,160 +526,232 @@ instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - grpDataRange + grpDateRange - 4 + 5 - - 130, 78 + + 101, 20 - - 276, 82 + + 206, 37 - - 5 + + 23 + + + ucrPnlDateRange - - Data Range + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 6 + + + 3, 57 + + + 408, 117 + + + 4 + + + Date Range - - grpDataRange + + grpDateRange - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 7 + + 3 - - True + + Button - + + Flat + + NoControl - - 5, 62 + + 203, 19 - - 23, 13 + + 102, 28 - - 2 + + 24 - - To: + + Point - - lblTo + + MiddleCenter - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + rdoPoint - - grpDataRange + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 1 + + grpLocationRange - - True + + 0 - + + Button + + + Flat + + NoControl - - 5, 38 + + 103, 19 - - 33, 13 + + 102, 28 - - 0 + + 25 - - From: + + Area - - lblFrom + + MiddleCenter - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + rdoArea - - grpDataRange + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + grpLocationRange + + + 1 + + + 103, 16 + + + 202, 37 + + + 26 + + + ucrPnlLocationRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + 2 - - 133, 273 + + True - - 217, 21 + + NoControl - - 19 + + 72, 67 - - ucrInputNewDataFrameName + + 24, 13 - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 10 - - $this + + Min - - 0 + + lblMinLon - - 11, 247 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 252, 20 + + grpLocationRange - - 17 + + 3 - - ucrChkDontImportData + + True - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + NoControl - - $this + + 72, 92 - - 1 + + 24, 13 - - 11, 221 + + 9 - - 139, 20 + + Min - - 14 + + lblMinLat - - ucrChkSaveFileLocation + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + grpLocationRange - - $this + + 4 - - 2 + + 99, 64 + + + 75, 21 + + + 7 + + + ucrInputMinLon + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 5 - 116, 191 + 99, 88 75, 21 @@ -700,13 +766,13 @@ instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - $this + grpLocationRange - 3 + 6 - 331, 190 + 210, 88 75, 21 @@ -721,34 +787,13 @@ instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - $this + grpLocationRange - 4 - - - 116, 168 - - - 75, 21 - - - 7 - - - ucrInputMinLon - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 5 + 9 - 331, 167 + 210, 64 75, 21 @@ -763,103 +808,115 @@ instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - $this + grpLocationRange - 6 + 10 - - 5, 13 + + 3, 174 - - 163, 20 + + 408, 117 - - 21 + + 5 - - ucrChkWholeRange + + Location Range - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + grpLocationRange - - grpDataRange + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0 + + $this - - 40, 34 + + 12 - - 180, 20 + + True - - 1 + + NoControl - - ucrDtpMinDate + + 14, 300 - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 133, 13 - - grpDataRange + + 6 - - 3 + + Save Downloaded File To: - - 40, 59 + + lblSaveDownloadedFileTo - - 180, 20 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + $this - - ucrDtpMaxDate + + 0 - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 135, 345 - - grpDataRange + + 217, 21 - - 4 + + 11 - - 7, 13 + + ucrInputNewDataFrameName - - 69, 60 + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 0 + + $this - - ucrPnlDownloadType + + 1 - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 11, 322 + + + 252, 20 + + + 9 + + + ucrChkDontImportData + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpDownloadType + + $this - + 2 - 156, 221 + 150, 297 191, 21 - 15 + 7 ucrInputFilePath @@ -871,10 +928,10 @@ $this - 9 + 4 - 57, 48 + 57, 33 248, 21 @@ -892,10 +949,10 @@ $this - 12 + 7 - 58, 21 + 58, 6 248, 21 @@ -913,16 +970,16 @@ $this - 14 + 9 - 11, 298 + 11, 371 416, 52 - 20 + 12 ucrBase @@ -934,7 +991,7 @@ $this - 20 + 11 True @@ -943,16 +1000,13 @@ 6, 13 - 423, 351 - - - NoControl + 420, 424 CenterScreen - Import From IRI Data Library + Import From IRI dlgImportGriddedData From 00ba06a50dd40baf2e8616fc894321ca5a81a01c Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 15 Sep 2020 12:16:18 +0300 Subject: [PATCH 132/277] changes as per suggestions from @dannypersons --- instat/dlgImportGriddedData.vb | 86 ++++++++----------- .../static/InstatObject/R/instat_object_R6.R | 7 +- 2 files changed, 41 insertions(+), 52 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index f4e0f133d05..9f25c13d28d 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -14,7 +14,6 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . -Imports System.IO Imports instat.Translations Public Class dlgImportGriddedData Private bFirstLoad As Boolean = True @@ -57,6 +56,7 @@ Public Class dlgImportGriddedData ucrInputData.SetItems(dctFiles) ucrInputData.SetDropDownStyleAsNonEditable() + ucrInputFilePath.SetParameter(New RParameter("path", 2)) ucrInputFilePath.IsReadOnly = True ucrInputMinLon.SetParameter(New RParameter("min_lon", 3)) @@ -81,36 +81,28 @@ Public Class dlgImportGriddedData ucrInputNewDataFrameName.SetParameter(New RParameter("name", 9)) - ucrPnlDownloadType.SetParameter(New RParameter("download_type", 10)) - ucrPnlDownloadType.AddRadioButton(rdoArea, Chr(34) & "area" & Chr(34)) - ucrPnlDownloadType.AddRadioButton(rdoPoint, Chr(34) & "point" & Chr(34)) + ucrPnlLocationRange.SetParameter(New RParameter("download_type", 10)) + ucrPnlLocationRange.AddRadioButton(rdoArea, Chr(34) & "area" & Chr(34)) + ucrPnlLocationRange.AddRadioButton(rdoPoint, Chr(34) & "point" & Chr(34)) + + ucrPnlDateRange.AddRadioButton(rdoEntireRange) + ucrPnlDateRange.AddRadioButton(rdoCustomRange) + ucrPnlDateRange.AddParameterPresentCondition(rdoCustomRange, {"min_date", "max_date"}) + ucrPnlDateRange.AddParameterPresentCondition(rdoArea, {"min_date", "max_date"}, False) ucrChkDontImportData.SetParameter(New RParameter("import", 11)) ucrChkDontImportData.SetValuesCheckedAndUnchecked("FALSE", "TRUE") ucrChkDontImportData.SetText("Don' t import data after downloading") ucrChkDontImportData.SetRDefault("TRUE") - ucrPnlDownloadType.AddToLinkedControls({ucrInputMaxLat, ucrInputMaxLon}, {rdoArea}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkSaveFileLocation.AddToLinkedControls(ucrChkDontImportData, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkSaveFileLocation.AddToLinkedControls(ucrInputFilePath, {True}, bNewLinkedHideIfParameterMissing:=True) - ucrChkWholeRange.AddToLinkedControls({ucrDtpMinDate, ucrDtpMaxDate}, {False}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrInputMinLon.SetLinkedDisplayControl(lblMinLon) - ucrInputMinLon.SetLinkedDisplayControl(lblMinLon) + ucrPnlLocationRange.AddToLinkedControls({ucrInputMaxLat, ucrInputMaxLon}, {rdoArea}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlDateRange.AddToLinkedControls({ucrDtpMinDate, ucrDtpMaxDate}, {rdoCustomRange}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputMaxLon.SetLinkedDisplayControl(lblMaxLon) - ucrInputMinLat.SetLinkedDisplayControl(lblMinLat) + ucrInputMinLat.SetLinkedDisplayControl(lblLat) ucrInputMaxLat.SetLinkedDisplayControl(lblMaxLat) - ucrInputFilePath.SetLinkedDisplayControl(cmdBrowse) ucrDtpMinDate.SetLinkedDisplayControl(lblFrom) ucrDtpMaxDate.SetLinkedDisplayControl(lblTo) - ucrChkSaveFileLocation.SetText("Save Downloaded File:") - ucrChkSaveFileLocation.AddParameterPresentCondition(True, "path") - ucrChkSaveFileLocation.AddParameterPresentCondition(False, "path", False) - - ucrChkWholeRange.SetText("Whole range") - ucrChkWholeRange.AddParameterPresentCondition(True, {"min_date", "max_date"}) - ucrChkWholeRange.AddParameterPresentCondition(False, {"min_date", "max_date"}, False) - clsDefaultStartDate = New RFunction clsDefaultStartDate.SetRCommand("as.Date") clsDefaultStartDate.AddParameter("x", Chr(34) & "2000/10/31" & Chr(34)) @@ -122,10 +114,13 @@ Public Class dlgImportGriddedData clsDownloadFromIRIFunction = New RFunction bShowMessageBox = True + 'temp fix + rdoEntireRange.Checked = True + clsDownloadFromIRIFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$download_from_IRI") clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NOAA_RFE2" & Chr(34), iPosition:=0) clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "daily_estimated_prcp" & Chr(34), iPosition:=1) - 'clsDownloadFromIRIFunction.AddParameter("path", Chr(34) & System.IO.Path.Combine(System.IO.Path.GetTempPath()).Replace("\", "/") & Chr(34), iPosition:=2) + clsDownloadFromIRIFunction.AddParameter("path", (Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) & "\Downloads").Replace("\", "/"), iPosition:=2) 'opted to set this as default location since it has data for all sources clsDownloadFromIRIFunction.AddParameter("min_lon", 10, iPosition:=3) clsDownloadFromIRIFunction.AddParameter("max_lon", 10.5, iPosition:=4) @@ -145,7 +140,7 @@ Public Class dlgImportGriddedData End Sub Private Sub TestOkEnabled() - If ucrInputNewDataFrameName.IsEmpty OrElse (rdoPoint.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty)) OrElse (rdoArea.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty OrElse ucrInputMaxLon.IsEmpty OrElse ucrInputMaxLat.IsEmpty)) OrElse (ucrChkSaveFileLocation.Checked AndAlso ucrInputFilePath.IsEmpty) OrElse (Not ucrChkWholeRange.Checked AndAlso ucrDtpMinDate.DateValue > ucrDtpMaxDate.DateValue) Then + If ucrInputNewDataFrameName.IsEmpty OrElse (rdoPoint.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty)) OrElse (rdoArea.Checked AndAlso (ucrInputMinLon.IsEmpty OrElse ucrInputMinLat.IsEmpty OrElse ucrInputMaxLon.IsEmpty OrElse ucrInputMaxLat.IsEmpty)) OrElse ucrInputFilePath.IsEmpty OrElse (Not rdoCustomRange.Checked AndAlso ucrDtpMinDate.DateValue > ucrDtpMaxDate.DateValue) Then ucrBase.OKEnabled(False) Else ucrBase.OKEnabled(True) @@ -158,16 +153,6 @@ Public Class dlgImportGriddedData TestOkEnabled() End Sub - Private Sub ucrPnlDownloadType_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDownloadType.ControlValueChanged - If rdoArea.Checked Then - lblMinLat.Text = "Minimum Latitude:" - lblMinLon.Text = "Minimum Longitude:" - ElseIf rdoPoint.Checked Then - lblMinLat.Text = "Latitude:" - lblMinLon.Text = "Longitude:" - End If - End Sub - Private Sub ucrInputSource_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSource.ControlValueChanged Select Case ucrInputSource.GetText Case "NOAA_RFE2" @@ -237,25 +222,20 @@ Public Class dlgImportGriddedData End Sub Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click - Using dlgSave As New SaveFileDialog - dlgSave.Title = "Import from IRI Data Library Dialog" - dlgSave.Filter = "NetCDF files|*.nc" - If dlgSave.ShowDialog() = DialogResult.OK Then - ucrInputFilePath.SetName(dlgSave.FileName.Replace("\", "/")) + Dim strPath As String + + Using dlgFolder As New FolderBrowserDialog + dlgFolder.Description = "Choose Folder" + If dlgFolder.ShowDialog() = DialogResult.OK Then + ucrInputFilePath.SetName("") + strPath = dlgFolder.SelectedPath + ucrInputFilePath.SetName(Replace(strPath, "\", "/")) End If End Using End Sub - Private Sub ucrInputData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputData.ControlValueChanged, ucrInputSource.ControlValueChanged - ucrInputNewDataFrameName.SetName(ucrInputSource.GetText & "_" & ucrInputData.GetText) - End Sub - - Private Sub ucrInputFilePath_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputFilePath.ControlValueChanged, ucrChkSaveFileLocation.ControlValueChanged - If ucrChkSaveFileLocation.Checked AndAlso ucrInputFilePath.GetText <> "" Then - clsDownloadFromIRIFunction.AddParameter("path", Chr(34) & ucrInputFilePath.GetText & Chr(34), iPosition:=2) - Else - clsDownloadFromIRIFunction.RemoveParameterByName("path") - End If + Private Sub ucrInputData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputData.ControlValueChanged, ucrInputSource.ControlValueChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged + ucrInputNewDataFrameName.SetName(ucrInputSource.GetText & "_" & ucrInputData.GetText & "_" & (ucrDtpMinDate.DateValue & "_" & ucrDtpMaxDate.DateValue).Replace("/", "_")) End Sub Private Sub ucrDtpMaxDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDtpMaxDate.ControlValueChanged, ucrDtpMinDate.ControlValueChanged @@ -265,7 +245,17 @@ Public Class dlgImportGriddedData End If End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrPnlDownloadType.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrChkSaveFileLocation.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged, ucrChkWholeRange.ControlContentsChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged + Private Sub ucrPnlLocationRange_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlLocationRange.ControlValueChanged + If rdoArea.Checked Then + lblMinLon.Visible = True + lblMinLat.Visible = True + ElseIf rdoPoint.Checked Then + lblMinLon.Visible = False + lblMinLat.Visible = False + End If + End Sub + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged, ucrPnlDateRange.ControlContentsChanged TestOkEnabled() End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 572d33f9cd4..64af749bbc9 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2088,7 +2088,7 @@ DataBook$set("public","package_check", function(package) { } ) -DataBook$set("public", "download_from_IRI", function(source, data, path, min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ +DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ init_URL <- "https://iridl.ldeo.columbia.edu/SOURCES/" if(source == "CHIRPS_V2P0"){prexyaddress <- paste0(init_URL, ".UCSB/.CHIRPS/.v2p0") if(data == "daily_0p25") {extension <- ".daily/.global/.0p25/.prcp"} #1 Jan 1981 to 30 Nov 2015 @@ -2140,10 +2140,9 @@ DataBook$set("public", "download_from_IRI", function(source, data, path, min_lon else if(download_type == "point"){URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat)} if(!missing(min_date)&!missing(max_date)){URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date)} URL <- URL %>% add_nc() - if(missing(path)){file_name <- tempfile(name, fileext = ".nc")} - else{file_name <- path} + file_name <- tempfile(name, tmpdir = path, fileext = ".nc") result <- download.file(url = URL, destfile = file_name, method = "libcurl", mode = "wb", cacheOK = FALSE) - if(import & result == 0) { + if(import && result == 0) { nc <- ncdf4::nc_open(filename = file_name) self$import_NetCDF(nc = nc, name = name) ncdf4::nc_close(nc=nc) From caef5d6ef573440da9b6a1a23dda393c81cd0688 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 15 Sep 2020 11:30:57 +0100 Subject: [PATCH 133/277] added methods for default calculator keyboard --- instat/dlgCalculator.vb | 23 +++++++++++++++++++++-- instat/frmMain.vb | 3 +-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 910c245dd76..6af8623d927 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -25,7 +25,9 @@ Public Class dlgCalculator Public bFirstLoad As Boolean = True Public iHelpCalcID As Integer Private iBasicWidth As Integer - Public strDefaultItem As String + Private strDefaultKeyboard As String + ' Note: This list needs to be updated when a new keyboard is added. + Private strKeyboards() As String = {"Maths", "Logical and Symbols", "Summary", "Strings (Character Columns)", "Factor", "Probability", "Dates", "Transform", "Circular", "Wakefield", "Modifier", "Symbols", "hydroGOF"} Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -54,7 +56,12 @@ Public Class dlgCalculator Private Sub SetDefaults() ucrCalc.ucrSaveResultInto.SetPrefix("Calc") - ucrCalc.ucrInputCalOptions.SetName(strDefaultItem) + If strDefaultKeyboard <> "" Then + ucrCalc.ucrInputCalOptions.SetName(strDefaultKeyboard) + strDefaultKeyboard = "" + Else + ucrCalc.ucrInputCalOptions.SetName("Basic") + End If ucrCalc.Reset() ucrCalc.chkShowParameters.Checked = False ucrCalc.chkSaveResultInto.Checked = True @@ -66,6 +73,10 @@ Public Class dlgCalculator Private Sub ReopenDialog() SaveResults() + If strDefaultKeyboard <> "" Then + ucrCalc.ucrInputCalOptions.SetName(strDefaultKeyboard) + strDefaultKeyboard = "" + End If End Sub Private Sub InitialiseDialog() @@ -89,6 +100,14 @@ Public Class dlgCalculator ucrCalc.ucrTryCalculator.StrvecOutputRequired() End Sub + Public Sub SetDefaultKeyboard(strNewDefaultKeyboard As String) + If Not strKeyboards.Contains(strNewDefaultKeyboard) Then + MsgBox("Developer error: there is no Calculator keyboard called" & Chr(34) & strNewDefaultKeyboard & Chr(34) & vbNewLine & "Default keyboard will be selected.") + strDefaultKeyboard = "" + End If + strDefaultKeyboard = strNewDefaultKeyboard + End Sub + Private Sub ucrCalc_SaveNameChanged() Handles ucrCalc.SaveNameChanged SaveResults() TestOKEnabled() diff --git a/instat/frmMain.vb b/instat/frmMain.vb index c063f84b892..9fe2c220312 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2007,7 +2007,6 @@ Public Class frmMain End Sub Private Sub mnuPrepareCalculateCalculations_Click(sender As Object, e As EventArgs) Handles mnuPrepareCalculator.Click - dlgCalculator.strDefaultItem = "Basic" dlgCalculator.ShowDialog() End Sub @@ -2187,7 +2186,7 @@ Public Class frmMain End Sub Private Sub mnuStructuredCircularCalculator_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularCalculator.Click - dlgCalculator.strDefaultItem = "Circular" + dlgCalculator.SetDefaultKeyboard("Circular") dlgCalculator.ShowDialog() End Sub From 1d1256e2bda736da7303aab7d936a7d56d011df8 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 15 Sep 2020 15:06:51 +0300 Subject: [PATCH 134/277] reorganized list of data and sources --- instat/dlgImportGriddedData.resx | 640 ++++++++++++------ instat/dlgImportGriddedData.vb | 98 +-- .../static/InstatObject/R/instat_object_R6.R | 69 +- 3 files changed, 484 insertions(+), 323 deletions(-) diff --git a/instat/dlgImportGriddedData.resx b/instat/dlgImportGriddedData.resx index 8f4667442a8..409bc7b58e5 100644 --- a/instat/dlgImportGriddedData.resx +++ b/instat/dlgImportGriddedData.resx @@ -357,6 +357,114 @@ 5 + + rdoCustomRange + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDateRange + + + 0 + + + rdoEntireRange + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDateRange + + + 1 + + + lblTo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDateRange + + + 2 + + + lblFrom + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDateRange + + + 3 + + + ucrDtpMinDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 4 + + + ucrDtpMaxDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 5 + + + ucrPnlDateRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 6 + + + 3, 57 + + + 408, 117 + + + 4 + + + Date Range + + + grpDateRange + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + Button @@ -489,92 +597,137 @@ 3 - - 48, 65 + + rdoPoint - - 180, 20 + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + grpLocationRange + + + 0 + + + rdoArea + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLocationRange + + 1 - - ucrDtpMinDate + + ucrPnlLocationRange - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpDateRange + + grpLocationRange - - 4 + + 2 - - 48, 90 + + lblMinLon - - 180, 20 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + grpLocationRange + + 3 - - ucrDtpMaxDate + + lblMinLat - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpDateRange + + grpLocationRange - - 5 + + 4 - - 101, 20 + + ucrInputMinLon - - 206, 37 + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 23 + + grpLocationRange - - ucrPnlDateRange + + 5 - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + ucrInputMinLat - - grpDateRange + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + + grpLocationRange + + 6 - - 3, 57 + + ucrInputMaxLat - + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 9 + + + ucrInputMaxLon + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 10 + + + 3, 174 + + 408, 117 - - 4 + + 5 - - Date Range + + Location Range - - grpDateRange + + grpLocationRange - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 3 + + 12 Button @@ -645,197 +798,68 @@ grpLocationRange - - 1 - - - 103, 16 - - - 202, 37 - - - 26 - - - ucrPnlLocationRange - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 2 - - - True - - - NoControl - - - 72, 67 - - - 24, 13 - - - 10 - - - Min - - - lblMinLon - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLocationRange - - - 3 - - - True - - - NoControl - - - 72, 92 - - - 24, 13 - - - 9 - - - Min - - - lblMinLat - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLocationRange - - - 4 - - - 99, 64 - - - 75, 21 - - - 7 - - - ucrInputMinLon - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 5 - - - 99, 88 - - - 75, 21 - - - 11 - - - ucrInputMinLat - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 6 + + 1 - - 210, 88 + + True - - 75, 21 + + NoControl - - 13 + + 72, 67 - - ucrInputMaxLat + + 24, 13 - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 10 - - grpLocationRange + + Min - - 9 + + lblMinLon - - 210, 64 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 75, 21 + + grpLocationRange - - 9 + + 3 - - ucrInputMaxLon + + True - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + NoControl - - grpLocationRange + + 72, 92 - - 10 + + 24, 13 - - 3, 174 + + 9 - - 408, 117 + + Min - - 5 + + lblMinLat - - Location Range + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpLocationRange - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 12 + + 4 True @@ -909,6 +933,69 @@ 2 + + 48, 65 + + + 180, 20 + + + 1 + + + ucrDtpMinDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 4 + + + 48, 90 + + + 180, 20 + + + 3 + + + ucrDtpMaxDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 5 + + + 101, 20 + + + 206, 37 + + + 23 + + + ucrPnlDateRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 6 + 150, 297 @@ -934,7 +1021,7 @@ 57, 33 - 248, 21 + 206, 21 3 @@ -955,7 +1042,7 @@ 58, 6 - 248, 21 + 205, 21 1 @@ -993,6 +1080,111 @@ 11 + + 103, 16 + + + 202, 37 + + + 26 + + + ucrPnlLocationRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 2 + + + 99, 64 + + + 75, 21 + + + 7 + + + ucrInputMinLon + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 5 + + + 99, 88 + + + 75, 21 + + + 11 + + + ucrInputMinLat + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 6 + + + 210, 88 + + + 75, 21 + + + 13 + + + ucrInputMaxLat + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 9 + + + 210, 64 + + + 75, 21 + + + 9 + + + ucrInputMaxLon + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 10 + True diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 9f25c13d28d..2b265d473ba 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -40,20 +40,19 @@ Public Class dlgImportGriddedData ucrBase.iHelpTopicID = 526 ucrInputSource.SetParameter(New RParameter("source", 0)) - dctDownloadPairs.Add("NOAA_RFE2", Chr(34) & "NOAA_RFE2" & Chr(34)) - dctDownloadPairs.Add("CHIRPS_V2P0", Chr(34) & "CHIRPS_V2P0" & Chr(34)) + dctDownloadPairs.Add("NASA", Chr(34) & "NASA_TRMM_3B42" & Chr(34)) + dctDownloadPairs.Add("NOAA", Chr(34) & "NOAA_RFE2" & Chr(34)) dctDownloadPairs.Add("TAMSAT", Chr(34) & "TAMSAT" & Chr(34)) - dctDownloadPairs.Add("NOAA_ARC2", Chr(34) & "NOAA_ARC2" & Chr(34)) - dctDownloadPairs.Add("NOAA_CMORPH_DAILY", Chr(34) & "NOAA_CMORPH_DAILY" & Chr(34)) - dctDownloadPairs.Add("NOAA_CMORPH_3HOURLY", Chr(34) & "NOAA_CMORPH_3HOURLY" & Chr(34)) - dctDownloadPairs.Add("NOAA_CMORPH_DAILY_CALCULATED", Chr(34) & "NOAA_CMORPH_DAILY_CALCULATED" & Chr(34)) - dctDownloadPairs.Add("NASA_TRMM_3B42", Chr(34) & "NASA_TRMM_3B42" & Chr(34)) + dctDownloadPairs.Add("UCSB CHIRPS", Chr(34) & "CHIRPS_V2P0" & Chr(34)) ucrInputSource.SetItems(dctDownloadPairs) ucrInputSource.SetDropDownStyleAsNonEditable() ucrInputData.SetParameter(New RParameter("data", 1)) - dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) + dctFiles = New Dictionary(Of String, String) + dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_estimated_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_estimated_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "TRMM 3B42 3-Hourly Precipitation" ucrInputData.SetDropDownStyleAsNonEditable() ucrInputFilePath.SetParameter(New RParameter("path", 2)) @@ -118,8 +117,8 @@ Public Class dlgImportGriddedData rdoEntireRange.Checked = True clsDownloadFromIRIFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$download_from_IRI") - clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NOAA_RFE2" & Chr(34), iPosition:=0) - clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "daily_estimated_prcp" & Chr(34), iPosition:=1) + clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NASA_TRMM_3B42" & Chr(34), iPosition:=0) + clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "3_hourly_estimated_prcp" & Chr(34), iPosition:=1) clsDownloadFromIRIFunction.AddParameter("path", (Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) & "\Downloads").Replace("\", "/"), iPosition:=2) 'opted to set this as default location since it has data for all sources clsDownloadFromIRIFunction.AddParameter("min_lon", 10, iPosition:=3) @@ -155,69 +154,44 @@ Public Class dlgImportGriddedData Private Sub ucrInputSource_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSource.ControlValueChanged Select Case ucrInputSource.GetText - Case "NOAA_RFE2" + Case "NASA" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_estimated_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_estimated_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." - ucrDtpMinDate.MinDate = New Date(2000, 10, 31) - ucrDtpMaxDate.MinDate = New Date(2000, 10, 31) - Case "CHIRPS_V2P0" + ucrInputData.cboInput.SelectedItem = "TRMM 3B42 3-Hourly Precipitation" + ucrDtpMinDate.MinDate = New Date(1998, 1, 1) + ucrDtpMaxDate.MinDate = New Date(1998, 1, 1) + Case "NOAA" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily_0p25", Chr(34) & "daily_0p25" & Chr(34)) - dctFiles.Add("Daily_Improved_0p25", Chr(34) & "daily_improved_0p25" & Chr(34)) - dctFiles.Add("Daily_0p05", Chr(34) & "daily_0p05" & Chr(34)) - dctFiles.Add("Daily_Improved_0p05", Chr(34) & "daily_improved_0p05" & Chr(34)) - dctFiles.Add("Dekad", Chr(34) & "dekad" & Chr(34)) - dctFiles.Add("Monthly_c8113", Chr(34) & "monthly_c8113" & Chr(34)) - dctFiles.Add("Monthly_deg1p0", Chr(34) & "monthly_deg1p0" & Chr(34)) - dctFiles.Add("Monthly_NMME_deg1p0", Chr(34) & "monthly_NMME_deg1p0" & Chr(34)) - dctFiles.Add("Monthly_Precipitation", Chr(34) & "monthly_prcp" & Chr(34)) + dctFiles.Add("RFE2 Daily Precipitation", Chr(34) & "daily_estimated_prcp" & Chr(34)) + dctFiles.Add("RFE2 10-day Precipitation", Chr(34) & "10day_estimated_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "Daily_0p25" - ucrDtpMinDate.MinDate = New Date(1981, 1, 1) - ucrDtpMaxDate.MinDate = New Date(1981, 1, 1) + ucrInputData.cboInput.SelectedItem = "RFE2 Daily Precipitation" + ucrDtpMinDate.MinDate = New Date(2000, 10, 31) + ucrDtpMaxDate.MinDate = New Date(2000, 10, 31) Case "TAMSAT" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Rainfall_Estimates", Chr(34) & "rainfall_estimates" & Chr(34)) - dctFiles.Add("Rainfall_Estimates_0p1", Chr(34) & "rainfall_estimates_0p1" & Chr(34)) - dctFiles.Add("Reconstructed_Rainfall_Anomaly", Chr(34) & "reconstructed_rainfall_anomaly" & Chr(34)) - dctFiles.Add("Sahel_Dry_Mask", Chr(34) & "sahel_dry_mask" & Chr(34)) - dctFiles.Add("Standard_Precipitation_Index_1-dekad", Chr(34) & "SPI_1_dekad" & Chr(34)) + dctFiles.Add("v3.1 Daily Rainfall", Chr(34) & "daily_rainfall_estimates" & Chr(34)) + dctFiles.Add("v3.1 Daily Rainfall Complete (Filled)", Chr(34) & "daily_recovered_rainfall_estimate" & Chr(34)) + dctFiles.Add("v3.1 Dekadal Rainfall", Chr(34) & "dekadal_rainfall_estimates" & Chr(34)) + dctFiles.Add("v3.1 Dekadal Rainfall Complete (Filled)", Chr(34) & "dekadal_recovered_rainfall_estimate" & Chr(34)) + dctFiles.Add("v3.1 Monthly Rainfall", Chr(34) & "monthly_rainfall_estimates" & Chr(34)) + dctFiles.Add("v3.1 Monthly Rainfall Complete (Filled)", Chr(34) & "monthly_recovered_rainfall_estimate" & Chr(34)) ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "Rainfall_Estimates" - ucrDtpMinDate.MinDate = New Date(1983, 1, 11) - ucrDtpMaxDate.MinDate = New Date(1983, 1, 11) - Case "NOAA_ARC2" - dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) - dctFiles.Add("Monthly_Average_Est._Prcp.", Chr(34) & "monthly_average_estimated_prcp" & Chr(34)) - 'monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. - ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." + ucrInputData.cboInput.SelectedItem = "v3.1 Daily Rainfall" ucrDtpMinDate.MinDate = New Date(1983, 1, 1) ucrDtpMaxDate.MinDate = New Date(1983, 1, 1) - Case "NOAA_CMORPH_DAILY", "NOAA_CMORPH_3HOURLY", "NOAA_CMORPH_DAILY_CALCULATED" - dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Mean_Morphed_Est._Prcp.", Chr(34) & "mean_morphed_est_prcp" & Chr(34)) - dctFiles.Add("Mean_Microwave_Only_Est._Prcp.", Chr(34) & "mean_microwave_only_est_prcp" & Chr(34)) - dctFiles.Add("Orignames_Mean_Microwave_Only_Est._Prcp.", Chr(34) & "orignames_mean_microwave_only_est_prcp" & Chr(34)) - dctFiles.Add("Orignames_Mean_Morphed_Est._Prcp.", Chr(34) & "orignames_mean_morphed_est_prcp" & Chr(34)) - dctFiles.Add("Renamed102015_Mean_Microwave_Only_Est._Prcp.", Chr(34) & "renamed102015_mean_microwave_only_est_prcp" & Chr(34)) - dctFiles.Add("Renamed102015_Mean_Morphed_Est._Prcp.", Chr(34) & "renamed102015_mean_morphed_est_prcp" & Chr(34)) - ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "Mean_Morphed_Est._Prcp." - 'ucrDtpMinDate.MinDate = New Date(2000, 10, 31) This source(CMORPH) is currently not available seems to have been moved elsewhere! - Case "NASA_TRMM_3B42" + Case "UCSB CHIRPS" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily_Est._Prcp.", Chr(34) & "daily_estimated_prcp" & Chr(34)) - dctFiles.Add("3-Hourly_Est._Prcp.", Chr(34) & "3_hourly_estimated_prcp" & Chr(34)) - dctFiles.Add("3-Hourly_Pre-gauge_Adjusted_Infrared_Est._Prcp.", Chr(34) & "3_hourly_pre_gauge_adjusted_infrared_est_prcp" & Chr(34)) - dctFiles.Add("3-Hourly_Pre-gauge_Adjusted_Microwave_Est._Prcp.", Chr(34) & "3_hourly_pre_gauge_adjusted_microwave_est_prcp" & Chr(34)) + dctFiles.Add("Daily Precipitation 0.25 degree", Chr(34) & "daily_improved_0p25" & Chr(34)) + dctFiles.Add("Daily Precipitation 0.05 degree", Chr(34) & "daily_improved_0p05" & Chr(34)) + dctFiles.Add("Dekad Precipitation 0.05 degree", Chr(34) & "dekad" & Chr(34)) + dctFiles.Add("Monthly Precipitation 0.05 degree", Chr(34) & "monthly" & Chr(34)) ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "Daily_Est._Prcp." - ucrDtpMinDate.MinDate = New Date(1998, 1, 1) - ucrDtpMaxDate.MinDate = New Date(1998, 1, 1) + ucrInputData.cboInput.SelectedItem = "Daily Precipitation 0.25 degree" + ucrDtpMinDate.MinDate = New Date(1981, 1, 1) + ucrDtpMaxDate.MinDate = New Date(1981, 1, 1) End Select End Sub diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 64af749bbc9..7c777d4f1c5 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2091,53 +2091,48 @@ DataBook$set("public","package_check", function(package) { DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ init_URL <- "https://iridl.ldeo.columbia.edu/SOURCES/" if(source == "CHIRPS_V2P0"){prexyaddress <- paste0(init_URL, ".UCSB/.CHIRPS/.v2p0") - if(data == "daily_0p25") {extension <- ".daily/.global/.0p25/.prcp"} #1 Jan 1981 to 30 Nov 2015 - else if(data == "daily_improved_0p25") {extension <- ".daily-improved/.global/.0p25/.prcp"}#1 Jan 1981 to 31 Jul 2020 - else if (data == "daily_0p05") {extension <- ".daily/.global/.0p05/.prcp"}# Jan 1981 to 30 Nov 2015 - else if(data == "daily_improved_0p05") {extension <- ".daily-improved/.global/.0p05/.prcp"}#1 Jan 1981 to 31 Jul 2020 - else if(data == "dekad") {extension <- ".dekad/.prcp"}#(days since 1960-01-01) ordered [ (1-10 Jan 1981) (11-20 Jan 1981) (21-31 Jan 1981) ... (21-31 Aug 2020)] - else if(data == "monthly_c8113") {extension <- ".monthly/.global/.c8113/.precipitation"}#months since 01-Jan) periodic (Jan) to (Dec) - else if(data == "monthly_deg1p0") {extension <- ".monthly/.global/.deg1p0/.precipitation"}#months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) - else if(data == "monthly_NMME_deg1p0") {extension <- ".monthly/.global/.NMME_deg1p0/.precipitation"}#months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) - else if(data == "monthly_prcp") {extension <- ".monthly/.global/.precipitation"}#months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) - else stop("Data file does not exist for CHIRPS V2P0 data") + if(data == "daily_improved_0p25") {extension <- ".daily-improved/.global/.0p25/.prcp"}#1 Jan 1981 to 31 Jul 2020 + else if(data == "daily_improved_0p05") {extension <- ".daily-improved/.global/.0p05/.prcp"}#1 Jan 1981 to 31 Jul 2020 + else if(data == "dekad") {extension <- ".dekad/.prcp"}#(days since 1960-01-01) ordered [ (1-10 Jan 1981) (11-20 Jan 1981) (21-31 Jan 1981) ... (21-31 Aug 2020)] + else if(data == "monthly") {extension <- ".monthly/.global/.precipitation"}#grid: /T (months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) by 1.0 N= 475 pts :grid + else stop("Data file does not exist for CHIRPS V2P0 data") #Annual and 2Monthly and 3monthly does not exist for CHIRPS_V2P0 - }else if(source == "TAMSAT") {prexyaddress <-paste0(init_URL, "home/.remic/.Reading/.Meteorology/.TAMSAT") - if(data == "rainfall_estimates") {extension <- ".TAMSAT-RFE/.rfe"}#days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] - else if(data == "rainfall_estimates_0p1") {extension <- ".TAMSAT-RFE_0p1/.rfe"}#(days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] - else if(data == "reconstructed_rainfall_anomaly") {extension <- ".TAMSAT-RFE/.rfediff"}#(days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] - else if(data == "sahel_dry_mask") {extension <- ".TAMSAT-RFE/.sahel_drymask"}#(days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] - else if(data == "SPI_1_dekad") {extension <- ".TAMSAT-RFE/.SPI-rfe_1-dekad_Sahel"}#(days since 1960-01-01) ordered [ (11-20 Jan 1983) (21-31 Jan 1983) (1-10 Feb 1983) ... (11-20 Sep 2020)] - else stop("Data file does not exist for TAMSAT data") + }else if(source == "TAMSAT") {prexyaddress <-paste0(init_URL, ".Reading/.Meteorology/.TAMSAT/.TARCAT/.v3p1") + if(data == "daily_rainfall_estimates") {extension <- ".daily/.rfe"}#grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid + else if(data == "daily_recovered_rainfall_estimate ") {extension <- ".daily/.rfe_filled/"}#grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid + else if(data == "dekadal_rainfall_estimates") {extension <- ".dekadal/.rfe/"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid + else if(data == "dekadal_recovered_rainfall_estimate") {extension <- ".dekadal/.rfe_filled/"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid + else if(data == "monthly_rainfall_estimates") {extension <- ".monthly/.rfe/"}#grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid + else if(data == "monthly_recovered_rainfall_estimate") {extension <- ".monthly/.rfe_filled/"}#grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid + else stop("Data file does not exist for TAMSAT data") #monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. }else if(source == "NOAA_ARC2") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa/.DAILY/.ARC2") - if(data == "daily_estimated_prcp") {extension <- ".daily/.est_prcp"}#(days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) - else if(data == "monthly_average_estimated_prcp") {extension <- ".monthly/.est_prcp"}#(months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) - else stop("Data file does not exist for NOAA ARC2 data") + if(data == "daily_estimated_prcp") {extension <- ".daily/.est_prcp"}#(days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) + else if(data == "monthly_average_estimated_prcp") {extension <- ".monthly/.est_prcp"}#(months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) + else stop("Data file does not exist for NOAA ARC2 data") }else if(source=="NOAA_RFE2") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa") - if(data == "daily_estimated_prcp"){extension <- ".DAILY/.RFEv2/.est_prcp"}#(days since 2000-10-31 12:00:00) ordered (31 Oct 2000) to (12 Sep 2020) - else stop("Data file does not exist for NOAA RFE2 data") + if(data == "daily_estimated_prcp"){extension <- ".DAILY/.RFEv2/.est_prcp"}#(days since 2000-10-31 12:00:00) ordered (31 Oct 2000) to (12 Sep 2020) + else if(data == "10day_estimated_prcp"){extension <- ".TEN-DAY/.RFEv2/.est_prcp"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Dec 1999) (11-20 Dec 1999) (21-31 Dec 1999) ... (1-10 Sep 2020)] N= 748 pts :grid + else stop("Data file does not exist for NOAA RFE2 data") }else if(source=="NOAA_CMORPH_DAILY" || source=="NOAA_CMORPH_3HOURLY" || source=="NOAA_CMORPH_DAILY_CALCULATED") { if(source=="NOAA_CMORPH_DAILY") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily")} - else if(source == "NOAA_CMORPH_3HOURLY") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.3-hourly")} - else if(source == "NOAA_CMORPH_DAILY_CALCULATED") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated")} - if(data == "mean_microwave_only_est_prcp") {extension <- ".mean/.microwave-only/.comb"} - else if(data == "mean_morphed_est_prcp") {extension <- ".mean/.morphed/.cmorph"} - else if(data == "orignames_mean_microwave_only_est_prcp") {extension <- ".orignames/.mean/.microwave-only/.comb"} - else if(data == "orignames_mean_morphed_est_prcp") {extension <- ".orignames/.mean/.morphed/.cmorph"} - else if(data == "renamed102015_mean_microwave_only_est_prcp") {extension <- ".renamed102015/.mean/.microwave-only/.comb"} - else if(data == "renamed102015_mean_morphed_est_prcp") {extension <- ".renamed102015/.mean/.morphed/.cmorph"} - else stop("Data file does not exist for NOAA CMORPH data") - }else if(source=="NASA_TRMM_3B42") {prexyaddress <- paste0(init_URL, ".NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") + else if(source == "NOAA_CMORPH_3HOURLY") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.3-hourly")} + else if(source == "NOAA_CMORPH_DAILY_CALCULATED") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated")} + if(data == "mean_microwave_only_est_prcp") {extension <- ".mean/.microwave-only/.comb"} + else if(data == "mean_morphed_est_prcp") {extension <- ".mean/.morphed/.cmorph"} + else if(data == "orignames_mean_microwave_only_est_prcp") {extension <- ".orignames/.mean/.microwave-only/.comb"} + else if(data == "orignames_mean_morphed_est_prcp") {extension <- ".orignames/.mean/.morphed/.cmorph"} + else if(data == "renamed102015_mean_microwave_only_est_prcp") {extension <- ".renamed102015/.mean/.microwave-only/.comb"} + else if(data == "renamed102015_mean_morphed_est_prcp") {extension <- ".renamed102015/.mean/.morphed/.cmorph"} + else stop("Data file does not exist for NOAA CMORPH data") + }else if(source=="NASA_TRMM_3B42") {prexyaddress <- paste0(init_URL, ".NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") if(data == "daily_estimated_prcp") {extension <- ".daily/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (1 Jan 1998) to (31 May 2015) - else if(data == "3_hourly_estimated_prcp") {extension <- ".three-hourly/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) - else if(data == "3_hourly_pre_gauge_adjusted_infrared_est_prcp") {extension <- ".three-hourly/.IRprecipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) - else if(data == "3_hourly_pre_gauge_adjusted_microwave_est_prcp") {extension <- ".three-hourly/.HQprecipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) - else stop("Data file does not exist for NASA TRMM 3B42 data") + else if(data == "3_hourly_estimated_prcp") {extension <- ".three-hourly/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) + else stop("Data file does not exist for NASA TRMM 3B42 data") }else{stop("Source not specified correctly.")} prexyaddress <- paste(prexyaddress, extension, sep="/") if(download_type == "area"){URL <- add_xy_area_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, max_lon = max_lon, max_lat = max_lat)} - else if(download_type == "point"){URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat)} + else if(download_type == "point"){URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat)} if(!missing(min_date)&!missing(max_date)){URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date)} URL <- URL %>% add_nc() file_name <- tempfile(name, tmpdir = path, fileext = ".nc") From 0b0e567ad4ed51ae6c3edd085b8aeae5c906de97 Mon Sep 17 00:00:00 2001 From: N-thony Date: Wed, 16 Sep 2020 10:50:35 +0200 Subject: [PATCH 135/277] Updating the R function --- instat/dlgInventoryPlot.designer.vb | 199 ++++---- instat/dlgInventoryPlot.resx | 478 +++++++++--------- instat/dlgInventoryPlot.vb | 117 +++-- .../InstatObject/R/stand_alone_functions.R | 130 +++-- 4 files changed, 490 insertions(+), 434 deletions(-) diff --git a/instat/dlgInventoryPlot.designer.vb b/instat/dlgInventoryPlot.designer.vb index 8a5bb33f6ba..958ff24b90c 100644 --- a/instat/dlgInventoryPlot.designer.vb +++ b/instat/dlgInventoryPlot.designer.vb @@ -42,32 +42,32 @@ Partial Class dlgInventoryPlot Me.lblDate = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() Me.lblElement = New System.Windows.Forms.Label() + Me.pnlDetails = New System.Windows.Forms.Panel() + Me.rdoMissing = New System.Windows.Forms.RadioButton() + Me.rdoGraph = New System.Windows.Forms.RadioButton() + Me.cmdInventoryPlotOptions = New System.Windows.Forms.Button() + Me.cmdOptions = New System.Windows.Forms.Button() Me.rdoElementOrder = New System.Windows.Forms.RadioButton() Me.rdoDateOrder = New System.Windows.Forms.RadioButton() - Me.pnlDetails = New System.Windows.Forms.Panel() - Me.ucrChkSaveDetails = New instat.ucrCheck() + Me.pnlSummary = New System.Windows.Forms.Panel() + Me.ucrChkOmitStart = New instat.ucrCheck() + Me.ucrChkSummary = New instat.ucrCheck() + Me.ucrChkOmitEnd = New instat.ucrCheck() + Me.ucrChkDetails = New instat.ucrCheck() + Me.ucrPnlOrder = New instat.UcrPanel() + Me.ucrSaveDetails = New instat.ucrSave() Me.ucrChkMinute = New instat.ucrCheck() Me.ucrChkSecond = New instat.ucrCheck() Me.ucrChkYear = New instat.ucrCheck() Me.ucrChkMonth = New instat.ucrCheck() Me.ucrChkDay = New instat.ucrCheck() Me.ucrChkHour = New instat.ucrCheck() - Me.pnlSummary = New System.Windows.Forms.Panel() - Me.ucrChkOmitStart = New instat.ucrCheck() - Me.ucrChkSummary = New instat.ucrCheck() - Me.ucrChkDetails = New instat.ucrCheck() - Me.ucrChkOmitEnd = New instat.ucrCheck() - Me.ucrPnlOrder = New instat.UcrPanel() - Me.rdoMissing = New System.Windows.Forms.RadioButton() - Me.rdoGraph = New System.Windows.Forms.RadioButton() Me.ucrPnls = New instat.UcrPanel() Me.ucrReceiverDate = New instat.ucrReceiverSingle() Me.ucrReceiverElements = New instat.ucrReceiverMultiple() Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.ucrInventoryPlotSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.cmdInventoryPlotOptions = New System.Windows.Forms.Button() - Me.cmdOptions = New System.Windows.Forms.Button() Me.pnlDetails.SuspendLayout() Me.pnlSummary.SuspendLayout() Me.SuspendLayout() @@ -87,23 +87,9 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.lblElement, "lblElement") Me.lblElement.Name = "lblElement" ' - 'rdoElementOrder - ' - resources.ApplyResources(Me.rdoElementOrder, "rdoElementOrder") - Me.rdoElementOrder.Name = "rdoElementOrder" - Me.rdoElementOrder.TabStop = True - Me.rdoElementOrder.UseVisualStyleBackColor = True - ' - 'rdoDateOrder - ' - resources.ApplyResources(Me.rdoDateOrder, "rdoDateOrder") - Me.rdoDateOrder.Name = "rdoDateOrder" - Me.rdoDateOrder.TabStop = True - Me.rdoDateOrder.UseVisualStyleBackColor = True - ' 'pnlDetails ' - Me.pnlDetails.Controls.Add(Me.ucrChkSaveDetails) + Me.pnlDetails.Controls.Add(Me.ucrSaveDetails) Me.pnlDetails.Controls.Add(Me.ucrChkMinute) Me.pnlDetails.Controls.Add(Me.ucrChkSecond) Me.pnlDetails.Controls.Add(Me.ucrChkYear) @@ -113,56 +99,58 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.pnlDetails, "pnlDetails") Me.pnlDetails.Name = "pnlDetails" ' - 'ucrChkSaveDetails - ' - Me.ucrChkSaveDetails.Checked = False - resources.ApplyResources(Me.ucrChkSaveDetails, "ucrChkSaveDetails") - Me.ucrChkSaveDetails.Name = "ucrChkSaveDetails" - ' - 'ucrChkMinute + 'rdoMissing ' - Me.ucrChkMinute.Checked = False - resources.ApplyResources(Me.ucrChkMinute, "ucrChkMinute") - Me.ucrChkMinute.Name = "ucrChkMinute" + resources.ApplyResources(Me.rdoMissing, "rdoMissing") + Me.rdoMissing.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMissing.FlatAppearance.BorderSize = 2 + Me.rdoMissing.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoMissing.Name = "rdoMissing" + Me.rdoMissing.UseVisualStyleBackColor = True ' - 'ucrChkSecond + 'rdoGraph ' - Me.ucrChkSecond.Checked = False - resources.ApplyResources(Me.ucrChkSecond, "ucrChkSecond") - Me.ucrChkSecond.Name = "ucrChkSecond" + resources.ApplyResources(Me.rdoGraph, "rdoGraph") + Me.rdoGraph.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraph.FlatAppearance.BorderSize = 2 + Me.rdoGraph.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoGraph.Name = "rdoGraph" + Me.rdoGraph.UseVisualStyleBackColor = True ' - 'ucrChkYear + 'cmdInventoryPlotOptions ' - Me.ucrChkYear.Checked = False - resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") - Me.ucrChkYear.Name = "ucrChkYear" + resources.ApplyResources(Me.cmdInventoryPlotOptions, "cmdInventoryPlotOptions") + Me.cmdInventoryPlotOptions.Name = "cmdInventoryPlotOptions" + Me.cmdInventoryPlotOptions.UseVisualStyleBackColor = True ' - 'ucrChkMonth + 'cmdOptions ' - Me.ucrChkMonth.Checked = False - resources.ApplyResources(Me.ucrChkMonth, "ucrChkMonth") - Me.ucrChkMonth.Name = "ucrChkMonth" + resources.ApplyResources(Me.cmdOptions, "cmdOptions") + Me.cmdOptions.Name = "cmdOptions" + Me.cmdOptions.UseVisualStyleBackColor = True ' - 'ucrChkDay + 'rdoElementOrder ' - Me.ucrChkDay.Checked = False - resources.ApplyResources(Me.ucrChkDay, "ucrChkDay") - Me.ucrChkDay.Name = "ucrChkDay" + resources.ApplyResources(Me.rdoElementOrder, "rdoElementOrder") + Me.rdoElementOrder.Name = "rdoElementOrder" + Me.rdoElementOrder.TabStop = True + Me.rdoElementOrder.UseVisualStyleBackColor = True ' - 'ucrChkHour + 'rdoDateOrder ' - Me.ucrChkHour.Checked = False - resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") - Me.ucrChkHour.Name = "ucrChkHour" + resources.ApplyResources(Me.rdoDateOrder, "rdoDateOrder") + Me.rdoDateOrder.Name = "rdoDateOrder" + Me.rdoDateOrder.TabStop = True + Me.rdoDateOrder.UseVisualStyleBackColor = True ' 'pnlSummary ' Me.pnlSummary.Controls.Add(Me.ucrChkOmitStart) - Me.pnlSummary.Controls.Add(Me.rdoElementOrder) Me.pnlSummary.Controls.Add(Me.ucrChkSummary) + Me.pnlSummary.Controls.Add(Me.rdoElementOrder) + Me.pnlSummary.Controls.Add(Me.ucrChkOmitEnd) Me.pnlSummary.Controls.Add(Me.ucrChkDetails) Me.pnlSummary.Controls.Add(Me.rdoDateOrder) - Me.pnlSummary.Controls.Add(Me.ucrChkOmitEnd) Me.pnlSummary.Controls.Add(Me.ucrPnlOrder) resources.ApplyResources(Me.pnlSummary, "pnlSummary") Me.pnlSummary.Name = "pnlSummary" @@ -179,40 +167,63 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrChkSummary, "ucrChkSummary") Me.ucrChkSummary.Name = "ucrChkSummary" ' - 'ucrChkDetails - ' - Me.ucrChkDetails.Checked = False - resources.ApplyResources(Me.ucrChkDetails, "ucrChkDetails") - Me.ucrChkDetails.Name = "ucrChkDetails" - ' 'ucrChkOmitEnd ' Me.ucrChkOmitEnd.Checked = False resources.ApplyResources(Me.ucrChkOmitEnd, "ucrChkOmitEnd") Me.ucrChkOmitEnd.Name = "ucrChkOmitEnd" ' + 'ucrChkDetails + ' + Me.ucrChkDetails.Checked = False + resources.ApplyResources(Me.ucrChkDetails, "ucrChkDetails") + Me.ucrChkDetails.Name = "ucrChkDetails" + ' 'ucrPnlOrder ' resources.ApplyResources(Me.ucrPnlOrder, "ucrPnlOrder") Me.ucrPnlOrder.Name = "ucrPnlOrder" ' - 'rdoMissing + 'ucrSaveDetails ' - resources.ApplyResources(Me.rdoMissing, "rdoMissing") - Me.rdoMissing.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMissing.FlatAppearance.BorderSize = 2 - Me.rdoMissing.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoMissing.Name = "rdoMissing" - Me.rdoMissing.UseVisualStyleBackColor = True + resources.ApplyResources(Me.ucrSaveDetails, "ucrSaveDetails") + Me.ucrSaveDetails.Name = "ucrSaveDetails" ' - 'rdoGraph + 'ucrChkMinute ' - resources.ApplyResources(Me.rdoGraph, "rdoGraph") - Me.rdoGraph.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGraph.FlatAppearance.BorderSize = 2 - Me.rdoGraph.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption - Me.rdoGraph.Name = "rdoGraph" - Me.rdoGraph.UseVisualStyleBackColor = True + Me.ucrChkMinute.Checked = False + resources.ApplyResources(Me.ucrChkMinute, "ucrChkMinute") + Me.ucrChkMinute.Name = "ucrChkMinute" + ' + 'ucrChkSecond + ' + Me.ucrChkSecond.Checked = False + resources.ApplyResources(Me.ucrChkSecond, "ucrChkSecond") + Me.ucrChkSecond.Name = "ucrChkSecond" + ' + 'ucrChkYear + ' + Me.ucrChkYear.Checked = False + resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") + Me.ucrChkYear.Name = "ucrChkYear" + ' + 'ucrChkMonth + ' + Me.ucrChkMonth.Checked = False + resources.ApplyResources(Me.ucrChkMonth, "ucrChkMonth") + Me.ucrChkMonth.Name = "ucrChkMonth" + ' + 'ucrChkDay + ' + Me.ucrChkDay.Checked = False + resources.ApplyResources(Me.ucrChkDay, "ucrChkDay") + Me.ucrChkDay.Name = "ucrChkDay" + ' + 'ucrChkHour + ' + Me.ucrChkHour.Checked = False + resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") + Me.ucrChkHour.Name = "ucrChkHour" ' 'ucrPnls ' @@ -259,18 +270,6 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'cmdInventoryPlotOptions - ' - resources.ApplyResources(Me.cmdInventoryPlotOptions, "cmdInventoryPlotOptions") - Me.cmdInventoryPlotOptions.Name = "cmdInventoryPlotOptions" - Me.cmdInventoryPlotOptions.UseVisualStyleBackColor = True - ' - 'cmdOptions - ' - resources.ApplyResources(Me.cmdOptions, "cmdOptions") - Me.cmdOptions.Name = "cmdOptions" - Me.cmdOptions.UseVisualStyleBackColor = True - ' 'dlgInventoryPlot ' resources.ApplyResources(Me, "$this") @@ -311,13 +310,6 @@ Partial Class dlgInventoryPlot Friend WithEvents ucrReceiverDate As ucrReceiverSingle Friend WithEvents lblElement As Label Friend WithEvents ucrPnls As UcrPanel - Friend WithEvents rdoElementOrder As RadioButton - Friend WithEvents rdoDateOrder As RadioButton - Friend WithEvents ucrPnlOrder As UcrPanel - Friend WithEvents ucrChkOmitEnd As ucrCheck - Friend WithEvents ucrChkOmitStart As ucrCheck - Friend WithEvents ucrChkDetails As ucrCheck - Friend WithEvents ucrChkSummary As ucrCheck Friend WithEvents pnlDetails As Panel Friend WithEvents ucrChkMinute As ucrCheck Friend WithEvents ucrChkSecond As ucrCheck @@ -325,10 +317,17 @@ Partial Class dlgInventoryPlot Friend WithEvents ucrChkMonth As ucrCheck Friend WithEvents ucrChkDay As ucrCheck Friend WithEvents ucrChkHour As ucrCheck - Friend WithEvents pnlSummary As Panel Friend WithEvents rdoGraph As RadioButton Friend WithEvents rdoMissing As RadioButton - Friend WithEvents ucrChkSaveDetails As ucrCheck Friend WithEvents cmdInventoryPlotOptions As Button Friend WithEvents cmdOptions As Button + Friend WithEvents rdoElementOrder As RadioButton + Friend WithEvents ucrSaveDetails As ucrSave + Friend WithEvents rdoDateOrder As RadioButton + Friend WithEvents ucrPnlOrder As UcrPanel + Friend WithEvents ucrChkDetails As ucrCheck + Friend WithEvents ucrChkSummary As ucrCheck + Friend WithEvents pnlSummary As Panel + Friend WithEvents ucrChkOmitEnd As ucrCheck + Friend WithEvents ucrChkOmitStart As ucrCheck End Class diff --git a/instat/dlgInventoryPlot.resx b/instat/dlgInventoryPlot.resx index d7a4d8b1e45..1513b713e53 100644 --- a/instat/dlgInventoryPlot.resx +++ b/instat/dlgInventoryPlot.resx @@ -210,92 +210,35 @@ 7 - - True - - - NoControl - - - 248, 31 - - - 92, 17 - - - 13 - - - Element Order - - - rdoElementOrder - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSummary - - - 1 - - - True - - - NoControl - - - 126, 31 - - - 77, 17 - - - 12 - - - Date Order - - - rdoDateOrder - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - pnlSummary + + 7, 76 - - 4 + + 4, 5, 4, 5 - - 10, 70 + + 262, 23 - - 100, 20 - - + 20 - - ucrChkSaveDetails + + ucrSaveDetails - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + pnlDetails - + 0 False - 248, 41 + 248, 29 100, 20 @@ -319,7 +262,7 @@ False - 248, 70 + 248, 53 100, 20 @@ -340,7 +283,7 @@ 2 - 126, 13 + 126, 5 100, 20 @@ -361,7 +304,7 @@ 3 - 126, 41 + 126, 29 100, 20 @@ -382,7 +325,7 @@ 4 - 126, 70 + 126, 55 100, 20 @@ -406,7 +349,7 @@ False - 248, 13 + 248, 5 100, 20 @@ -427,10 +370,10 @@ 6 - 2, 325 + 2, 319 - 402, 92 + 402, 100 22 @@ -447,132 +390,6 @@ 5 - - 126, 3 - - - 100, 20 - - - 9 - - - ucrChkOmitStart - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 0 - - - 10, 3 - - - 100, 20 - - - 8 - - - ucrChkSummary - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 2 - - - 10, 31 - - - 100, 20 - - - 11 - - - ucrChkDetails - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 3 - - - 248, 3 - - - 100, 20 - - - 10 - - - ucrChkOmitEnd - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 5 - - - 110, 22 - - - 256, 25 - - - 38 - - - ucrPnlOrder - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 6 - - - 4, 271 - - - 376, 52 - - - 21 - - - pnlSummary - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 4 - Button @@ -648,36 +465,6 @@ 2 - - 76, 3 - - - 277, 35 - - - 23 - - - ucrPnls - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - - 6 - - - True - - - 6, 13 - - - 423, 475 - False @@ -715,7 +502,7 @@ NoControl - 10, 241 + 10, 240 121, 23 @@ -738,6 +525,222 @@ 1 + + True + + + NoControl + + + 245, 28 + + + 92, 17 + + + 13 + + + Element Order + + + rdoElementOrder + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSummary + + + 2 + + + True + + + NoControl + + + 123, 28 + + + 77, 17 + + + 12 + + + Date Order + + + rdoDateOrder + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSummary + + + 5 + + + 123, 3 + + + 100, 20 + + + 39 + + + ucrChkOmitStart + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 0 + + + 7, 3 + + + 100, 20 + + + 16 + + + ucrChkSummary + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 1 + + + 245, 3 + + + 100, 20 + + + 10 + + + ucrChkOmitEnd + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 3 + + + 7, 28 + + + 100, 20 + + + 11 + + + ucrChkDetails + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 4 + + + 114, 25 + + + 242, 20 + + + 38 + + + ucrPnlOrder + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlSummary + + + 6 + + + 4, 266 + + + 376, 50 + + + 21 + + + pnlSummary + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 4 + + + 76, 3 + + + 277, 35 + + + 23 + + + ucrPnls + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 6 + + + True + + + 6, 13 + + + 423, 475 + 263, 96 @@ -811,7 +814,7 @@ 13 - 10, 421 + 7, 421 410, 53 @@ -831,6 +834,9 @@ 14 + + NoControl + CenterScreen diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 71508a87dcf..c27e2ca773b 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -19,7 +19,8 @@ Public Class dlgInventoryPlot Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private clsDefaultRFunction As New RFunction - Private clsClimaticSummary As New RFunction + Private clsClimaticMissing As New RFunction + Private clsClimaticDetails As New RFunction Private iPnlSummaryY As Integer Private iPnlDetailsY As Integer @@ -46,17 +47,20 @@ Public Class dlgInventoryPlot ucrInventoryPlotSelector.SetParameter(New RParameter("data_name", 0)) ucrInventoryPlotSelector.SetParameterIsString() + ucrReceiverDate.SetParameter(New RParameter("date_col", 1)) ucrReceiverDate.Selector = ucrInventoryPlotSelector ucrReceiverDate.SetClimaticType("date") ucrReceiverDate.SetIncludedDataTypes({"Date"}) ucrReceiverDate.bAutoFill = True ucrReceiverDate.SetParameterIsString() + 'ucrReceiverDate.bWithQuotes = False ucrReceiverDate.strSelectorHeading = "Date" ucrReceiverElements.SetParameter(New RParameter("element_cols", 2)) ucrReceiverElements.Selector = ucrInventoryPlotSelector ucrReceiverElements.SetParameterIsString() + ' ucrReceiverElements.bWithQuotes = False ucrReceiverElements.strSelectorHeading = "Numerics" ucrReceiverStation.SetParameter(New RParameter("station_col", 3)) @@ -66,44 +70,45 @@ Public Class dlgInventoryPlot ucrReceiverStation.SetParameterIsString() ucrReceiverStation.strSelectorHeading = "Factors" - ucrChkSummary.SetParameter(New RParameter("summary", 4)) + ucrChkSummary.AddFunctionNamesCondition(True, "climatic_missing") ucrChkSummary.SetText("Summary") - ucrChkSummary.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ucrChkSummary.SetRDefault("TRUE") - ucrChkDetails.SetParameter(New RParameter("details", 5)) + ucrChkDetails.AddFunctionNamesCondition(True, "climatic_details") ucrChkDetails.SetText("Details") - ucrChkDetails.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ucrChkDetails.SetRDefault("FALSE") + 'ucrChkDetails.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + 'ucrChkDetails.SetRDefault("FALSE") - ucrChkOmitStart.SetParameter(New RParameter("start", 10)) + ucrChkOmitStart.SetParameter(New RParameter("start", 4)) ucrChkOmitStart.SetText("Omit Start") ucrChkOmitStart.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkOmitStart.SetRDefault("TRUE") - ucrChkOmitEnd.SetParameter(New RParameter("end", 11)) + ucrChkOmitEnd.SetParameter(New RParameter("end", 5)) ucrChkOmitEnd.SetText("Omit End") ucrChkOmitEnd.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkOmitEnd.SetRDefault("FALSE") - ucrChkYear.SetParameter(New RParameter("year", 9)) + ucrChkYear.SetParameter(New RParameter("year", 7)) ucrChkYear.SetText("Year") ucrChkYear.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkYear.SetRDefault("FALSE") - ucrChkMonth.SetParameter(New RParameter("month", 8)) + ucrChkMonth.SetParameter(New RParameter("month", 6)) ucrChkMonth.SetText("Month") ucrChkMonth.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkMonth.SetRDefault("FALSE") - ucrChkDay.SetParameter(New RParameter("day", 7)) + ucrChkDay.SetParameter(New RParameter("day", 5)) ucrChkDay.SetText("Day") ucrChkDay.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkDay.SetRDefault("TRUE") - ' ucrChkHour.SetParameter(New RParameter("", 13)) - ucrChkSaveDetails.SetText("Save Details") - ' ucrChkHour.SetRDefault("FALSE") + ucrSaveDetails.SetPrefix("climatic_details") + ucrSaveDetails.SetCheckBoxText("Save Details") + ucrSaveDetails.SetSaveTypeAsDataFrame() + ucrSaveDetails.SetDataFrameSelector(ucrInventoryPlotSelector.ucrAvailableDataFrames) + ucrSaveDetails.SetIsComboBox() + 'ucrSaveDetails.SetAssignToIfUncheckedValue("last_table") ' ucrChkHour.SetParameter(New RParameter("", 13)) ucrChkHour.SetText("Hour") @@ -117,7 +122,7 @@ Public Class dlgInventoryPlot ucrChkSecond.SetText("Second") ' ucrChkSecond.SetRDefault("FALSE") - ucrPnlOrder.SetParameter(New RParameter("order", 6)) + ucrPnlOrder.SetParameter(New RParameter("order", 4)) ucrPnlOrder.AddRadioButton(rdoDateOrder, "TRUE") ucrPnlOrder.AddRadioButton(rdoElementOrder, "FALSE") ucrPnlOrder.SetRDefault("FALSE") @@ -126,11 +131,13 @@ Public Class dlgInventoryPlot ucrPnls.AddRadioButton(rdoGraph) ucrPnls.AddFunctionNamesCondition(rdoMissing, "climatic_missing") ucrPnls.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") - ucrPnls.AddToLinkedControls(ucrChkSummary, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnls.AddToLinkedControls({ucrChkSummary, ucrChkOmitStart, ucrChkOmitEnd}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnls.AddToLinkedControls(ucrChkDetails, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDay.SetLinkedDisplayControl(pnlDetails) - ucrChkSummary.SetLinkedDisplayControl(pnlSummary) + ucrChkSummary.SetLinkedDisplayControl(ucrPnlOrder) + + Dim dctFacetByPairs As New Dictionary(Of String, String) @@ -147,7 +154,8 @@ Public Class dlgInventoryPlot Private Sub SetDefaults() clsDefaultRFunction = New RFunction - clsClimaticSummary = New RFunction + clsClimaticMissing = New RFunction + clsClimaticDetails = New RFunction ucrInventoryPlotSelector.Reset() ucrReceiverElements.SetMeAsReceiver() @@ -157,25 +165,38 @@ Public Class dlgInventoryPlot clsDefaultRFunction.AddParameter("year_doy_plot", "FALSE") clsDefaultRFunction.AddParameter("facet_by", "NULL") clsDefaultRFunction.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") - clsClimaticSummary.SetRCommand("climatic_missing") + 'clsClimaticDetails.SetAssignTo("last_table", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempTable:="last_table") + clsClimaticMissing.SetRCommand("climatic_missing") + clsClimaticDetails.SetRCommand("climatic_details") ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) TestOkEnabled() End Sub Private Sub SetRCodeForControls(bReset As Boolean) + ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("data", ucrInventoryPlotSelector.ucrAvailableDataFrames.clsCurrDataFrame), iAdditionalPairNo:=1) + ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("date", ucrReceiverDate.GetVariables), iAdditionalPairNo:=1) + ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("elements", ucrReceiverElements.GetVariableNames(bWithQuotes:=False)), iAdditionalPairNo:=1) + ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("stations"), iAdditionalPairNo:=1) + + ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("data", ucrInventoryPlotSelector.ucrAvailableDataFrames.clsCurrDataFrame), iAdditionalPairNo:=2) + ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("date"), iAdditionalPairNo:=2) + ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("elements", ucrReceiverElements.GetVariableNames(bWithQuotes:=False)), iAdditionalPairNo:=2) + ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("stations"), iAdditionalPairNo:=2) + ucrInventoryPlotSelector.SetRCode(clsDefaultRFunction, bReset) ucrReceiverDate.SetRCode(clsDefaultRFunction, bReset) ucrReceiverStation.SetRCode(clsDefaultRFunction, bReset) ucrReceiverElements.SetRCode(clsDefaultRFunction, bReset) - ucrChkSummary.SetRCode(clsClimaticSummary, bReset) - ucrChkDetails.SetRCode(clsClimaticSummary, bReset) - ucrChkYear.SetRCode(clsClimaticSummary, bReset) - ucrChkMonth.SetRCode(clsClimaticSummary, bReset) - ucrChkDay.SetRCode(clsClimaticSummary, bReset) - ucrChkOmitEnd.SetRCode(clsClimaticSummary, bReset) - ucrChkOmitStart.SetRCode(clsClimaticSummary, bReset) - ucrPnlOrder.SetRCode(clsClimaticSummary, bReset) + ucrChkSummary.SetRCode(clsClimaticMissing, bReset) + ucrChkDetails.SetRCode(clsClimaticDetails, bReset) + ucrChkYear.SetRCode(clsClimaticDetails, bReset) + ucrChkMonth.SetRCode(clsClimaticDetails, bReset) + ucrChkDay.SetRCode(clsClimaticDetails, bReset) + ucrSaveDetails.SetRCode(clsClimaticDetails, bReset) + ucrChkOmitStart.SetRCode(clsClimaticMissing, bReset) + ucrChkOmitEnd.SetRCode(clsClimaticMissing, bReset) + ucrPnlOrder.SetRCode(clsClimaticDetails, bReset) ucrPnls.SetRCode(clsDefaultRFunction, bReset) End Sub @@ -202,31 +223,25 @@ Public Class dlgInventoryPlot Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged TestOkEnabled() End Sub - - Private Sub ucrInventoryPlotSelector_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInventoryPlotSelector.ControlValueChanged - clsClimaticSummary.AddParameter("data", clsRFunctionParameter:=ucrInventoryPlotSelector.ucrAvailableDataFrames.clsCurrDataFrame, iPosition:=0) - End Sub - - Private Sub ucrReceiverDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlValueChanged - clsClimaticSummary.AddParameter("date", clsRFunctionParameter:=ucrReceiverDate.GetVariables, iPosition:=1) - End Sub - - Private Sub ucrReceiverElements_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElements.ControlValueChanged - clsClimaticSummary.AddParameter("elements", ucrReceiverElements.GetVariableNames(bWithQuotes:=False), iPosition:=2) - End Sub - - Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged - clsClimaticSummary.AddParameter("stations", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) + Private Sub ChangeFunction() + 'If ucrChkSummary.Checked Then + 'ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticMissing) + 'ucrBase.clsRsyntax.iCallType = 2 + 'End If + If ucrChkDetails.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticDetails) + ucrBase.clsRsyntax.iCallType = 2 + End If End Sub Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnls.ControlValueChanged If rdoMissing.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticSummary) - ucrBase.clsRsyntax.iCallType = 2 - pnlSummary.Location = New Point(pnlSummary.Location.X, iPnlSummaryY / 1.12) - pnlDetails.Location = New Point(pnlDetails.Location.X, iPnlDetailsY / 1.09) + ChangeFunction() + pnlSummary.Location = New Point(pnlSummary.Location.X, iPnlSummaryY / 1.05) + pnlDetails.Location = New Point(pnlDetails.Location.X, iPnlDetailsY / 1.05) cmdInventoryPlotOptions.Visible = False cmdOptions.Visible = False + ucrChkDetails.Checked = False Else ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) ucrBase.clsRsyntax.iCallType = 3 @@ -234,4 +249,12 @@ Public Class dlgInventoryPlot cmdOptions.Visible = True End If End Sub + + Private Sub ucrPnls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnls.ControlContentsChanged + If rdoGraph.Checked Then + ucrReceiverDate.SetParameterIsString() + Else + ucrReceiverDate.SetParameterIsRFunction() + End If + End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 76419988733..8ac468dc02b 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1283,16 +1283,13 @@ summary_sample <- function(x, size, replace = FALSE){ else{sample(x = x, size = size, replace = replace)} } -climatic_missing <- function(data, date, elements = ..., stations, summary = TRUE, details = FALSE, - order = FALSE, - day = TRUE, - month = FALSE, - year = FALSE, start = TRUE, end = FALSE){ +climatic_missing <- function(data, date, elements = ..., stations, + start = TRUE, end = FALSE){ # if there are no stations, set it as 1 # (can otherwise just run the function without stations present in that brackets) if (missing(stations)){ - data %>% dplyr::mutate(stations = 1) + data %>% mutate(stations = 1) } if (missing(date)){ @@ -1303,20 +1300,14 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU stop('argument "elements" is missing, with no default') } - i <- 0 - list_tables <- NULL - # stack data - data.stack <- data %>% - tidyr::pivot_longer(cols = c({{ elements }}), + data.stack <- data %>% + tidyr::pivot_longer(cols = c({{ elements }}), names_to = "Element", values_to = "value") # sort start/end times - - # for summary == TRUE - if (summary){ - i = i + 1 + # set start date if (start){ data.stack <- data.stack %>% @@ -1324,16 +1315,20 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU dplyr::mutate(start = ({{ date }})[which.min(is.na( value ))]) }else{ - data.stack <- data.stack %>% dplyr::group_by({{ stations }}) %>% dplyr::mutate(start = dplyr::first( {{ date }} )) + data.stack <- data.stack %>% + dplyr::group_by({{ stations }}) %>% + dplyr::mutate(start = dplyr::first( {{ date }} )) } # set end date if (end){ data.stack <- data.stack %>% - dplyr::group_by({{ stations }}, Element ) %>% + dplyr::group_by({{ stations }}, Element ) %>% dplyr::mutate(end = ({{ date }} )[dplyr::last(which(!is.na( value )))]) }else{ - data.stack <- data.stack %>% dplyr::group_by({{ stations }} ) %>% dplyr::mutate(end = dplyr::last({{ date }})) + data.stack <- data.stack %>% + dplyr::group_by({{ stations }} ) %>% + dplyr::mutate(end = dplyr::last({{ date }})) } # number and percentage missing @@ -1341,9 +1336,9 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU dplyr::group_by({{stations}}, Element) %>% dplyr::filter(({{date}}) >= start & ({{date}}) <= end) %>% dplyr::summarise(From = dplyr::first(start), - To = dplyr::last(end), - Missing = sum(is.na(value)), - Percentage = sum(is.na(value))/n()*100)) + To = dplyr::last(end), + Missing = sum(is.na(value)), + Percentage = sum(is.na(value))/n()*100)) # complete years complete.years <- data.stack %>% @@ -1362,16 +1357,45 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU if (missing(stations)){ summary.data$stations <- NULL } - - list_tables[[i]] <- summary.data + + return(summary.data) +} + + + +climatic_details <- function(data, date, elements = ..., stations, + order = FALSE, + day = TRUE, + month = FALSE, + year = FALSE, level = FALSE){ + + # if there are no stations, set it as 1 + # (can otherwise just run the function without stations present in that brackets) + if (missing(stations)){ + data %>% dplyr::mutate(stations = 1) } - + if (missing(date)){ + stop('argument "date" is missing, with no default') + } + + if (missing(elements)){ + stop('argument "elements" is missing, with no default') + } + + i <- 0 + list_tables <- NULL + + # stack data + data.stack <- data %>% + tidyr::pivot_longer(cols = c({{ elements }}), + names_to = "Element", + values_to = "value") + + # sort start/end times - if (details){ - if (day != TRUE & month != TRUE & year != TRUE){ - warning('At least one of day, month, year need to be selected if details == TRUE') + warning('At least one of day, month, year need to be selected') } if (day){ @@ -1383,15 +1407,16 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU dplyr::group_by(element.na, {{stations}}, Element) %>% dplyr::summarise(From = dplyr::first({{date}}), To = dplyr::last({{date}}), - Count = n()) + Count = n()) %>% + mutate(Level = "Day") - if (order){ - detail.table.day <- detail.table.day %>% dplyr::arrange(From) - } else { - detail.table.day <- detail.table.day %>% dplyr::arrange(Element) - } + if (order){ + detail.table.day <- detail.table.day %>% dplyr::arrange(From) + } else { + detail.table.day <- detail.table.day %>% dplyr::arrange(Element) + } - detail.table.day <- detail.table.day %>% ungroup() %>% dplyr::select(-c("element.na")) + detail.table.day <- detail.table.day %>% dplyr::ungroup() %>% dplyr::select(-c("element.na")) list_tables[[i]] <- detail.table.day } @@ -1416,15 +1441,16 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU dplyr::group_by(element.na, {{stations}}, Element) %>% dplyr::summarise(From = dplyr::first(From), To = dplyr::last(To), - Count = n()) + Count = n()) %>% + mutate(Level = "Month") - if (order){ - detail.table.month <- detail.table.month %>% dplyr::arrange(From) - } else { - detail.table.month <- detail.table.month %>% dplyr::arrange(Element) - } + if (order){ + detail.table.month <- detail.table.month %>% dplyr::arrange(From) + } else { + detail.table.month <- detail.table.month %>% dplyr::arrange(Element) + } - detail.table.month <- detail.table.month %>% ungroup() %>% dplyr::select(-c("element.na")) + detail.table.month <- detail.table.month %>% dplyr::ungroup() %>% dplyr::select(-c("element.na")) list_tables[[i]] <- detail.table.month } @@ -1448,18 +1474,20 @@ climatic_missing <- function(data, date, elements = ..., stations, summary = TRU dplyr::group_by(element.na, {{stations}}, Element) %>% dplyr::summarise(From = dplyr::first(From), To = dplyr::last(To), - Count = n()) + Count = n()) %>% + mutate(Level = "Year") - if (order){ - detail.table.year <- detail.table.year %>% dplyr::arrange(From) - } else { - detail.table.year <- detail.table.year %>% dplyr::arrange(Element) - } + if (order){ + detail.table.year <- detail.table.year %>% dplyr::arrange(From) + } else { + detail.table.year <- detail.table.year %>% dplyr::arrange(Element) + } - detail.table.year <- detail.table.year %>% ungroup() %>% dplyr::select(-c("element.na")) + detail.table.year <- detail.table.year %>% dplyr::ungroup() %>% dplyr::select(-c("element.na")) list_tables[[i]] <- detail.table.year } - } - return(list_tables) -} + detail.table.all <- plyr::ldply(list_tables, data.frame) + + return(detail.table.all) +} \ No newline at end of file From 9b318a827aed53502a056ec571a6cf49ae4aa2c8 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 16 Sep 2020 10:02:57 +0100 Subject: [PATCH 136/277] Circular menu calculator and summaries dialog default options on first load --- instat/dlgCalculator.vb | 4 - instat/dlgColumnStats.vb | 8 +- instat/frmMain.Designer.vb | 243 ++++++++++++++++++------------------- instat/frmMain.resx | 156 +++++++++++------------- instat/frmMain.vb | 15 +-- instat/sdgSummaries.vb | 22 +++- 6 files changed, 224 insertions(+), 224 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 6af8623d927..9605a4a5190 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -73,10 +73,6 @@ Public Class dlgCalculator Private Sub ReopenDialog() SaveResults() - If strDefaultKeyboard <> "" Then - ucrCalc.ucrInputCalOptions.SetName(strDefaultKeyboard) - strDefaultKeyboard = "" - End If End Sub Private Sub InitialiseDialog() diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 651b5088a40..8039890b6b3 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -25,6 +25,7 @@ Public Class dlgColumnStats Public strDefaultDataFrame As String = "" Public strDefaultVariables() As String Public strDefaultFactors() As String + Private strDefaultTab As String = "" Private Sub dlgColumnStats_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -151,6 +152,10 @@ Public Class dlgColumnStats strDefaultFactors = Nothing End Sub + Public Sub SetDefaultTab(strNewDefaultTab As String) + strDefaultTab = strNewDefaultTab + End Sub + Public Sub TestOKEnabled() If ((ucrChkStoreResults.Checked OrElse ucrChkPrintOutput.Checked) AndAlso Not clsSummariesList.clsParameters.Count = 0) AndAlso sdgSummaries.bOkEnabled Then ucrBase.OKEnabled(True) @@ -166,9 +171,10 @@ Public Class dlgColumnStats End Sub Private Sub cmdSummaries_Click(sender As Object, e As EventArgs) Handles cmdSummaries.Click - sdgSummaries.SetRFunction(clsNewRFunction:=clsSummariesList, clsNewDefaultFunction:=clsDefaultFunction, clsNewConcFunction:=clsConcFunction, ucrNewBaseSelector:=ucrSelectorForColumnStatistics, bReset:=bResetSubdialog, strNewWeightLabel:=strWeightLabel) + sdgSummaries.SetRFunction(clsNewRFunction:=clsSummariesList, clsNewDefaultFunction:=clsDefaultFunction, clsNewConcFunction:=clsConcFunction, ucrNewBaseSelector:=ucrSelectorForColumnStatistics, bReset:=bResetSubdialog, strNewWeightLabel:=strWeightLabel, strDefaultTab:=strDefaultTab) sdgSummaries.ShowDialog() bResetSubdialog = False + strDefaultTab = "" TestOKEnabled() End Sub diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 3affe318178..35ad5a09639 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -516,9 +516,20 @@ Partial Class frmMain Me.mnuPrepareRObjectsReorder = New System.Windows.Forms.ToolStripMenuItem() Me.mnuPrepareRObjectsDelete = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructured = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator20 = New System.Windows.Forms.ToolStripSeparator() Me.mnuStructuredCircular = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructuredCircularDefine = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularCalculator = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularSummaries = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator46 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuStructuredCircularScatterPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularDensityPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularRosePlot = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator67 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuStructuredCircularWindRose = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularWindPollutionRose = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularOtherRosePlots = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator68 = New System.Windows.Forms.ToolStripSeparator() + Me.mnuStructuredCircularCirclize = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructuredLow_Flow = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructuredLow_FlowDefine = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructuredSurvival = New System.Windows.Forms.ToolStripMenuItem() @@ -615,32 +626,20 @@ Partial Class frmMain Me.splOverall = New System.Windows.Forms.SplitContainer() Me.splExtraWindows = New System.Windows.Forms.SplitContainer() Me.splMetadata = New System.Windows.Forms.SplitContainer() + Me.ucrColumnMeta = New instat.ucrColumnMetadata() + Me.ucrDataFrameMeta = New instat.ucrDataFrameMetadata() Me.splLogScript = New System.Windows.Forms.SplitContainer() + Me.ucrLogWindow = New instat.ucrLog() + Me.ucrScriptWindow = New instat.ucrScript() Me.splDataOutput = New System.Windows.Forms.SplitContainer() + Me.ucrDataViewer = New instat.ucrDataView() + Me.ucrOutput = New instat.ucrOutputWindow() Me.mnuRViewer = New System.Windows.Forms.ToolStripMenuItem() Me.mnuPlotly = New System.Windows.Forms.ToolStripMenuItem() Me.mnuColumnMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuDataFrameMetadata = New System.Windows.Forms.ToolStripMenuItem() Me.mnuScriptFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuLogFile = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuStructuredCircularCalculator = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuStructuredCircularSummaries = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator46 = New System.Windows.Forms.ToolStripSeparator() - Me.mnuStructuredCircularScatterPlot = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuStructuredCircularDensityPlot = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuStructuredCircularRosePlot = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator67 = New System.Windows.Forms.ToolStripSeparator() - Me.mnuStructuredCircularWindRose = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuStructuredCircularWindPollutionRose = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuStructuredCircularOtherRosePlots = New System.Windows.Forms.ToolStripMenuItem() - Me.ToolStripSeparator68 = New System.Windows.Forms.ToolStripSeparator() - Me.mnuStructuredCircularCirclize = New System.Windows.Forms.ToolStripMenuItem() - Me.ucrColumnMeta = New instat.ucrColumnMetadata() - Me.ucrDataFrameMeta = New instat.ucrDataFrameMetadata() - Me.ucrLogWindow = New instat.ucrLog() - Me.ucrScriptWindow = New instat.ucrScript() - Me.ucrDataViewer = New instat.ucrDataView() - Me.ucrOutput = New instat.ucrOutputWindow() Me.stsStrip.SuspendLayout() Me.Tool_strip.SuspendLayout() Me.mnuBar.SuspendLayout() @@ -3343,15 +3342,10 @@ Partial Class frmMain ' 'mnuStructured ' - Me.mnuStructured.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.ToolStripSeparator20, Me.mnuStructuredCircular, Me.mnuStructuredLow_Flow, Me.mnuStructuredSurvival, Me.mnuStructuredTimeSeries, Me.ToolStripSeparator63, Me.mnuStructuredClimatic, Me.mnuStructuredProcurement, Me.mnuStructuredOptionByContext}) + Me.mnuStructured.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuStructuredCircular, Me.mnuStructuredLow_Flow, Me.mnuStructuredSurvival, Me.mnuStructuredTimeSeries, Me.ToolStripSeparator63, Me.mnuStructuredClimatic, Me.mnuStructuredProcurement, Me.mnuStructuredOptionByContext}) Me.mnuStructured.Name = "mnuStructured" resources.ApplyResources(Me.mnuStructured, "mnuStructured") ' - 'ToolStripSeparator20 - ' - Me.ToolStripSeparator20.Name = "ToolStripSeparator20" - resources.ApplyResources(Me.ToolStripSeparator20, "ToolStripSeparator20") - ' 'mnuStructuredCircular ' Me.mnuStructuredCircular.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuStructuredCircularDefine, Me.mnuStructuredCircularCalculator, Me.mnuStructuredCircularSummaries, Me.ToolStripSeparator46, Me.mnuStructuredCircularScatterPlot, Me.mnuStructuredCircularDensityPlot, Me.mnuStructuredCircularRosePlot, Me.ToolStripSeparator67, Me.mnuStructuredCircularWindRose, Me.mnuStructuredCircularWindPollutionRose, Me.mnuStructuredCircularOtherRosePlots, Me.ToolStripSeparator68, Me.mnuStructuredCircularCirclize}) @@ -3363,6 +3357,66 @@ Partial Class frmMain Me.mnuStructuredCircularDefine.Name = "mnuStructuredCircularDefine" resources.ApplyResources(Me.mnuStructuredCircularDefine, "mnuStructuredCircularDefine") ' + 'mnuStructuredCircularCalculator + ' + Me.mnuStructuredCircularCalculator.Name = "mnuStructuredCircularCalculator" + resources.ApplyResources(Me.mnuStructuredCircularCalculator, "mnuStructuredCircularCalculator") + ' + 'mnuStructuredCircularSummaries + ' + Me.mnuStructuredCircularSummaries.Name = "mnuStructuredCircularSummaries" + resources.ApplyResources(Me.mnuStructuredCircularSummaries, "mnuStructuredCircularSummaries") + ' + 'ToolStripSeparator46 + ' + Me.ToolStripSeparator46.Name = "ToolStripSeparator46" + resources.ApplyResources(Me.ToolStripSeparator46, "ToolStripSeparator46") + ' + 'mnuStructuredCircularScatterPlot + ' + resources.ApplyResources(Me.mnuStructuredCircularScatterPlot, "mnuStructuredCircularScatterPlot") + Me.mnuStructuredCircularScatterPlot.Name = "mnuStructuredCircularScatterPlot" + ' + 'mnuStructuredCircularDensityPlot + ' + resources.ApplyResources(Me.mnuStructuredCircularDensityPlot, "mnuStructuredCircularDensityPlot") + Me.mnuStructuredCircularDensityPlot.Name = "mnuStructuredCircularDensityPlot" + ' + 'mnuStructuredCircularRosePlot + ' + resources.ApplyResources(Me.mnuStructuredCircularRosePlot, "mnuStructuredCircularRosePlot") + Me.mnuStructuredCircularRosePlot.Name = "mnuStructuredCircularRosePlot" + ' + 'ToolStripSeparator67 + ' + Me.ToolStripSeparator67.Name = "ToolStripSeparator67" + resources.ApplyResources(Me.ToolStripSeparator67, "ToolStripSeparator67") + ' + 'mnuStructuredCircularWindRose + ' + Me.mnuStructuredCircularWindRose.Name = "mnuStructuredCircularWindRose" + resources.ApplyResources(Me.mnuStructuredCircularWindRose, "mnuStructuredCircularWindRose") + ' + 'mnuStructuredCircularWindPollutionRose + ' + resources.ApplyResources(Me.mnuStructuredCircularWindPollutionRose, "mnuStructuredCircularWindPollutionRose") + Me.mnuStructuredCircularWindPollutionRose.Name = "mnuStructuredCircularWindPollutionRose" + ' + 'mnuStructuredCircularOtherRosePlots + ' + resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlots, "mnuStructuredCircularOtherRosePlots") + Me.mnuStructuredCircularOtherRosePlots.Name = "mnuStructuredCircularOtherRosePlots" + ' + 'ToolStripSeparator68 + ' + Me.ToolStripSeparator68.Name = "ToolStripSeparator68" + resources.ApplyResources(Me.ToolStripSeparator68, "ToolStripSeparator68") + ' + 'mnuStructuredCircularCirclize + ' + resources.ApplyResources(Me.mnuStructuredCircularCirclize, "mnuStructuredCircularCirclize") + Me.mnuStructuredCircularCirclize.Name = "mnuStructuredCircularCirclize" + ' 'mnuStructuredLow_Flow ' Me.mnuStructuredLow_Flow.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuStructuredLow_FlowDefine}) @@ -3901,6 +3955,18 @@ Partial Class frmMain Me.splMetadata.Panel2.BackColor = System.Drawing.SystemColors.Control Me.splMetadata.Panel2.Controls.Add(Me.ucrDataFrameMeta) ' + 'ucrColumnMeta + ' + Me.ucrColumnMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrColumnMeta, "ucrColumnMeta") + Me.ucrColumnMeta.Name = "ucrColumnMeta" + ' + 'ucrDataFrameMeta + ' + Me.ucrDataFrameMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrDataFrameMeta, "ucrDataFrameMeta") + Me.ucrDataFrameMeta.Name = "ucrDataFrameMeta" + ' 'splLogScript ' Me.splLogScript.BackColor = System.Drawing.Color.LightGray @@ -3917,6 +3983,19 @@ Partial Class frmMain Me.splLogScript.Panel2.BackColor = System.Drawing.SystemColors.Control Me.splLogScript.Panel2.Controls.Add(Me.ucrScriptWindow) ' + 'ucrLogWindow + ' + Me.ucrLogWindow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrLogWindow, "ucrLogWindow") + Me.ucrLogWindow.Name = "ucrLogWindow" + ' + 'ucrScriptWindow + ' + Me.ucrScriptWindow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrScriptWindow, "ucrScriptWindow") + Me.ucrScriptWindow.Name = "ucrScriptWindow" + Me.ucrScriptWindow.Tag = "Script_Window" + ' 'splDataOutput ' Me.splDataOutput.BackColor = System.Drawing.Color.LightGray @@ -3933,6 +4012,20 @@ Partial Class frmMain Me.splDataOutput.Panel2.BackColor = System.Drawing.SystemColors.Control Me.splDataOutput.Panel2.Controls.Add(Me.ucrOutput) ' + 'ucrDataViewer + ' + Me.ucrDataViewer.BackColor = System.Drawing.SystemColors.Control + Me.ucrDataViewer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrDataViewer, "ucrDataViewer") + Me.ucrDataViewer.Name = "ucrDataViewer" + Me.ucrDataViewer.Tag = "Data_View" + ' + 'ucrOutput + ' + Me.ucrOutput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + resources.ApplyResources(Me.ucrOutput, "ucrOutput") + Me.ucrOutput.Name = "ucrOutput" + ' 'mnuRViewer ' Me.mnuRViewer.Name = "mnuRViewer" @@ -3963,105 +4056,6 @@ Partial Class frmMain Me.mnuLogFile.Name = "mnuLogFile" resources.ApplyResources(Me.mnuLogFile, "mnuLogFile") ' - 'mnuStructuredCircularCalculator - ' - Me.mnuStructuredCircularCalculator.Name = "mnuStructuredCircularCalculator" - resources.ApplyResources(Me.mnuStructuredCircularCalculator, "mnuStructuredCircularCalculator") - ' - 'mnuStructuredCircularSummaries - ' - Me.mnuStructuredCircularSummaries.Name = "mnuStructuredCircularSummaries" - resources.ApplyResources(Me.mnuStructuredCircularSummaries, "mnuStructuredCircularSummaries") - ' - 'ToolStripSeparator46 - ' - Me.ToolStripSeparator46.Name = "ToolStripSeparator46" - resources.ApplyResources(Me.ToolStripSeparator46, "ToolStripSeparator46") - ' - 'mnuStructuredCircularScatterPlot - ' - resources.ApplyResources(Me.mnuStructuredCircularScatterPlot, "mnuStructuredCircularScatterPlot") - Me.mnuStructuredCircularScatterPlot.Name = "mnuStructuredCircularScatterPlot" - ' - 'mnuStructuredCircularDensityPlot - ' - resources.ApplyResources(Me.mnuStructuredCircularDensityPlot, "mnuStructuredCircularDensityPlot") - Me.mnuStructuredCircularDensityPlot.Name = "mnuStructuredCircularDensityPlot" - ' - 'mnuStructuredCircularRosePlot - ' - resources.ApplyResources(Me.mnuStructuredCircularRosePlot, "mnuStructuredCircularRosePlot") - Me.mnuStructuredCircularRosePlot.Name = "mnuStructuredCircularRosePlot" - ' - 'ToolStripSeparator67 - ' - Me.ToolStripSeparator67.Name = "ToolStripSeparator67" - resources.ApplyResources(Me.ToolStripSeparator67, "ToolStripSeparator67") - ' - 'mnuStructuredCircularWindRose - ' - Me.mnuStructuredCircularWindRose.Name = "mnuStructuredCircularWindRose" - resources.ApplyResources(Me.mnuStructuredCircularWindRose, "mnuStructuredCircularWindRose") - ' - 'mnuStructuredCircularWindPollutionRose - ' - resources.ApplyResources(Me.mnuStructuredCircularWindPollutionRose, "mnuStructuredCircularWindPollutionRose") - Me.mnuStructuredCircularWindPollutionRose.Name = "mnuStructuredCircularWindPollutionRose" - ' - 'mnuStructuredCircularOtherRosePlots - ' - resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlots, "mnuStructuredCircularOtherRosePlots") - Me.mnuStructuredCircularOtherRosePlots.Name = "mnuStructuredCircularOtherRosePlots" - ' - 'ToolStripSeparator68 - ' - Me.ToolStripSeparator68.Name = "ToolStripSeparator68" - resources.ApplyResources(Me.ToolStripSeparator68, "ToolStripSeparator68") - ' - 'mnuStructuredCircularCirclize - ' - resources.ApplyResources(Me.mnuStructuredCircularCirclize, "mnuStructuredCircularCirclize") - Me.mnuStructuredCircularCirclize.Name = "mnuStructuredCircularCirclize" - ' - 'ucrColumnMeta - ' - Me.ucrColumnMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrColumnMeta, "ucrColumnMeta") - Me.ucrColumnMeta.Name = "ucrColumnMeta" - ' - 'ucrDataFrameMeta - ' - Me.ucrDataFrameMeta.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrDataFrameMeta, "ucrDataFrameMeta") - Me.ucrDataFrameMeta.Name = "ucrDataFrameMeta" - ' - 'ucrLogWindow - ' - Me.ucrLogWindow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrLogWindow, "ucrLogWindow") - Me.ucrLogWindow.Name = "ucrLogWindow" - ' - 'ucrScriptWindow - ' - Me.ucrScriptWindow.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrScriptWindow, "ucrScriptWindow") - Me.ucrScriptWindow.Name = "ucrScriptWindow" - Me.ucrScriptWindow.Tag = "Script_Window" - ' - 'ucrDataViewer - ' - Me.ucrDataViewer.BackColor = System.Drawing.SystemColors.Control - Me.ucrDataViewer.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrDataViewer, "ucrDataViewer") - Me.ucrDataViewer.Name = "ucrDataViewer" - Me.ucrDataViewer.Tag = "Data_View" - ' - 'ucrOutput - ' - Me.ucrOutput.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - resources.ApplyResources(Me.ucrOutput, "ucrOutput") - Me.ucrOutput.Name = "ucrOutput" - ' 'frmMain ' resources.ApplyResources(Me, "$this") @@ -4660,7 +4654,6 @@ Partial Class frmMain Friend WithEvents mnuModelFitModelHypothesisTestsKeyboard As ToolStripMenuItem Friend WithEvents mnuClimaticCheckDataHomogenization As ToolStripMenuItem Friend WithEvents mnuStructured As ToolStripMenuItem - Friend WithEvents ToolStripSeparator20 As ToolStripSeparator Friend WithEvents mnuStructuredCircular As ToolStripMenuItem Friend WithEvents mnuStructuredCircularDefine As ToolStripMenuItem Friend WithEvents mnuStructuredLow_Flow As ToolStripMenuItem diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 3f7d505e868..1e67e459feb 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -3468,9 +3468,6 @@ Prepare - - 183, 6 - 192, 22 @@ -6360,9 +6357,6 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA - - NoControl - R-Instat @@ -9210,12 +9204,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ToolStripSeparator20 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - mnuStructuredCircular @@ -9228,6 +9216,78 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuStructuredCircularCalculator + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularSummaries + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ToolStripSeparator46 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularScatterPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularDensityPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularRosePlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ToolStripSeparator67 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularWindRose + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularWindPollutionRose + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularOtherRosePlots + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ToolStripSeparator68 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularCirclize + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + mnuStructuredLow_Flow @@ -9822,78 +9882,6 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - mnuStructuredCircularCalculator - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuStructuredCircularSummaries - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ToolStripSeparator46 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuStructuredCircularScatterPlot - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuStructuredCircularDensityPlot - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuStructuredCircularRosePlot - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ToolStripSeparator67 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuStructuredCircularWindRose - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuStructuredCircularWindPollutionRose - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuStructuredCircularOtherRosePlots - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - ToolStripSeparator68 - - - System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - mnuStructuredCircularCirclize - - - System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - frmMain diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 9fe2c220312..6aa5240c957 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -137,12 +137,14 @@ Public Class frmMain Public Sub TranslateFrmMainMenu() translateMenu(mnuBar.Items, Me) End Sub + Private Sub SetMainMenusEnabled(bEnabled As Boolean) mnuFile.Enabled = bEnabled mnuEdit.Enabled = bEnabled mnuPrepare.Enabled = bEnabled mnuDescribe.Enabled = bEnabled mnuModel.Enabled = bEnabled + mnuStructured.Enabled = bEnabled mnuClimatic.Enabled = bEnabled mnuProcurement.Enabled = bEnabled mnuOptionsByContext.Enabled = bEnabled @@ -559,7 +561,6 @@ Public Class frmMain End Sub Private Sub mnuPrepareRechapeColumnSummaries_Click(sender As Object, e As EventArgs) Handles mnuPrepareColumnReshapeColumnSummaries.Click - sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -1102,7 +1103,6 @@ Public Class frmMain End Sub Private Sub mnuDescribeGeneralColumnSummaries_Click(sender As Object, e As EventArgs) Handles mnuDescribeGeneralColumnSummaries.Click - sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -1494,7 +1494,6 @@ Public Class frmMain dlgColumnStats.strDefaultVariables = Nothing dlgColumnStats.strDefaultFactors = Nothing End If - sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -1647,7 +1646,6 @@ Public Class frmMain dlgColumnStats.strDefaultVariables = Nothing dlgColumnStats.strDefaultFactors = Nothing End If - sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -1674,7 +1672,6 @@ Public Class frmMain dlgColumnStats.strDefaultVariables = Nothing dlgColumnStats.strDefaultFactors = Nothing End If - sdgSummaries.iIndex = 0 dlgColumnStats.ShowDialog() End Sub @@ -2177,7 +2174,9 @@ Public Class frmMain End Sub Private Sub mnuStructuredCircularSummaries_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularSummaries.Click - sdgSummaries.iIndex = 5 + If dlgColumnStats.bFirstLoad Then + dlgColumnStats.SetDefaultTab("Circular") + End If dlgColumnStats.ShowDialog() End Sub @@ -2186,7 +2185,9 @@ Public Class frmMain End Sub Private Sub mnuStructuredCircularCalculator_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularCalculator.Click - dlgCalculator.SetDefaultKeyboard("Circular") + If dlgCalculator.bFirstLoad Then + dlgCalculator.SetDefaultKeyboard("Circular") + End If dlgCalculator.ShowDialog() End Sub diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index 534f14cbe99..7f954bdeccf 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -26,7 +26,7 @@ Public Class sdgSummaries Private strWeightLabel As String Public bEnable2VariableTab As Boolean = True Public bOkEnabled As Boolean = True - Public iIndex As Integer + Private Sub sdgDescribe_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) tbTwoVariables.Enabled = bEnable2VariableTab @@ -360,7 +360,9 @@ Public Class sdgSummaries OrderByCheckEnabled() End Sub - Public Sub SetRFunction(clsNewRFunction As RFunction, clsNewDefaultFunction As RFunction, clsNewConcFunction As RFunction, Optional ucrNewBaseSelector As ucrSelector = Nothing, Optional bReset As Boolean = False, Optional strNewWeightLabel As String = Nothing) + Public Sub SetRFunction(clsNewRFunction As RFunction, clsNewDefaultFunction As RFunction, clsNewConcFunction As RFunction, Optional ucrNewBaseSelector As ucrSelector = Nothing, Optional bReset As Boolean = False, Optional strNewWeightLabel As String = Nothing, Optional strDefaultTab As String = "") + Dim bTabFound As Boolean = False + If Not bControlsInitialised Then InitialiseControls() @@ -482,9 +484,23 @@ Public Class sdgSummaries ucrChkVolumetricEfficiency.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) If bReset Then - tbSummaries.SelectedIndex = iIndex ucrSelectorSecondVariable.Reset() ucrSelectorOrderBy.Reset() + If strDefaultTab <> "" Then + For i As Integer = 0 To tbSummaries.TabPages.Count - 1 + If tbSummaries.TabPages(i).Text = strDefaultTab Then + tbSummaries.SelectedIndex = i + bTabFound = True + Exit For + End If + Next + ' Could give a developer error here as it means strDefaultTab was not recognised. + If Not bTabFound Then + tbSummaries.SelectedIndex = 0 + End If + Else + tbSummaries.SelectedIndex = 0 + End If End If End Sub From c0fb63e29546c471147686668f998cf6272956c6 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 16 Sep 2020 12:47:07 +0100 Subject: [PATCH 137/277] Update instat/dlgCalculator.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgCalculator.vb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 9605a4a5190..243f9b103d8 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -27,7 +27,8 @@ Public Class dlgCalculator Private iBasicWidth As Integer Private strDefaultKeyboard As String ' Note: This list needs to be updated when a new keyboard is added. - Private strKeyboards() As String = {"Maths", "Logical and Symbols", "Summary", "Strings (Character Columns)", "Factor", "Probability", "Dates", "Transform", "Circular", "Wakefield", "Modifier", "Symbols", "hydroGOF"} + Private strKeyboards() As String = {"Maths", "Logical and Symbols", "Summary", "Strings (Character Columns)", "Factor", "Probability", "Dates", "Transform", "Circular", "Wakefield", "Modifier", "Symbols", "HydroGOF"} + Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -189,4 +190,4 @@ Public Class dlgCalculator ucrCalc.ucrSaveResultInto.Visible = False End If End Sub -End Class \ No newline at end of file +End Class From 9b74360d7845597315cfb311d69c05bcab646e09 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 16 Sep 2020 12:56:48 +0100 Subject: [PATCH 138/277] fixed bug in setting method and added developer error --- instat/dlgCalculator.vb | 3 ++- instat/sdgSummaries.vb | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 9605a4a5190..5c2126e1826 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -100,8 +100,9 @@ Public Class dlgCalculator If Not strKeyboards.Contains(strNewDefaultKeyboard) Then MsgBox("Developer error: there is no Calculator keyboard called" & Chr(34) & strNewDefaultKeyboard & Chr(34) & vbNewLine & "Default keyboard will be selected.") strDefaultKeyboard = "" + Else + strDefaultKeyboard = strNewDefaultKeyboard End If - strDefaultKeyboard = strNewDefaultKeyboard End Sub Private Sub ucrCalc_SaveNameChanged() Handles ucrCalc.SaveNameChanged diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index 7f954bdeccf..c4d0aab0385 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -494,8 +494,8 @@ Public Class sdgSummaries Exit For End If Next - ' Could give a developer error here as it means strDefaultTab was not recognised. If Not bTabFound Then + MsgBox("Developer error: there is no Summary tab called" & Chr(34) & strDefaultTab & Chr(34) & vbNewLine & "Default tab will be selected.") tbSummaries.SelectedIndex = 0 End If Else From e3cc43c2c7401e27ab1c47a8fd6a0009484fd212 Mon Sep 17 00:00:00 2001 From: N-thony Date: Wed, 16 Sep 2020 14:51:53 +0200 Subject: [PATCH 139/277] Adding code for details output and save details --- instat/dlgInventoryPlot.designer.vb | 28 +++++++--- instat/dlgInventoryPlot.resx | 86 +++++++++++++++++------------ instat/dlgInventoryPlot.vb | 44 +++++++++------ 3 files changed, 99 insertions(+), 59 deletions(-) diff --git a/instat/dlgInventoryPlot.designer.vb b/instat/dlgInventoryPlot.designer.vb index 958ff24b90c..4f36566f4b7 100644 --- a/instat/dlgInventoryPlot.designer.vb +++ b/instat/dlgInventoryPlot.designer.vb @@ -50,9 +50,10 @@ Partial Class dlgInventoryPlot Me.rdoElementOrder = New System.Windows.Forms.RadioButton() Me.rdoDateOrder = New System.Windows.Forms.RadioButton() Me.pnlSummary = New System.Windows.Forms.Panel() + Me.pnlOmit = New System.Windows.Forms.Panel() Me.ucrChkOmitStart = New instat.ucrCheck() - Me.ucrChkSummary = New instat.ucrCheck() Me.ucrChkOmitEnd = New instat.ucrCheck() + Me.ucrChkSummary = New instat.ucrCheck() Me.ucrChkDetails = New instat.ucrCheck() Me.ucrPnlOrder = New instat.UcrPanel() Me.ucrSaveDetails = New instat.ucrSave() @@ -70,6 +71,7 @@ Partial Class dlgInventoryPlot Me.ucrBase = New instat.ucrButtons() Me.pnlDetails.SuspendLayout() Me.pnlSummary.SuspendLayout() + Me.pnlOmit.SuspendLayout() Me.SuspendLayout() ' 'lblDate @@ -145,34 +147,40 @@ Partial Class dlgInventoryPlot ' 'pnlSummary ' - Me.pnlSummary.Controls.Add(Me.ucrChkOmitStart) + Me.pnlSummary.Controls.Add(Me.pnlOmit) Me.pnlSummary.Controls.Add(Me.ucrChkSummary) Me.pnlSummary.Controls.Add(Me.rdoElementOrder) - Me.pnlSummary.Controls.Add(Me.ucrChkOmitEnd) Me.pnlSummary.Controls.Add(Me.ucrChkDetails) Me.pnlSummary.Controls.Add(Me.rdoDateOrder) Me.pnlSummary.Controls.Add(Me.ucrPnlOrder) resources.ApplyResources(Me.pnlSummary, "pnlSummary") Me.pnlSummary.Name = "pnlSummary" ' + 'pnlOmit + ' + Me.pnlOmit.Controls.Add(Me.ucrChkOmitStart) + Me.pnlOmit.Controls.Add(Me.ucrChkOmitEnd) + resources.ApplyResources(Me.pnlOmit, "pnlOmit") + Me.pnlOmit.Name = "pnlOmit" + ' 'ucrChkOmitStart ' Me.ucrChkOmitStart.Checked = False resources.ApplyResources(Me.ucrChkOmitStart, "ucrChkOmitStart") Me.ucrChkOmitStart.Name = "ucrChkOmitStart" ' - 'ucrChkSummary - ' - Me.ucrChkSummary.Checked = False - resources.ApplyResources(Me.ucrChkSummary, "ucrChkSummary") - Me.ucrChkSummary.Name = "ucrChkSummary" - ' 'ucrChkOmitEnd ' Me.ucrChkOmitEnd.Checked = False resources.ApplyResources(Me.ucrChkOmitEnd, "ucrChkOmitEnd") Me.ucrChkOmitEnd.Name = "ucrChkOmitEnd" ' + 'ucrChkSummary + ' + Me.ucrChkSummary.Checked = False + resources.ApplyResources(Me.ucrChkSummary, "ucrChkSummary") + Me.ucrChkSummary.Name = "ucrChkSummary" + ' 'ucrChkDetails ' Me.ucrChkDetails.Checked = False @@ -297,6 +305,7 @@ Partial Class dlgInventoryPlot Me.pnlDetails.ResumeLayout(False) Me.pnlSummary.ResumeLayout(False) Me.pnlSummary.PerformLayout() + Me.pnlOmit.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() @@ -330,4 +339,5 @@ Partial Class dlgInventoryPlot Friend WithEvents pnlSummary As Panel Friend WithEvents ucrChkOmitEnd As ucrCheck Friend WithEvents ucrChkOmitStart As ucrCheck + Friend WithEvents pnlOmit As Panel End Class diff --git a/instat/dlgInventoryPlot.resx b/instat/dlgInventoryPlot.resx index 1513b713e53..dd93637b3e7 100644 --- a/instat/dlgInventoryPlot.resx +++ b/instat/dlgInventoryPlot.resx @@ -370,7 +370,7 @@ 6 - 2, 319 + 2, 321 402, 100 @@ -532,7 +532,7 @@ NoControl - 245, 28 + 245, 29 92, 17 @@ -562,7 +562,7 @@ NoControl - 123, 28 + 123, 29 77, 17 @@ -583,10 +583,10 @@ pnlSummary - 5 + 4 - 123, 3 + 3, 7 100, 20 @@ -601,11 +601,53 @@ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - pnlSummary + pnlOmit 0 + + 125, 7 + + + 100, 20 + + + 10 + + + ucrChkOmitEnd + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + pnlOmit + + + 1 + + + 120, 1 + + + 250, 28 + + + 39 + + + pnlOmit + + + System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + pnlSummary + + + 0 + 7, 3 @@ -627,29 +669,8 @@ 1 - - 245, 3 - - - 100, 20 - - - 10 - - - ucrChkOmitEnd - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlSummary - - - 3 - - 7, 28 + 7, 29 100, 20 @@ -667,7 +688,7 @@ pnlSummary - 4 + 3 114, 25 @@ -688,10 +709,10 @@ pnlSummary - 6 + 5 - 4, 266 + 4, 270 376, 50 @@ -834,9 +855,6 @@ 14 - - NoControl - CenterScreen diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index c27e2ca773b..c1e4d3c389e 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -73,7 +73,7 @@ Public Class dlgInventoryPlot ucrChkSummary.AddFunctionNamesCondition(True, "climatic_missing") ucrChkSummary.SetText("Summary") - ucrChkDetails.AddFunctionNamesCondition(True, "climatic_details") + ucrChkDetails.AddRSyntaxContainsFunctionNamesCondition(True, {"climatic_details"}) ucrChkDetails.SetText("Details") 'ucrChkDetails.SetValuesCheckedAndUnchecked("TRUE", "FALSE") 'ucrChkDetails.SetRDefault("FALSE") @@ -129,14 +129,19 @@ Public Class dlgInventoryPlot ucrPnls.AddRadioButton(rdoMissing) ucrPnls.AddRadioButton(rdoGraph) - ucrPnls.AddFunctionNamesCondition(rdoMissing, "climatic_missing") + 'ucrPnls.AddFunctionNamesCondition(rdoMissing, "climatic_missing") ucrPnls.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") - ucrPnls.AddToLinkedControls({ucrChkSummary, ucrChkOmitStart, ucrChkOmitEnd}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnls.AddToLinkedControls(ucrChkSummary, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnls.AddToLinkedControls(ucrChkDetails, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDetails.AddToLinkedControls({ucrPnlOrder}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkSummary.AddToLinkedControls({ucrChkOmitStart}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDay.SetLinkedDisplayControl(pnlDetails) ucrChkSummary.SetLinkedDisplayControl(ucrPnlOrder) - + ucrChkSummary.SetLinkedDisplayControl(pnlSummary) + ucrChkOmitStart.SetLinkedDisplayControl(pnlOmit) + ucrPnlOrder.SetLinkedDisplayControl(rdoDateOrder) + ucrPnlOrder.SetLinkedDisplayControl(rdoElementOrder) @@ -168,6 +173,8 @@ Public Class dlgInventoryPlot 'clsClimaticDetails.SetAssignTo("last_table", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempTable:="last_table") clsClimaticMissing.SetRCommand("climatic_missing") clsClimaticDetails.SetRCommand("climatic_details") + clsClimaticDetails.iCallType = 2 + ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) TestOkEnabled() @@ -175,13 +182,13 @@ Public Class dlgInventoryPlot Private Sub SetRCodeForControls(bReset As Boolean) ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("data", ucrInventoryPlotSelector.ucrAvailableDataFrames.clsCurrDataFrame), iAdditionalPairNo:=1) - ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("date", ucrReceiverDate.GetVariables), iAdditionalPairNo:=1) - ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("elements", ucrReceiverElements.GetVariableNames(bWithQuotes:=False)), iAdditionalPairNo:=1) + ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("date"), iAdditionalPairNo:=1) + ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("elements"), iAdditionalPairNo:=1) ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("stations"), iAdditionalPairNo:=1) ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("data", ucrInventoryPlotSelector.ucrAvailableDataFrames.clsCurrDataFrame), iAdditionalPairNo:=2) ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("date"), iAdditionalPairNo:=2) - ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("elements", ucrReceiverElements.GetVariableNames(bWithQuotes:=False)), iAdditionalPairNo:=2) + ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("elements"), iAdditionalPairNo:=2) ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("stations"), iAdditionalPairNo:=2) ucrInventoryPlotSelector.SetRCode(clsDefaultRFunction, bReset) @@ -189,7 +196,7 @@ Public Class dlgInventoryPlot ucrReceiverStation.SetRCode(clsDefaultRFunction, bReset) ucrReceiverElements.SetRCode(clsDefaultRFunction, bReset) ucrChkSummary.SetRCode(clsClimaticMissing, bReset) - ucrChkDetails.SetRCode(clsClimaticDetails, bReset) + ucrChkDetails.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkYear.SetRCode(clsClimaticDetails, bReset) ucrChkMonth.SetRCode(clsClimaticDetails, bReset) ucrChkDay.SetRCode(clsClimaticDetails, bReset) @@ -224,12 +231,8 @@ Public Class dlgInventoryPlot TestOkEnabled() End Sub Private Sub ChangeFunction() - 'If ucrChkSummary.Checked Then - 'ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticMissing) - 'ucrBase.clsRsyntax.iCallType = 2 - 'End If - If ucrChkDetails.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticDetails) + If ucrChkSummary.Checked Then + ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticMissing) ucrBase.clsRsyntax.iCallType = 2 End If End Sub @@ -237,11 +240,12 @@ Public Class dlgInventoryPlot Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnls.ControlValueChanged If rdoMissing.Checked Then ChangeFunction() - pnlSummary.Location = New Point(pnlSummary.Location.X, iPnlSummaryY / 1.05) - pnlDetails.Location = New Point(pnlDetails.Location.X, iPnlDetailsY / 1.05) + pnlSummary.Location = New Point(pnlSummary.Location.X, iPnlSummaryY / 1.09) + pnlDetails.Location = New Point(pnlDetails.Location.X, iPnlDetailsY / 1.08) cmdInventoryPlotOptions.Visible = False cmdOptions.Visible = False ucrChkDetails.Checked = False + ucrChkSummary.Checked = True Else ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) ucrBase.clsRsyntax.iCallType = 3 @@ -257,4 +261,12 @@ Public Class dlgInventoryPlot ucrReceiverDate.SetParameterIsRFunction() End If End Sub + + Private Sub ucrChkDetails_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDetails.ControlValueChanged + If ucrChkDetails.Checked Then + ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticDetails) + Else + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticDetails) + End If + End Sub End Class \ No newline at end of file From d0f82374dbfa17574ccef57cb9b152e1d7b0c25b Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 16 Sep 2020 17:42:09 +0100 Subject: [PATCH 140/277] initial time series plots dialog code for data manipulation --- instat/dlgTimeSeriesPlot.Designer.vb | 222 +++++++++++++-------------- instat/dlgTimeSeriesPlot.vb | 169 +++++++++++++++++++- 2 files changed, 279 insertions(+), 112 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb index 38200b5c2f4..ecdbf625973 100644 --- a/instat/dlgTimeSeriesPlot.Designer.vb +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -23,16 +23,16 @@ Partial Class dlgTimeSeriesPlot _ Private Sub InitializeComponent() Me.ucrBase = New instat.ucrButtons() - Me.ucrDataSelector = New instat.ucrSelectorByDataFrameAddRemove() - Me.lblReference = New System.Windows.Forms.Label() + Me.ucrSelectorTimeSeriesPlots = New instat.ucrSelectorByDataFrameAddRemove() + Me.lblReferenceValues = New System.Windows.Forms.Label() Me.ucrReceiverReference = New instat.ucrReceiverSingle() - Me.UcrReceiverSingle2 = New instat.ucrReceiverSingle() - Me.lblEstimate = New System.Windows.Forms.Label() - Me.lblYear = New System.Windows.Forms.Label() - Me.ucrReceiverYear = New instat.ucrReceiverSingle() + Me.ucrReceiverEstimates = New instat.ucrReceiverSingle() + Me.lblEstimates = New System.Windows.Forms.Label() + Me.lblTime = New System.Windows.Forms.Label() + Me.ucrReceiverTime = New instat.ucrReceiverSingle() Me.lblStation = New System.Windows.Forms.Label() - Me.UcrReceiverSingle4 = New instat.ucrReceiverSingle() - Me.ucrChkValues = New instat.ucrCheck() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrChkNAValues = New instat.ucrCheck() Me.ucrChkIncludeMeanLines = New instat.ucrCheck() Me.ucrChkIncludePoints = New instat.ucrCheck() Me.cmdSummaries = New System.Windows.Forms.Button() @@ -41,30 +41,30 @@ Partial Class dlgTimeSeriesPlot ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(9, 425) + Me.ucrBase.Location = New System.Drawing.Point(10, 428) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) - Me.ucrBase.TabIndex = 0 + Me.ucrBase.TabIndex = 14 ' - 'ucrDataSelector + 'ucrSelectorTimeSeriesPlots ' - Me.ucrDataSelector.bDropUnusedFilterLevels = False - Me.ucrDataSelector.bShowHiddenColumns = False - Me.ucrDataSelector.bUseCurrentFilter = True - Me.ucrDataSelector.Location = New System.Drawing.Point(12, 9) - Me.ucrDataSelector.Margin = New System.Windows.Forms.Padding(0) - Me.ucrDataSelector.Name = "ucrDataSelector" - Me.ucrDataSelector.Size = New System.Drawing.Size(218, 180) - Me.ucrDataSelector.TabIndex = 1 + Me.ucrSelectorTimeSeriesPlots.bDropUnusedFilterLevels = False + Me.ucrSelectorTimeSeriesPlots.bShowHiddenColumns = False + Me.ucrSelectorTimeSeriesPlots.bUseCurrentFilter = True + Me.ucrSelectorTimeSeriesPlots.Location = New System.Drawing.Point(12, 9) + Me.ucrSelectorTimeSeriesPlots.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorTimeSeriesPlots.Name = "ucrSelectorTimeSeriesPlots" + Me.ucrSelectorTimeSeriesPlots.Size = New System.Drawing.Size(218, 180) + Me.ucrSelectorTimeSeriesPlots.TabIndex = 0 ' - 'lblReference + 'lblReferenceValues ' - Me.lblReference.AutoSize = True - Me.lblReference.Location = New System.Drawing.Point(286, 15) - Me.lblReference.Name = "lblReference" - Me.lblReference.Size = New System.Drawing.Size(60, 13) - Me.lblReference.TabIndex = 2 - Me.lblReference.Text = "Reference:" + Me.lblReferenceValues.AutoSize = True + Me.lblReferenceValues.Location = New System.Drawing.Point(286, 24) + Me.lblReferenceValues.Name = "lblReferenceValues" + Me.lblReferenceValues.Size = New System.Drawing.Size(95, 13) + Me.lblReferenceValues.TabIndex = 1 + Me.lblReferenceValues.Text = "Reference Values:" ' 'ucrReceiverReference ' @@ -75,84 +75,84 @@ Partial Class dlgTimeSeriesPlot Me.ucrReceiverReference.Selector = Nothing Me.ucrReceiverReference.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverReference.strNcFilePath = "" - Me.ucrReceiverReference.TabIndex = 3 + Me.ucrReceiverReference.TabIndex = 2 Me.ucrReceiverReference.ucrSelector = Nothing ' - 'UcrReceiverSingle2 - ' - Me.UcrReceiverSingle2.frmParent = Me - Me.UcrReceiverSingle2.Location = New System.Drawing.Point(286, 92) - Me.UcrReceiverSingle2.Margin = New System.Windows.Forms.Padding(0) - Me.UcrReceiverSingle2.Name = "UcrReceiverSingle2" - Me.UcrReceiverSingle2.Selector = Nothing - Me.UcrReceiverSingle2.Size = New System.Drawing.Size(120, 20) - Me.UcrReceiverSingle2.strNcFilePath = "" - Me.UcrReceiverSingle2.TabIndex = 4 - Me.UcrReceiverSingle2.ucrSelector = Nothing - ' - 'lblEstimate - ' - Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(286, 67) - Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(50, 13) - Me.lblEstimate.TabIndex = 5 - Me.lblEstimate.Text = "Estimate:" - ' - 'lblYear - ' - Me.lblYear.AutoSize = True - Me.lblYear.Location = New System.Drawing.Point(286, 119) - Me.lblYear.Name = "lblYear" - Me.lblYear.Size = New System.Drawing.Size(32, 13) - Me.lblYear.TabIndex = 6 - Me.lblYear.Text = "Year:" - ' - 'ucrReceiverYear - ' - Me.ucrReceiverYear.frmParent = Me - Me.ucrReceiverYear.Location = New System.Drawing.Point(286, 151) - Me.ucrReceiverYear.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverYear.Name = "ucrReceiverYear" - Me.ucrReceiverYear.Selector = Nothing - Me.ucrReceiverYear.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverYear.strNcFilePath = "" - Me.ucrReceiverYear.TabIndex = 7 - Me.ucrReceiverYear.ucrSelector = Nothing + 'ucrReceiverEstimates + ' + Me.ucrReceiverEstimates.frmParent = Me + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(286, 86) + Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" + Me.ucrReceiverEstimates.Selector = Nothing + Me.ucrReceiverEstimates.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverEstimates.strNcFilePath = "" + Me.ucrReceiverEstimates.TabIndex = 4 + Me.ucrReceiverEstimates.ucrSelector = Nothing + ' + 'lblEstimates + ' + Me.lblEstimates.AutoSize = True + Me.lblEstimates.Location = New System.Drawing.Point(286, 71) + Me.lblEstimates.Name = "lblEstimates" + Me.lblEstimates.Size = New System.Drawing.Size(55, 13) + Me.lblEstimates.TabIndex = 3 + Me.lblEstimates.Text = "Estimates:" + ' + 'lblTime + ' + Me.lblTime.AutoSize = True + Me.lblTime.Location = New System.Drawing.Point(286, 118) + Me.lblTime.Name = "lblTime" + Me.lblTime.Size = New System.Drawing.Size(70, 13) + Me.lblTime.TabIndex = 5 + Me.lblTime.Text = "Time (X axis):" + ' + 'ucrReceiverTime + ' + Me.ucrReceiverTime.frmParent = Me + Me.ucrReceiverTime.Location = New System.Drawing.Point(286, 133) + Me.ucrReceiverTime.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverTime.Name = "ucrReceiverTime" + Me.ucrReceiverTime.Selector = Nothing + Me.ucrReceiverTime.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverTime.strNcFilePath = "" + Me.ucrReceiverTime.TabIndex = 6 + Me.ucrReceiverTime.ucrSelector = Nothing ' 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(286, 180) + Me.lblStation.Location = New System.Drawing.Point(286, 165) Me.lblStation.Name = "lblStation" Me.lblStation.Size = New System.Drawing.Size(43, 13) - Me.lblStation.TabIndex = 8 + Me.lblStation.TabIndex = 7 Me.lblStation.Text = "Station:" ' - 'UcrReceiverSingle4 + 'ucrReceiverStation ' - Me.UcrReceiverSingle4.frmParent = Me - Me.UcrReceiverSingle4.Location = New System.Drawing.Point(286, 208) - Me.UcrReceiverSingle4.Margin = New System.Windows.Forms.Padding(0) - Me.UcrReceiverSingle4.Name = "UcrReceiverSingle4" - Me.UcrReceiverSingle4.Selector = Nothing - Me.UcrReceiverSingle4.Size = New System.Drawing.Size(120, 20) - Me.UcrReceiverSingle4.strNcFilePath = "" - Me.UcrReceiverSingle4.TabIndex = 9 - Me.UcrReceiverSingle4.ucrSelector = Nothing + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(286, 180) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 8 + Me.ucrReceiverStation.ucrSelector = Nothing ' - 'ucrChkValues + 'ucrChkNAValues ' - Me.ucrChkValues.Checked = False - Me.ucrChkValues.Location = New System.Drawing.Point(12, 235) - Me.ucrChkValues.Name = "ucrChkValues" - Me.ucrChkValues.Size = New System.Drawing.Size(100, 20) - Me.ucrChkValues.TabIndex = 10 + Me.ucrChkNAValues.Checked = False + Me.ucrChkNAValues.Location = New System.Drawing.Point(10, 242) + Me.ucrChkNAValues.Name = "ucrChkNAValues" + Me.ucrChkNAValues.Size = New System.Drawing.Size(100, 20) + Me.ucrChkNAValues.TabIndex = 9 ' 'ucrChkIncludeMeanLines ' Me.ucrChkIncludeMeanLines.Checked = False - Me.ucrChkIncludeMeanLines.Location = New System.Drawing.Point(12, 310) + Me.ucrChkIncludeMeanLines.Location = New System.Drawing.Point(10, 316) Me.ucrChkIncludeMeanLines.Name = "ucrChkIncludeMeanLines" Me.ucrChkIncludeMeanLines.Size = New System.Drawing.Size(100, 20) Me.ucrChkIncludeMeanLines.TabIndex = 11 @@ -160,46 +160,46 @@ Partial Class dlgTimeSeriesPlot 'ucrChkIncludePoints ' Me.ucrChkIncludePoints.Checked = False - Me.ucrChkIncludePoints.Location = New System.Drawing.Point(12, 274) + Me.ucrChkIncludePoints.Location = New System.Drawing.Point(10, 279) Me.ucrChkIncludePoints.Name = "ucrChkIncludePoints" Me.ucrChkIncludePoints.Size = New System.Drawing.Size(100, 20) - Me.ucrChkIncludePoints.TabIndex = 12 + Me.ucrChkIncludePoints.TabIndex = 10 ' 'cmdSummaries ' - Me.cmdSummaries.Location = New System.Drawing.Point(12, 336) + Me.cmdSummaries.Location = New System.Drawing.Point(9, 345) Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(115, 32) - Me.cmdSummaries.TabIndex = 13 + Me.cmdSummaries.Size = New System.Drawing.Size(75, 23) + Me.cmdSummaries.TabIndex = 12 Me.cmdSummaries.Text = "Summaries" Me.cmdSummaries.UseVisualStyleBackColor = True ' 'ucrSavePlot ' - Me.ucrSavePlot.Location = New System.Drawing.Point(12, 385) + Me.ucrSavePlot.Location = New System.Drawing.Point(10, 385) Me.ucrSavePlot.Name = "ucrSavePlot" Me.ucrSavePlot.Size = New System.Drawing.Size(265, 20) - Me.ucrSavePlot.TabIndex = 14 + Me.ucrSavePlot.TabIndex = 13 ' 'dlgTimeSeriesPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(428, 482) + Me.ClientSize = New System.Drawing.Size(422, 482) Me.Controls.Add(Me.ucrSavePlot) Me.Controls.Add(Me.cmdSummaries) Me.Controls.Add(Me.ucrChkIncludePoints) Me.Controls.Add(Me.ucrChkIncludeMeanLines) - Me.Controls.Add(Me.ucrChkValues) - Me.Controls.Add(Me.UcrReceiverSingle4) + Me.Controls.Add(Me.ucrChkNAValues) + Me.Controls.Add(Me.ucrReceiverStation) Me.Controls.Add(Me.lblStation) - Me.Controls.Add(Me.ucrReceiverYear) - Me.Controls.Add(Me.lblYear) - Me.Controls.Add(Me.lblEstimate) - Me.Controls.Add(Me.UcrReceiverSingle2) + Me.Controls.Add(Me.ucrReceiverTime) + Me.Controls.Add(Me.lblTime) + Me.Controls.Add(Me.lblEstimates) + Me.Controls.Add(Me.ucrReceiverEstimates) Me.Controls.Add(Me.ucrReceiverReference) - Me.Controls.Add(Me.lblReference) - Me.Controls.Add(Me.ucrDataSelector) + Me.Controls.Add(Me.lblReferenceValues) + Me.Controls.Add(Me.ucrSelectorTimeSeriesPlots) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -213,18 +213,18 @@ Partial Class dlgTimeSeriesPlot End Sub Friend WithEvents ucrBase As ucrButtons - Friend WithEvents ucrDataSelector As ucrSelectorByDataFrameAddRemove - Friend WithEvents lblReference As Label + Friend WithEvents ucrSelectorTimeSeriesPlots As ucrSelectorByDataFrameAddRemove + Friend WithEvents lblReferenceValues As Label Friend WithEvents ucrReceiverReference As ucrReceiverSingle Friend WithEvents ucrSavePlot As ucrSaveGraph Friend WithEvents cmdSummaries As Button Friend WithEvents ucrChkIncludePoints As ucrCheck Friend WithEvents ucrChkIncludeMeanLines As ucrCheck - Friend WithEvents ucrChkValues As ucrCheck - Friend WithEvents UcrReceiverSingle4 As ucrReceiverSingle + Friend WithEvents ucrChkNAValues As ucrCheck + Friend WithEvents ucrReceiverStation As ucrReceiverSingle Friend WithEvents lblStation As Label - Friend WithEvents ucrReceiverYear As ucrReceiverSingle - Friend WithEvents lblYear As Label - Friend WithEvents lblEstimate As Label - Friend WithEvents UcrReceiverSingle2 As ucrReceiverSingle + Friend WithEvents ucrReceiverTime As ucrReceiverSingle + Friend WithEvents lblTime As Label + Friend WithEvents lblEstimates As Label + Friend WithEvents ucrReceiverEstimates As ucrReceiverSingle End Class diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index c11a3ab8840..c2f802ff12f 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -1,3 +1,170 @@ -Public Class dlgTimeSeriesPlot +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . +Imports instat.Translations + +Public Class dlgTimeSeriesPlot + + Public bFirstLoad As Boolean = True + Private bReset As Boolean = True + + ' Constants + Private strReference As String = "reference" + Private strEstimates As String = "estimates" + Private strData As String = "data" + Private strValue As String = "value" + + ' Adjust NA values + Private clsAdjustNAOperator As ROperator + Private clsAdjustNAMutate As RFunction + Private clsIfElseReference As RFunction + Private clsIsNaReference As RFunction + Private clsIfElseEstimates As RFunction + Private clsIsNaEstimates As RFunction + + ' Stack data + Private clsStackOperator As ROperator + Private clsPivotLonger As RFunction + + ' Calculate means + Private clsMeansOperator As ROperator + Private clsMeansGroupBy As RFunction + Private clsMeansSummarise As RFunction + Private clsMeanFunction As RFunction + + Private Sub dlgTimeSeriesPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + If bFirstLoad Then + InitialiseDialog() + bFirstLoad = False + End If + If bReset Then + SetDefaults() + End If + SetRCodeForControls(bReset) + bReset = False + End Sub + + Private Sub InitialiseDialog() + 'ucrBase.iHelpTopicID = + + ucrSelectorTimeSeriesPlots.SetParameter(New RParameter("0", 0)) + ucrSelectorTimeSeriesPlots.SetParameterIsrfunction() + + ucrReceiverReference.SetParameter(New RParameter("x", 0)) + ucrReceiverReference.Selector = ucrSelectorTimeSeriesPlots + ucrReceiverReference.SetParameterIsString() + ucrReceiverReference.bWithQuotes = False + + ucrReceiverEstimates.SetParameter(New RParameter("x", 0)) + ucrReceiverEstimates.Selector = ucrSelectorTimeSeriesPlots + ucrReceiverEstimates.SetParameterIsString() + ucrReceiverEstimates.bWithQuotes = False + + ucrReceiverTime.SetParameter(New RParameter("", 1)) + ucrReceiverTime.Selector = ucrSelectorTimeSeriesPlots + + ucrReceiverStation.SetParameter(New RParameter("0", 0)) + ucrReceiverStation.Selector = ucrSelectorTimeSeriesPlots + ucrReceiverStation.SetParameterIsString() + ucrReceiverStation.bWithQuotes = False + + End Sub + + Private Sub SetDefaults() + ucrSelectorTimeSeriesPlots.Reset() + + ' Adjust NA values + + SetDataFrameAssignTo() + clsAdjustNAOperator.SetOperation("%>%") + clsAdjustNAOperator.AddParameter("1", clsRFunctionParameter:=clsAdjustNAMutate, iPosition:=1) + + clsAdjustNAMutate.SetPackageName("dplyr") + clsAdjustNAMutate.SetRCommand("mutate") + clsAdjustNAMutate.AddParameter(strReference, clsRFunctionParameter:=clsIfElseReference, iPosition:=0) + clsAdjustNAMutate.AddParameter(strEstimates, clsRFunctionParameter:=clsIfElseEstimates, iPosition:=1) + + clsIfElseReference.SetRCommand("ifelse") + clsIfElseReference.AddParameter("test", clsRFunctionParameter:=clsIsNaReference, iPosition:=0) + clsIfElseReference.AddParameter("yes", "NA", iPosition:=1) + + clsIfElseEstimates.SetRCommand("ifelse") + clsIfElseEstimates.AddParameter("test", clsRFunctionParameter:=clsIsNaEstimates, iPosition:=0) + clsIfElseEstimates.AddParameter("yes", "NA", iPosition:=1) + + clsIsNaReference.SetRCommand("is.na") + clsIsNaEstimates.SetRCommand("is.na") + + ' Stack data + + clsStackOperator.SetOperation("%>%") + clsStackOperator.AddParameter("0", clsROperatorParameter:=clsAdjustNAOperator, iPosition:=0) + clsStackOperator.AddParameter("1", clsRFunctionParameter:=clsPivotLonger, iPosition:=1) + + clsPivotLonger.SetPackageName("tidyr") + clsPivotLonger.SetRCommand("pivot_longer") + clsPivotLonger.AddParameter("cols", "c(" & strReference & ", " & strEstimates & ")", iPosition:=1) + clsPivotLonger.AddParameter("names_to", Chr(34) & strData & Chr(34), iPosition:=2) + clsPivotLonger.AddParameter("values_to", Chr(34) & strValue & Chr(34), iPosition:=8) + + ' Calculate means + + clsMeansOperator.SetOperation("%>%") + clsMeansOperator.AddParameter("0", clsRFunctionParameter:=clsPivotLonger, iPosition:=0) + clsMeansOperator.AddParameter("1", clsRFunctionParameter:=clsMeansGroupBy, iPosition:=1) + clsMeansOperator.AddParameter("1", clsRFunctionParameter:=clsMeansSummarise, iPosition:=2) + + clsMeansGroupBy.SetPackageName("dplyr") + clsMeansGroupBy.SetRCommand("group_by") + clsMeansGroupBy.AddParameter("1", strData, iPosition:=1) + + clsMeansSummarise.SetPackageName("dplyr") + clsMeansSummarise.SetRCommand("summarise") + clsMeansSummarise.AddParameter("mean", clsRFunctionParameter:=clsMeanFunction, iPosition:=0) + + clsMeanFunction.SetRCommand("mean") + clsMeanFunction.AddParameter("x", strValue, iPosition:=0) + clsMeanFunction.AddParameter("na.rm", "TRUE", iPosition:=1) + + 'ucrBase.clsRsyntax.SetBaseRFunction() + End Sub + + Private Sub SetRCodeForControls(bReset As Boolean) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsIfElseReference, New RParameter("no", 2), iAdditionalPairNo:=1) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsIfElseEstimates, New RParameter("no", 2), iAdditionalPairNo:=1) + + ucrSelectorTimeSeriesPlots.SetRCode(clsAdjustNAOperator, bReset) + ucrReceiverReference.SetRCode(clsIsNaReference, bReset) + ucrReceiverEstimates.SetRCode(clsIsNaEstimates, bReset) + ucrReceiverStation.SetRCode(clsMeansGroupBy, bReset) + + End Sub + + Private Sub SetDataFrameAssignTo() + If ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso clsAdjustNAOperator.clsParameters.Count > 1 Then + clsAdjustNAOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + clsStackOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_stack") + Else + clsAdjustNAOperator.RemoveAssignTo() + clsStackOperator.RemoveAssignTo() + End If + End Sub + + Private Sub ucrSelectorTimeSeriesPlots_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTimeSeriesPlots.ControlValueChanged + SetDataFrameAssignTo() + End Sub End Class \ No newline at end of file From 63310a803e4ff222e896f9697e5b34be49fb25e2 Mon Sep 17 00:00:00 2001 From: Shadrack Kibet Date: Wed, 16 Sep 2020 19:58:43 +0300 Subject: [PATCH 141/277] Update instat/dlgImportGriddedData.vb Co-authored-by: Danny Parsons --- instat/dlgImportGriddedData.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 2b265d473ba..490f29f2677 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -119,7 +119,7 @@ Public Class dlgImportGriddedData clsDownloadFromIRIFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$download_from_IRI") clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NASA_TRMM_3B42" & Chr(34), iPosition:=0) clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "3_hourly_estimated_prcp" & Chr(34), iPosition:=1) - clsDownloadFromIRIFunction.AddParameter("path", (Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) & "\Downloads").Replace("\", "/"), iPosition:=2) + clsDownloadFromIRIFunction.AddParameter("path", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).Replace("\", "/"), iPosition:=2) 'opted to set this as default location since it has data for all sources clsDownloadFromIRIFunction.AddParameter("min_lon", 10, iPosition:=3) clsDownloadFromIRIFunction.AddParameter("max_lon", 10.5, iPosition:=4) @@ -232,4 +232,4 @@ Public Class dlgImportGriddedData Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged, ucrPnlDateRange.ControlContentsChanged TestOkEnabled() End Sub -End Class \ No newline at end of file +End Class From da269140b2384eb09854273b42ad0c2ef18cacbc Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 17 Sep 2020 15:04:05 +0100 Subject: [PATCH 142/277] code for basic plot on main dialog --- instat/dlgTimeSeriesPlot.Designer.vb | 9 +- instat/dlgTimeSeriesPlot.vb | 189 +++++++++++++++++++++++++-- 2 files changed, 184 insertions(+), 14 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb index ecdbf625973..85d23c3b536 100644 --- a/instat/dlgTimeSeriesPlot.Designer.vb +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -36,7 +36,7 @@ Partial Class dlgTimeSeriesPlot Me.ucrChkIncludeMeanLines = New instat.ucrCheck() Me.ucrChkIncludePoints = New instat.ucrCheck() Me.cmdSummaries = New System.Windows.Forms.Button() - Me.ucrSavePlot = New instat.ucrSaveGraph() + Me.ucrSavePlot = New instat.ucrSave() Me.SuspendLayout() ' 'ucrBase @@ -177,9 +177,10 @@ Partial Class dlgTimeSeriesPlot 'ucrSavePlot ' Me.ucrSavePlot.Location = New System.Drawing.Point(10, 385) + Me.ucrSavePlot.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSavePlot.Name = "ucrSavePlot" - Me.ucrSavePlot.Size = New System.Drawing.Size(265, 20) - Me.ucrSavePlot.TabIndex = 13 + Me.ucrSavePlot.Size = New System.Drawing.Size(403, 34) + Me.ucrSavePlot.TabIndex = 15 ' 'dlgTimeSeriesPlot ' @@ -216,7 +217,6 @@ Partial Class dlgTimeSeriesPlot Friend WithEvents ucrSelectorTimeSeriesPlots As ucrSelectorByDataFrameAddRemove Friend WithEvents lblReferenceValues As Label Friend WithEvents ucrReceiverReference As ucrReceiverSingle - Friend WithEvents ucrSavePlot As ucrSaveGraph Friend WithEvents cmdSummaries As Button Friend WithEvents ucrChkIncludePoints As ucrCheck Friend WithEvents ucrChkIncludeMeanLines As ucrCheck @@ -227,4 +227,5 @@ Partial Class dlgTimeSeriesPlot Friend WithEvents lblTime As Label Friend WithEvents lblEstimates As Label Friend WithEvents ucrReceiverEstimates As ucrReceiverSingle + Friend WithEvents ucrSavePlot As ucrSave End Class diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index c2f802ff12f..48d9298405a 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -22,13 +22,14 @@ Public Class dlgTimeSeriesPlot Private bReset As Boolean = True ' Constants - Private strReference As String = "reference" - Private strEstimates As String = "estimates" + Private strReference As String = "" + Private strEstimates As String = "" Private strData As String = "data" Private strValue As String = "value" ' Adjust NA values Private clsAdjustNAOperator As ROperator + Private clsAdjustNAMutateParameter As RParameter Private clsAdjustNAMutate As RFunction Private clsIfElseReference As RFunction Private clsIsNaReference As RFunction @@ -38,6 +39,7 @@ Public Class dlgTimeSeriesPlot ' Stack data Private clsStackOperator As ROperator Private clsPivotLonger As RFunction + Private clsPivotCFunction As RFunction ' Calculate means Private clsMeansOperator As ROperator @@ -45,6 +47,35 @@ Public Class dlgTimeSeriesPlot Private clsMeansSummarise As RFunction Private clsMeanFunction As RFunction + ' Calculate Text Summaries + + ' ggplot functions + Private clsGgplotOperator As ROperator + Private clsGgplotFunction As RFunction + Private clsGgplotAes As RFunction + Private clsGeomLine As RFunction + Private clsGeomPoint As RFunction + Private clsGeomHLine As RFunction + Private clsGeomHLineAes As RFunction + Private clsGeomText As RFunction + Private clsGeomTextAes As RFunction + + Private clsLabsFunction As New RFunction + Private clsXlabsFunction As New RFunction + Private clsYlabFunction As New RFunction + Private clsXScaleContinuousFunction As New RFunction + Private clsYScaleContinuousFunction As New RFunction + Private clsFacetFunction As New RFunction + Private clsThemeFunction As New RFunction + Private dctThemeFunctions As Dictionary(Of String, RFunction) + + 'Parameter names for geoms + Private strGeomLineParameterName As String = "geom_line" + Private strGeomPointParameterName As String = "geom_point" + Private strGeomHLineParameterName As String = "geom_hline" + Private strGeomTextParameterName As String = "geom_text" + Private strGeomParameterNames() As String = {strGeomLineParameterName, strGeomPointParameterName, strGeomHLineParameterName, strGeomTextParameterName} + Private Sub dlgTimeSeriesPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) If bFirstLoad Then @@ -56,6 +87,7 @@ Public Class dlgTimeSeriesPlot End If SetRCodeForControls(bReset) bReset = False + TestOkEnabled() End Sub Private Sub InitialiseDialog() @@ -74,7 +106,7 @@ Public Class dlgTimeSeriesPlot ucrReceiverEstimates.SetParameterIsString() ucrReceiverEstimates.bWithQuotes = False - ucrReceiverTime.SetParameter(New RParameter("", 1)) + ucrReceiverTime.SetParameter(New RParameter("x", 0)) ucrReceiverTime.Selector = ucrSelectorTimeSeriesPlots ucrReceiverStation.SetParameter(New RParameter("0", 0)) @@ -82,10 +114,45 @@ Public Class dlgTimeSeriesPlot ucrReceiverStation.SetParameterIsString() ucrReceiverStation.bWithQuotes = False + clsAdjustNAMutate = New RFunction + clsAdjustNAMutateParameter = New RParameter("1", clsAdjustNAMutate, iNewPosition:=1) + ucrChkNAValues.SetText("Remove rows with any missing values") + ucrChkNAValues.SetParameter(clsAdjustNAMutateParameter, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + + ucrSavePlot.SetPrefix("line") + ucrSavePlot.SetIsComboBox() + ucrSavePlot.SetCheckBoxText("Save Graph") + ucrSavePlot.SetSaveTypeAsGraph() + ucrSavePlot.SetDataFrameSelector(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames) + ucrSavePlot.SetAssignToIfUncheckedValue("last_graph") End Sub Private Sub SetDefaults() + clsAdjustNAOperator = New ROperator + clsIfElseReference = New RFunction + clsIfElseEstimates = New RFunction + clsIsNaReference = New RFunction + clsIsNaEstimates = New RFunction + + clsStackOperator = New ROperator + clsPivotLonger = New RFunction + clsPivotCFunction = New RFunction + + clsMeansOperator = New ROperator + clsMeansGroupBy = New RFunction + clsMeansSummarise = New RFunction + clsMeanFunction = New RFunction + + clsGgplotOperator = New ROperator + clsGgplotFunction = New RFunction + clsGgplotAes = New RFunction + clsGeomLine = New RFunction + clsGeomPoint = New RFunction + clsGeomHLine = New RFunction + clsGeomText = New RFunction + ucrSelectorTimeSeriesPlots.Reset() + ucrSelectorTimeSeriesPlots.SetGgplotFunction(clsGgplotOperator) ' Adjust NA values @@ -93,17 +160,16 @@ Public Class dlgTimeSeriesPlot clsAdjustNAOperator.SetOperation("%>%") clsAdjustNAOperator.AddParameter("1", clsRFunctionParameter:=clsAdjustNAMutate, iPosition:=1) + clsAdjustNAMutate.Clear() clsAdjustNAMutate.SetPackageName("dplyr") clsAdjustNAMutate.SetRCommand("mutate") - clsAdjustNAMutate.AddParameter(strReference, clsRFunctionParameter:=clsIfElseReference, iPosition:=0) - clsAdjustNAMutate.AddParameter(strEstimates, clsRFunctionParameter:=clsIfElseEstimates, iPosition:=1) clsIfElseReference.SetRCommand("ifelse") - clsIfElseReference.AddParameter("test", clsRFunctionParameter:=clsIsNaReference, iPosition:=0) + clsIfElseReference.AddParameter("test", clsRFunctionParameter:=clsIsNaEstimates, iPosition:=0) clsIfElseReference.AddParameter("yes", "NA", iPosition:=1) clsIfElseEstimates.SetRCommand("ifelse") - clsIfElseEstimates.AddParameter("test", clsRFunctionParameter:=clsIsNaEstimates, iPosition:=0) + clsIfElseEstimates.AddParameter("test", clsRFunctionParameter:=clsIsNaReference, iPosition:=0) clsIfElseEstimates.AddParameter("yes", "NA", iPosition:=1) clsIsNaReference.SetRCommand("is.na") @@ -117,10 +183,12 @@ Public Class dlgTimeSeriesPlot clsPivotLonger.SetPackageName("tidyr") clsPivotLonger.SetRCommand("pivot_longer") - clsPivotLonger.AddParameter("cols", "c(" & strReference & ", " & strEstimates & ")", iPosition:=1) + clsPivotLonger.AddParameter("cols", clsRFunctionParameter:=clsPivotCFunction, iPosition:=1) clsPivotLonger.AddParameter("names_to", Chr(34) & strData & Chr(34), iPosition:=2) clsPivotLonger.AddParameter("values_to", Chr(34) & strValue & Chr(34), iPosition:=8) + clsPivotCFunction.SetRCommand("c") + ' Calculate means clsMeansOperator.SetOperation("%>%") @@ -140,31 +208,132 @@ Public Class dlgTimeSeriesPlot clsMeanFunction.AddParameter("x", strValue, iPosition:=0) clsMeanFunction.AddParameter("na.rm", "TRUE", iPosition:=1) - 'ucrBase.clsRsyntax.SetBaseRFunction() + ' Ggplot functions + + clsGgplotOperator.SetOperation("+") + clsGgplotOperator.AddParameter("ggplot", clsRFunctionParameter:=clsGgplotFunction, iPosition:=0) + clsGgplotOperator.AddParameter(strGeomLineParameterName, clsRFunctionParameter:=clsGeomLine, iPosition:=1) + clsGgplotOperator.AddParameter(strGeomPointParameterName, clsRFunctionParameter:=clsGeomPoint, iPosition:=2) + clsGgplotOperator.AddParameter(strGeomHLineParameterName, clsRFunctionParameter:=clsGeomHLine, iPosition:=3) + + clsGgplotFunction.SetPackageName("ggplot2") + clsGgplotFunction.SetRCommand("ggplot") + clsGgplotFunction.AddParameter("data", clsROperatorParameter:=clsStackOperator, iPosition:=0) + clsGgplotFunction.AddParameter("mapping", clsRFunctionParameter:=clsGgplotAes, iPosition:=1) + + clsGgplotAes.SetPackageName("ggplot2") + clsGgplotAes.SetRCommand("aes") + clsGgplotAes.AddParameter("y", strValue, iPosition:=1) + clsGgplotAes.AddParameter("colour", strData, iPosition:=2) + + clsGeomLine.SetPackageName("ggplot2") + clsGeomLine.SetRCommand("geom_line") + + clsGeomPoint.SetPackageName("ggplot2") + clsGeomPoint.SetRCommand("geom_point") + + clsGeomHLine.SetPackageName("ggplot2") + clsGeomHLine.SetRCommand("geom_hline") + clsGeomHLine.AddParameter("data", clsROperatorParameter:=clsMeansOperator, iPosition:=0) + clsGeomHLine.AddParameter("mapping", clsRFunctionParameter:=clsGeomHLineAes, iPosition:=1) + + clsGeomHLineAes.SetPackageName("ggplot2") + clsGeomHLineAes.SetRCommand("aes") + clsGeomHLineAes.AddParameter("yintercept", "mean", iPosition:=0) + clsGeomHLineAes.AddParameter("colour", strData, iPosition:=1) + + clsGeomText.SetPackageName("ggplot2") + clsGeomText.SetRCommand("geom_text") + 'clsGeomText.AddParameter("data", clsROperatorParameter:=, iPosition:=0) + clsGeomText.AddParameter("mapping", clsRFunctionParameter:=clsGeomTextAes, iPosition:=1) + + clsGgplotOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) + clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() + clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() + clsXScaleContinuousFunction = GgplotDefaults.clsXScalecontinuousFunction.Clone() + clsYScaleContinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone() + clsFacetFunction = GgplotDefaults.clsFacetFunction.Clone() + clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone + clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction.Clone() + dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions) + clsGgplotOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") + ucrBase.clsRsyntax.SetBaseROperator(clsGgplotOperator) + + TestOkEnabled() End Sub Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverReference.AddAdditionalCodeParameterPair(clsIfElseReference, New RParameter("no", 2), iAdditionalPairNo:=1) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("0", 0), iAdditionalPairNo:=2) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsIfElseEstimates, New RParameter("no", 2), iAdditionalPairNo:=1) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("1", 1), iAdditionalPairNo:=2) ucrSelectorTimeSeriesPlots.SetRCode(clsAdjustNAOperator, bReset) ucrReceiverReference.SetRCode(clsIsNaReference, bReset) ucrReceiverEstimates.SetRCode(clsIsNaEstimates, bReset) ucrReceiverStation.SetRCode(clsMeansGroupBy, bReset) + ucrReceiverTime.SetRCode(clsGgplotAes, bReset) + End Sub + Private Sub TestOkEnabled() + If Not ucrReceiverEstimates.IsEmpty And Not ucrReceiverReference.IsEmpty AndAlso ucrSavePlot.IsComplete Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If End Sub Private Sub SetDataFrameAssignTo() If ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso clsAdjustNAOperator.clsParameters.Count > 1 Then - clsAdjustNAOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + If ucrChkNAValues.Checked Then + clsAdjustNAOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + Else + clsAdjustNAOperator.RemoveAssignTo() + End If clsStackOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_stack") + clsMeansOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_mean") Else clsAdjustNAOperator.RemoveAssignTo() clsStackOperator.RemoveAssignTo() + clsMeansOperator.RemoveAssignTo() End If End Sub Private Sub ucrSelectorTimeSeriesPlots_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTimeSeriesPlots.ControlValueChanged SetDataFrameAssignTo() End Sub + + Private Sub ucrReceiverEstimates_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlValueChanged + If ucrReceiverEstimates.IsEmpty Then + If strEstimates <> "" Then + clsAdjustNAMutate.RemoveParameterByName(strEstimates) + strEstimates = "" + End If + Else + strEstimates = ucrReceiverEstimates.GetVariableNames(False) + clsAdjustNAMutate.AddParameter(strEstimates, clsRFunctionParameter:=clsIfElseEstimates, iPosition:=1) + End If + End Sub + + Private Sub ucrReceiverReference_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReference.ControlValueChanged + If ucrReceiverReference.IsEmpty Then + If strReference <> "" Then + clsAdjustNAMutate.RemoveParameterByName(strReference) + strReference = "" + End If + Else + strReference = ucrReceiverReference.GetVariableNames(False) + clsAdjustNAMutate.AddParameter(strReference, clsRFunctionParameter:=clsIfElseReference, iPosition:=0) + End If + End Sub + + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRCodeForControls(True) + TestOkEnabled() + End Sub + + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlContentsChanged, ucrReceiverReference.ControlContentsChanged, ucrSavePlot.ControlContentsChanged + + End Sub End Class \ No newline at end of file From f93e5872d7202dcf9425fe0b3f7fe5f45af59278 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Thu, 17 Sep 2020 14:58:03 +0000 Subject: [PATCH 143/277] adding fourier series function --- instat/dlgSeasonalPlot.Designer.vb | 439 +++++++++++++++- instat/dlgSeasonalPlot.vb | 483 +++++++++++++++++- .../InstatObject/R/stand_alone_functions.R | 8 + 3 files changed, 918 insertions(+), 12 deletions(-) diff --git a/instat/dlgSeasonalPlot.Designer.vb b/instat/dlgSeasonalPlot.Designer.vb index a116782b3ac..c04bd29e878 100644 --- a/instat/dlgSeasonalPlot.Designer.vb +++ b/instat/dlgSeasonalPlot.Designer.vb @@ -22,31 +22,450 @@ Partial Class dlgSeasonalPlot 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.UcrButtons1 = New instat.ucrButtons() + Me.ucrBase = New instat.ucrButtons() + Me.ucrSelectorSeasonalityComparisons = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrReceiverReference = New instat.ucrReceiverSingle() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverSeasonality = New instat.ucrReceiverSingle() + Me.ucrReceiverEstimate = New instat.ucrReceiverSingle() + Me.ucrChkRemoveMissing = New instat.ucrCheck() + Me.grpValues = New System.Windows.Forms.GroupBox() + Me.ucrInputN = New instat.ucrInputTextBox() + Me.lblN = New System.Windows.Forms.Label() + Me.ucrChkPoints = New instat.ucrCheck() + Me.ucrChkMovingAverage = New instat.ucrCheck() + Me.grpSmoothing = New System.Windows.Forms.GroupBox() + Me.lblPeriod = New System.Windows.Forms.Label() + Me.lblHarmonics = New System.Windows.Forms.Label() + Me.ucrNudPeriod = New instat.ucrNud() + Me.ucrNudHarmonics = New instat.ucrNud() + Me.ucrInputSmoothing = New instat.ucrInputComboBox() + Me.ucrSaveGraph = New instat.ucrSave() + Me.ucrInputEstimateSummary = New instat.ucrInputComboBox() + Me.ucrInputReferenceSummary = New instat.ucrInputComboBox() + Me.ucrInputReferenceThreshold = New instat.ucrInputTextBox() + Me.ucrInputEstimateThreshold = New instat.ucrInputTextBox() + Me.lblRefSummary = New System.Windows.Forms.Label() + Me.lblEstSummary = New System.Windows.Forms.Label() + Me.lblSeasonality = New System.Windows.Forms.Label() + Me.lblStation = New System.Windows.Forms.Label() + Me.lblReference = New System.Windows.Forms.Label() + Me.lblEstimate = New System.Windows.Forms.Label() + Me.ucrNudSpan = New instat.ucrNud() + Me.ucrNudDf = New instat.ucrNud() + Me.lblSpan = New System.Windows.Forms.Label() + Me.lblDf = New System.Windows.Forms.Label() + Me.grpValues.SuspendLayout() + Me.grpSmoothing.SuspendLayout() Me.SuspendLayout() ' - 'UcrButtons1 + 'ucrBase ' - Me.UcrButtons1.Location = New System.Drawing.Point(8, 258) - Me.UcrButtons1.Name = "UcrButtons1" - Me.UcrButtons1.Size = New System.Drawing.Size(410, 52) - Me.UcrButtons1.TabIndex = 0 + Me.ucrBase.Location = New System.Drawing.Point(12, 429) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 0 + ' + 'ucrSelectorSeasonalityComparisons + ' + Me.ucrSelectorSeasonalityComparisons.bDropUnusedFilterLevels = False + Me.ucrSelectorSeasonalityComparisons.bShowHiddenColumns = False + Me.ucrSelectorSeasonalityComparisons.bUseCurrentFilter = True + Me.ucrSelectorSeasonalityComparisons.Location = New System.Drawing.Point(12, 28) + Me.ucrSelectorSeasonalityComparisons.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorSeasonalityComparisons.Name = "ucrSelectorSeasonalityComparisons" + Me.ucrSelectorSeasonalityComparisons.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorSeasonalityComparisons.TabIndex = 1 + ' + 'ucrReceiverReference + ' + Me.ucrReceiverReference.frmParent = Me + Me.ucrReceiverReference.Location = New System.Drawing.Point(266, 36) + Me.ucrReceiverReference.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverReference.Name = "ucrReceiverReference" + Me.ucrReceiverReference.Selector = Nothing + Me.ucrReceiverReference.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverReference.strNcFilePath = "" + Me.ucrReceiverReference.TabIndex = 2 + Me.ucrReceiverReference.ucrSelector = Nothing + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(266, 268) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 3 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrReceiverSeasonality + ' + Me.ucrReceiverSeasonality.frmParent = Me + Me.ucrReceiverSeasonality.Location = New System.Drawing.Point(266, 222) + Me.ucrReceiverSeasonality.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSeasonality.Name = "ucrReceiverSeasonality" + Me.ucrReceiverSeasonality.Selector = Nothing + Me.ucrReceiverSeasonality.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverSeasonality.strNcFilePath = "" + Me.ucrReceiverSeasonality.TabIndex = 4 + Me.ucrReceiverSeasonality.ucrSelector = Nothing + ' + 'ucrReceiverEstimate + ' + Me.ucrReceiverEstimate.frmParent = Me + Me.ucrReceiverEstimate.Location = New System.Drawing.Point(266, 129) + Me.ucrReceiverEstimate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEstimate.Name = "ucrReceiverEstimate" + Me.ucrReceiverEstimate.Selector = Nothing + Me.ucrReceiverEstimate.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverEstimate.strNcFilePath = "" + Me.ucrReceiverEstimate.TabIndex = 5 + Me.ucrReceiverEstimate.ucrSelector = Nothing + ' + 'ucrChkRemoveMissing + ' + Me.ucrChkRemoveMissing.Checked = False + Me.ucrChkRemoveMissing.Location = New System.Drawing.Point(22, 219) + Me.ucrChkRemoveMissing.Name = "ucrChkRemoveMissing" + Me.ucrChkRemoveMissing.Size = New System.Drawing.Size(197, 20) + Me.ucrChkRemoveMissing.TabIndex = 6 + ' + 'grpValues + ' + Me.grpValues.Controls.Add(Me.ucrInputN) + Me.grpValues.Controls.Add(Me.lblN) + Me.grpValues.Controls.Add(Me.ucrChkPoints) + Me.grpValues.Controls.Add(Me.ucrChkMovingAverage) + Me.grpValues.Location = New System.Drawing.Point(12, 242) + Me.grpValues.Name = "grpValues" + Me.grpValues.Size = New System.Drawing.Size(232, 71) + Me.grpValues.TabIndex = 7 + Me.grpValues.TabStop = False + Me.grpValues.Text = "Values" + ' + 'ucrInputN + ' + Me.ucrInputN.AddQuotesIfUnrecognised = True + Me.ucrInputN.IsMultiline = False + Me.ucrInputN.IsReadOnly = False + Me.ucrInputN.Location = New System.Drawing.Point(167, 41) + Me.ucrInputN.Name = "ucrInputN" + Me.ucrInputN.Size = New System.Drawing.Size(47, 21) + Me.ucrInputN.TabIndex = 23 + ' + 'lblN + ' + Me.lblN.AutoSize = True + Me.lblN.Location = New System.Drawing.Point(148, 45) + Me.lblN.Name = "lblN" + Me.lblN.Size = New System.Drawing.Size(16, 13) + Me.lblN.TabIndex = 21 + Me.lblN.Text = "n:" + ' + 'ucrChkPoints + ' + Me.ucrChkPoints.Checked = False + Me.ucrChkPoints.Location = New System.Drawing.Point(8, 15) + Me.ucrChkPoints.Name = "ucrChkPoints" + Me.ucrChkPoints.Size = New System.Drawing.Size(155, 20) + Me.ucrChkPoints.TabIndex = 8 + ' + 'ucrChkMovingAverage + ' + Me.ucrChkMovingAverage.Checked = False + Me.ucrChkMovingAverage.Location = New System.Drawing.Point(8, 41) + Me.ucrChkMovingAverage.Name = "ucrChkMovingAverage" + Me.ucrChkMovingAverage.Size = New System.Drawing.Size(134, 20) + Me.ucrChkMovingAverage.TabIndex = 7 + ' + 'grpSmoothing + ' + Me.grpSmoothing.Controls.Add(Me.ucrNudSpan) + Me.grpSmoothing.Controls.Add(Me.lblSpan) + Me.grpSmoothing.Controls.Add(Me.lblDf) + Me.grpSmoothing.Controls.Add(Me.lblPeriod) + Me.grpSmoothing.Controls.Add(Me.ucrNudDf) + Me.grpSmoothing.Controls.Add(Me.lblHarmonics) + Me.grpSmoothing.Controls.Add(Me.ucrNudPeriod) + Me.grpSmoothing.Controls.Add(Me.ucrNudHarmonics) + Me.grpSmoothing.Controls.Add(Me.ucrInputSmoothing) + Me.grpSmoothing.Location = New System.Drawing.Point(12, 317) + Me.grpSmoothing.Name = "grpSmoothing" + Me.grpSmoothing.Size = New System.Drawing.Size(243, 75) + Me.grpSmoothing.TabIndex = 8 + Me.grpSmoothing.TabStop = False + Me.grpSmoothing.Text = "Smoothing" + ' + 'lblPeriod + ' + Me.lblPeriod.AutoSize = True + Me.lblPeriod.Location = New System.Drawing.Point(128, 49) + Me.lblPeriod.Name = "lblPeriod" + Me.lblPeriod.Size = New System.Drawing.Size(45, 13) + Me.lblPeriod.TabIndex = 18 + Me.lblPeriod.Text = "Periods:" + ' + 'lblHarmonics + ' + Me.lblHarmonics.AutoSize = True + Me.lblHarmonics.Location = New System.Drawing.Point(12, 49) + Me.lblHarmonics.Name = "lblHarmonics" + Me.lblHarmonics.Size = New System.Drawing.Size(60, 13) + Me.lblHarmonics.TabIndex = 19 + Me.lblHarmonics.Text = "Harmonics:" + ' + 'ucrNudPeriod + ' + Me.ucrNudPeriod.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPeriod.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPeriod.Location = New System.Drawing.Point(176, 45) + Me.ucrNudPeriod.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPeriod.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPeriod.Name = "ucrNudPeriod" + Me.ucrNudPeriod.Size = New System.Drawing.Size(50, 20) + Me.ucrNudPeriod.TabIndex = 2 + Me.ucrNudPeriod.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudHarmonics + ' + Me.ucrNudHarmonics.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHarmonics.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudHarmonics.Location = New System.Drawing.Point(74, 46) + Me.ucrNudHarmonics.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudHarmonics.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHarmonics.Name = "ucrNudHarmonics" + Me.ucrNudHarmonics.Size = New System.Drawing.Size(50, 20) + Me.ucrNudHarmonics.TabIndex = 1 + Me.ucrNudHarmonics.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputSmoothing + ' + Me.ucrInputSmoothing.AddQuotesIfUnrecognised = True + Me.ucrInputSmoothing.GetSetSelectedIndex = -1 + Me.ucrInputSmoothing.IsReadOnly = False + Me.ucrInputSmoothing.Location = New System.Drawing.Point(10, 20) + Me.ucrInputSmoothing.Name = "ucrInputSmoothing" + Me.ucrInputSmoothing.Size = New System.Drawing.Size(119, 21) + Me.ucrInputSmoothing.TabIndex = 0 + ' + 'ucrSaveGraph + ' + Me.ucrSaveGraph.Location = New System.Drawing.Point(12, 400) + Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveGraph.Name = "ucrSaveGraph" + Me.ucrSaveGraph.Size = New System.Drawing.Size(255, 29) + Me.ucrSaveGraph.TabIndex = 9 + ' + 'ucrInputEstimateSummary + ' + Me.ucrInputEstimateSummary.AddQuotesIfUnrecognised = True + Me.ucrInputEstimateSummary.GetSetSelectedIndex = -1 + Me.ucrInputEstimateSummary.IsReadOnly = False + Me.ucrInputEstimateSummary.Location = New System.Drawing.Point(266, 175) + Me.ucrInputEstimateSummary.Name = "ucrInputEstimateSummary" + Me.ucrInputEstimateSummary.Size = New System.Drawing.Size(93, 21) + Me.ucrInputEstimateSummary.TabIndex = 10 + ' + 'ucrInputReferenceSummary + ' + Me.ucrInputReferenceSummary.AddQuotesIfUnrecognised = True + Me.ucrInputReferenceSummary.GetSetSelectedIndex = -1 + Me.ucrInputReferenceSummary.IsReadOnly = False + Me.ucrInputReferenceSummary.Location = New System.Drawing.Point(266, 82) + Me.ucrInputReferenceSummary.Name = "ucrInputReferenceSummary" + Me.ucrInputReferenceSummary.Size = New System.Drawing.Size(89, 21) + Me.ucrInputReferenceSummary.TabIndex = 11 + ' + 'ucrInputReferenceThreshold + ' + Me.ucrInputReferenceThreshold.AddQuotesIfUnrecognised = True + Me.ucrInputReferenceThreshold.IsMultiline = False + Me.ucrInputReferenceThreshold.IsReadOnly = False + Me.ucrInputReferenceThreshold.Location = New System.Drawing.Point(356, 82) + Me.ucrInputReferenceThreshold.Name = "ucrInputReferenceThreshold" + Me.ucrInputReferenceThreshold.Size = New System.Drawing.Size(53, 21) + Me.ucrInputReferenceThreshold.TabIndex = 12 + ' + 'ucrInputEstimateThreshold + ' + Me.ucrInputEstimateThreshold.AddQuotesIfUnrecognised = True + Me.ucrInputEstimateThreshold.IsMultiline = False + Me.ucrInputEstimateThreshold.IsReadOnly = False + Me.ucrInputEstimateThreshold.Location = New System.Drawing.Point(361, 175) + Me.ucrInputEstimateThreshold.Name = "ucrInputEstimateThreshold" + Me.ucrInputEstimateThreshold.Size = New System.Drawing.Size(48, 21) + Me.ucrInputEstimateThreshold.TabIndex = 13 + ' + 'lblRefSummary + ' + Me.lblRefSummary.AutoSize = True + Me.lblRefSummary.Location = New System.Drawing.Point(266, 66) + Me.lblRefSummary.Name = "lblRefSummary" + Me.lblRefSummary.Size = New System.Drawing.Size(53, 13) + Me.lblRefSummary.TabIndex = 14 + Me.lblRefSummary.Text = "Summary:" + ' + 'lblEstSummary + ' + Me.lblEstSummary.AutoSize = True + Me.lblEstSummary.Location = New System.Drawing.Point(266, 159) + Me.lblEstSummary.Name = "lblEstSummary" + Me.lblEstSummary.Size = New System.Drawing.Size(53, 13) + Me.lblEstSummary.TabIndex = 15 + Me.lblEstSummary.Text = "Summary:" + ' + 'lblSeasonality + ' + Me.lblSeasonality.AutoSize = True + Me.lblSeasonality.Location = New System.Drawing.Point(266, 206) + Me.lblSeasonality.Name = "lblSeasonality" + Me.lblSeasonality.Size = New System.Drawing.Size(64, 13) + Me.lblSeasonality.TabIndex = 16 + Me.lblSeasonality.Text = "Seasonality:" + ' + 'lblStation + ' + Me.lblStation.AutoSize = True + Me.lblStation.Location = New System.Drawing.Point(266, 252) + Me.lblStation.Name = "lblStation" + Me.lblStation.Size = New System.Drawing.Size(43, 13) + Me.lblStation.TabIndex = 17 + Me.lblStation.Text = "Station:" + ' + 'lblReference + ' + Me.lblReference.AutoSize = True + Me.lblReference.Location = New System.Drawing.Point(266, 20) + Me.lblReference.Name = "lblReference" + Me.lblReference.Size = New System.Drawing.Size(60, 13) + Me.lblReference.TabIndex = 20 + Me.lblReference.Text = "Reference:" + ' + 'lblEstimate + ' + Me.lblEstimate.AutoSize = True + Me.lblEstimate.Location = New System.Drawing.Point(266, 113) + Me.lblEstimate.Name = "lblEstimate" + Me.lblEstimate.Size = New System.Drawing.Size(50, 13) + Me.lblEstimate.TabIndex = 22 + Me.lblEstimate.Text = "Estimate:" + ' + 'ucrNudSpan + ' + Me.ucrNudSpan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSpan.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSpan.Location = New System.Drawing.Point(53, 45) + Me.ucrNudSpan.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSpan.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSpan.Name = "ucrNudSpan" + Me.ucrNudSpan.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSpan.TabIndex = 20 + Me.ucrNudSpan.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudDf + ' + Me.ucrNudDf.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDf.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudDf.Location = New System.Drawing.Point(117, 46) + Me.ucrNudDf.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDf.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDf.Name = "ucrNudDf" + Me.ucrNudDf.Size = New System.Drawing.Size(50, 20) + Me.ucrNudDf.TabIndex = 21 + Me.ucrNudDf.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblSpan + ' + Me.lblSpan.AutoSize = True + Me.lblSpan.Location = New System.Drawing.Point(15, 49) + Me.lblSpan.Name = "lblSpan" + Me.lblSpan.Size = New System.Drawing.Size(35, 13) + Me.lblSpan.TabIndex = 23 + Me.lblSpan.Text = "Span:" + ' + 'lblDf + ' + Me.lblDf.AutoSize = True + Me.lblDf.Location = New System.Drawing.Point(12, 49) + Me.lblDf.Name = "lblDf" + Me.lblDf.Size = New System.Drawing.Size(103, 13) + Me.lblDf.TabIndex = 24 + Me.lblDf.Text = "Degrees of freedom:" ' 'dlgSeasonalPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(426, 317) - Me.Controls.Add(Me.UcrButtons1) + Me.ClientSize = New System.Drawing.Size(426, 491) + Me.Controls.Add(Me.lblEstimate) + Me.Controls.Add(Me.lblReference) + Me.Controls.Add(Me.lblStation) + Me.Controls.Add(Me.lblSeasonality) + Me.Controls.Add(Me.lblEstSummary) + Me.Controls.Add(Me.lblRefSummary) + Me.Controls.Add(Me.ucrInputEstimateThreshold) + Me.Controls.Add(Me.ucrInputReferenceThreshold) + Me.Controls.Add(Me.ucrInputReferenceSummary) + Me.Controls.Add(Me.ucrInputEstimateSummary) + Me.Controls.Add(Me.ucrSaveGraph) + Me.Controls.Add(Me.grpSmoothing) + Me.Controls.Add(Me.grpValues) + Me.Controls.Add(Me.ucrChkRemoveMissing) + Me.Controls.Add(Me.ucrReceiverEstimate) + Me.Controls.Add(Me.ucrReceiverSeasonality) + Me.Controls.Add(Me.ucrReceiverStation) + Me.Controls.Add(Me.ucrReceiverReference) + Me.Controls.Add(Me.ucrSelectorSeasonalityComparisons) + Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgSeasonalPlot" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent - Me.Text = "Seasonal Plot" + Me.Text = "Seasonal Comparisons" + Me.grpValues.ResumeLayout(False) + Me.grpValues.PerformLayout() + Me.grpSmoothing.ResumeLayout(False) + Me.grpSmoothing.PerformLayout() Me.ResumeLayout(False) + Me.PerformLayout() End Sub - Friend WithEvents UcrButtons1 As ucrButtons + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrSelectorSeasonalityComparisons As ucrSelectorByDataFrameAddRemove + Friend WithEvents ucrReceiverReference As ucrReceiverSingle + Friend WithEvents ucrSaveGraph As ucrSave + Friend WithEvents grpSmoothing As GroupBox + Friend WithEvents grpValues As GroupBox + Friend WithEvents ucrChkPoints As ucrCheck + Friend WithEvents ucrChkMovingAverage As ucrCheck + Friend WithEvents ucrChkRemoveMissing As ucrCheck + Friend WithEvents ucrReceiverEstimate As ucrReceiverSingle + Friend WithEvents ucrReceiverSeasonality As ucrReceiverSingle + Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents ucrNudPeriod As ucrNud + Friend WithEvents ucrNudHarmonics As ucrNud + Friend WithEvents ucrInputSmoothing As ucrInputComboBox + Friend WithEvents ucrInputEstimateThreshold As ucrInputTextBox + Friend WithEvents ucrInputReferenceThreshold As ucrInputTextBox + Friend WithEvents ucrInputReferenceSummary As ucrInputComboBox + Friend WithEvents ucrInputEstimateSummary As ucrInputComboBox + Friend WithEvents lblEstimate As Label + Friend WithEvents lblReference As Label + Friend WithEvents lblStation As Label + Friend WithEvents lblSeasonality As Label + Friend WithEvents lblEstSummary As Label + Friend WithEvents lblRefSummary As Label + Friend WithEvents lblPeriod As Label + Friend WithEvents lblHarmonics As Label + Friend WithEvents ucrInputN As ucrInputTextBox + Friend WithEvents lblN As Label + Friend WithEvents ucrNudSpan As ucrNud + Friend WithEvents ucrNudDf As ucrNud + Friend WithEvents lblDf As Label + Friend WithEvents lblSpan As Label End Class diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index 184afc038cc..f775a6b79b9 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -1,3 +1,482 @@ -Public Class dlgSeasonalPlot +'R-Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . -End Class \ No newline at end of file +Imports instat.Translations + +Public Class dlgSeasonalPlot + Private bFirstLoad As Boolean = True + Private bReset As Boolean = True + 'summary functions + operators + Private clsPipeOperator, clsAndOperator, clsRefGreaterOperator, clsEstGreaterOperator, clsRefLessOperator, clsEstLessOperator, clsDivideOperator As New ROperator + Private clsFilterFunction, clsRefIsNotNaFunction, clsEstIsNotNaFunction, clsMutateFunction, clsPivotLongerFunction, clsGroupByFunction, clsSummariseFunction, clsMovingMutateFunction, clsMovingFunction, clsNSumFunction, clsPropSumFunction, clsNotIsNaThreshFunction, clsMeanFunction As New RFunction + 'ggplot functions + operators + Private clsPlusOperator, clsFacetWrapTildeOperator, clsPbsSplinesTildeOperator As New ROperator + Private clsGgplotFunction, clsGeomPointFunction, clsGeomLineFunction, clsGeomSmoothFunction, clsGgPlotAesFunction, clsGeomLineAesFunction, clsFacetWrapFunction, clsAsFormulaFunction, clsPasteFunction, clsFourierSeriesFunction, clsListFunction, clsBinomialFunction, clsPbsFunction, clsNsFunction As New RFunction + + Private Sub dlgSeasonalPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + If bFirstLoad Then + InitiliseDialog() + bFirstLoad = False + End If + + If bReset Then + SetDefaults() + SetRcodeForControls(bReset) + End If + bReset = False + TestOkEnabled() + End Sub + + Private Sub InitiliseDialog() + ucrBase.clsRsyntax.iCallType = 3 + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False + + ucrSelectorSeasonalityComparisons.SetParameter(New RParameter("data", 0)) + ucrSelectorSeasonalityComparisons.SetParameterIsrfunction() + + ucrReceiverReference.SetParameter(New RParameter("x", 0)) + ucrReceiverReference.Selector = ucrSelectorSeasonalityComparisons + ucrReceiverReference.SetParameterIsRFunction() + + ucrReceiverEstimate.SetParameter(New RParameter("x", 0)) + ucrReceiverEstimate.Selector = ucrSelectorSeasonalityComparisons + ucrReceiverEstimate.SetParameterIsRFunction() + + ucrReceiverSeasonality.SetParameter(New RParameter("seasonality", 2, bNewIncludeArgumentName:=False)) + ucrReceiverSeasonality.Selector = ucrSelectorSeasonalityComparisons + ucrReceiverSeasonality.SetParameterIsRFunction() + + ucrReceiverStation.SetParameter(New RParameter("station", 0, bNewIncludeArgumentName:=False)) + ucrReceiverStation.Selector = ucrSelectorSeasonalityComparisons + ucrReceiverStation.SetParameterIsRFunction() + ucrReceiverStation.SetClimaticType("station") + ucrReceiverStation.bAutoFill = True + + ucrInputReferenceSummary.SetItems({"Prop Above", "Prop Below", "Mean"}) + ucrInputReferenceSummary.SetDropDownStyleAsNonEditable() + + ucrInputEstimateSummary.SetItems({"Prop Above", "Prop Below", "Mean"}) + ucrInputEstimateSummary.SetDropDownStyleAsNonEditable() + + ucrInputReferenceThreshold.SetParameter(New RParameter("value", 1)) + ucrInputReferenceThreshold.SetValidationTypeAsNumeric() + ucrInputReferenceThreshold.AddQuotesIfUnrecognised = False + + ucrInputEstimateThreshold.SetParameter(New RParameter("value", 1)) + ucrInputEstimateThreshold.SetValidationTypeAsNumeric() + ucrInputEstimateThreshold.AddQuotesIfUnrecognised = False + + ucrInputN.SetParameter(New RParameter("n", 1)) + ucrInputN.SetValidationTypeAsNumeric() + ucrInputN.AddQuotesIfUnrecognised = False + + ucrChkRemoveMissing.SetText("Remove rows with any missing values") + ucrChkRemoveMissing.AddParameterPresentCondition(True, "filter") + ucrChkRemoveMissing.AddParameterPresentCondition(False, "filter", False) + + ucrInputReferenceSummary.AddToLinkedControls(ucrInputReferenceThreshold, {"Prop Above", "Prop Below"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputEstimateSummary.AddToLinkedControls(ucrInputEstimateThreshold, {"Prop Above", "Prop Below"}, bNewLinkedHideIfParameterMissing:=True) + ucrChkMovingAverage.AddToLinkedControls(ucrInputN, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputSmoothing.AddToLinkedControls({ucrNudHarmonics, ucrNudPeriod}, {"Fourier Series"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputSmoothing.AddToLinkedControls(ucrNudSpan, {"LOESS"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputSmoothing.AddToLinkedControls(ucrNudDf, {"Periodic Splines", "Natural Splines"}, bNewLinkedHideIfParameterMissing:=True) + ucrInputN.SetLinkedDisplayControl(lblN) + ucrNudHarmonics.SetLinkedDisplayControl(lblHarmonics) + ucrNudPeriod.SetLinkedDisplayControl(lblPeriod) + ucrNudSpan.SetLinkedDisplayControl(lblSpan) + ucrNudDf.SetLinkedDisplayControl(lblDf) + + ucrChkPoints.SetText("Points") + ucrChkPoints.AddParameterPresentCondition(True, "geom_point") + ucrChkPoints.AddParameterPresentCondition(False, "geom_point", False) + + ucrChkMovingAverage.SetText("Moving average") + ucrChkMovingAverage.AddParameterPresentCondition(True, "moving_mutate") + ucrChkMovingAverage.AddParameterPresentCondition(False, "moving_mutate", False) + + ucrSaveGraph.SetPrefix("seasonalityplot") + ucrSaveGraph.SetIsComboBox() + ucrSaveGraph.SetSaveTypeAsGraph() + ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetDataFrameSelector(ucrSelectorSeasonalityComparisons.ucrAvailableDataFrames) + ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") + + ucrInputSmoothing.SetItems({"Fourier Series", "Periodic Splines", "Natural Splines", "LOESS"}) + ucrInputSmoothing.SetDropDownStyleAsNonEditable() + + ucrNudSpan.SetParameter(New RParameter("span", 4)) + ucrNudSpan.DecimalPlaces = 2 + ucrNudSpan.Increment = 0.05 + ucrNudSpan.SetMinMax(0, Integer.MaxValue) + + ucrNudDf.SetParameter(New RParameter("df", 1)) + ucrNudDf.SetMinMax(1, Integer.MaxValue) + + ucrNudHarmonics.SetParameter(New RParameter("n", 1)) + ucrNudHarmonics.SetMinMax(1, Integer.MaxValue) + + ucrNudPeriod.SetParameter(New RParameter("period", 2)) + ucrNudPeriod.SetMinMax(1, Integer.MaxValue) + End Sub + + Private Sub SetDefaults() + clsPipeOperator = New ROperator + clsAndOperator = New ROperator + clsRefGreaterOperator = New ROperator + clsEstGreaterOperator = New ROperator + clsRefLessOperator = New ROperator + clsEstLessOperator = New ROperator + clsDivideOperator = New ROperator + + clsFacetWrapTildeOperator = New ROperator + clsPbsSplinesTildeOperator = New ROperator + + clsFilterFunction = New RFunction + clsRefIsNotNaFunction = New RFunction + clsEstIsNotNaFunction = New RFunction + clsMutateFunction = New RFunction + clsMutateFunction = New RFunction + clsPivotLongerFunction = New RFunction + clsGroupByFunction = New RFunction + clsSummariseFunction = New RFunction + clsMovingMutateFunction = New RFunction + clsMovingFunction = New RFunction + clsNSumFunction = New RFunction + clsPropSumFunction = New RFunction + clsNotIsNaThreshFunction = New RFunction + clsMeanFunction = New RFunction + + clsGgplotFunction = New RFunction + clsGeomPointFunction = New RFunction + clsGeomLineFunction = New RFunction + clsGeomSmoothFunction = New RFunction + clsGgPlotAesFunction = New RFunction + clsGeomLineAesFunction = New RFunction + clsFacetWrapFunction = New RFunction + clsAsFormulaFunction = New RFunction + clsPasteFunction = New RFunction + clsFourierSeriesFunction = New RFunction + clsListFunction = New RFunction + clsBinomialFunction = New RFunction + clsPbsFunction = New RFunction + clsNsFunction = New RFunction + + ucrSelectorSeasonalityComparisons.Reset() + ucrReceiverReference.SetMeAsReceiver() + ucrInputEstimateSummary.cboInput.SelectedItem = "Prop Above" + ucrInputReferenceSummary.cboInput.SelectedItem = "Prop Above" + ucrInputSmoothing.cboInput.SelectedItem = "Fourier Series" + + clsPipeOperator.SetOperation("%>%") + clsPipeOperator.AddParameter("filter", clsRFunctionParameter:=clsFilterFunction, iPosition:=1) + clsPipeOperator.AddParameter("mutate", clsRFunctionParameter:=clsMutateFunction, iPosition:=2) + clsPipeOperator.AddParameter("pivot_longer", clsRFunctionParameter:=clsPivotLongerFunction, iPosition:=3) + clsPipeOperator.AddParameter("group_by", clsRFunctionParameter:=clsGroupByFunction, iPosition:=4) + clsPipeOperator.AddParameter("summarise", clsRFunctionParameter:=clsSummariseFunction, iPosition:=5) + clsPipeOperator.AddParameter("moving_mutate", clsRFunctionParameter:=clsMovingMutateFunction, iPosition:=6) + clsPipeOperator.AddParameter("ggplot", clsROperatorParameter:=clsPlusOperator, iPosition:=7) + + + clsAndOperator.SetOperation("&") + clsAndOperator.AddParameter("ref", clsRFunctionParameter:=clsRefIsNotNaFunction, iPosition:=0) + clsAndOperator.AddParameter("est", clsRFunctionParameter:=clsEstIsNotNaFunction, iPosition:=1) + + clsRefGreaterOperator.SetOperation(">") + clsRefGreaterOperator.AddParameter("value", 0.85, iPosition:=1) + + clsEstGreaterOperator.SetOperation(">") + clsEstGreaterOperator.AddParameter("value", 0.85, iPosition:=1) + + clsRefLessOperator.SetOperation("<") + + clsEstLessOperator.SetOperation("<") + + clsDivideOperator.SetOperation("/") + clsDivideOperator.bSpaceAroundOperation = False + clsDivideOperator.AddParameter("sum", clsRFunctionParameter:=clsPropSumFunction, iPosition:=0) + clsDivideOperator.AddParameter("n", "n", iPosition:=1) + + clsFilterFunction.SetPackageName("dplyr") + clsFilterFunction.SetRCommand("filter") + clsFilterFunction.AddParameter("and", clsROperatorParameter:=clsAndOperator, bIncludeArgumentName:=False, iPosition:=0) + + clsRefIsNotNaFunction.SetRCommand("!is.na") + + clsEstIsNotNaFunction.SetRCommand("!is.na") + + clsMutateFunction.SetPackageName("dplyr") + clsMutateFunction.SetRCommand("mutate") + clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefGreaterOperator, iPosition:=0) + clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEstGreaterOperator, iPosition:=1) + + + clsPivotLongerFunction.SetPackageName("tidyr") + clsPivotLongerFunction.SetRCommand("pivot_longer") + clsPivotLongerFunction.AddParameter("cols", "c(" & "reference" & "," & "estimate" & ")", iPosition:=0) + clsPivotLongerFunction.AddParameter("names_to", Chr(34) & "data" & Chr(34), iPosition:=1) + clsPivotLongerFunction.AddParameter("values_to", Chr(34) & "value" & Chr(34), iPosition:=2) + + clsGroupByFunction.SetPackageName("dplyr") + clsGroupByFunction.SetRCommand("group_by") + clsGroupByFunction.AddParameter("data", "data", bIncludeArgumentName:=False, iPosition:=1) + + clsSummariseFunction.SetPackageName("dplyr") + clsSummariseFunction.SetRCommand("summarise") + clsSummariseFunction.AddParameter("n", clsRFunctionParameter:=clsNSumFunction, iPosition:=0) + clsSummariseFunction.AddParameter("calc_summary", clsROperatorParameter:=clsDivideOperator, iPosition:=1) + + clsMovingMutateFunction.SetPackageName("dplyr") + clsMovingMutateFunction.SetRCommand("mutate") + clsMovingMutateFunction.AddParameter("moving", clsRFunctionParameter:=clsMovingFunction, iPosition:=0) + + clsMovingFunction.SetPackageName("raster") + clsMovingFunction.SetRCommand("movingFun") + clsMovingFunction.AddParameter("calc_summary", "calc_summary", bIncludeArgumentName:=False, iPosition:=0) + clsMovingFunction.AddParameter("n", 5, iPosition:=1) + clsMovingFunction.AddParameter("circular", "TRUE", iPosition:=2) + clsMovingFunction.AddParameter("na.rm", "TRUE", iPosition:=3) + + clsNSumFunction.SetRCommand("sum") + clsNSumFunction.AddParameter("sum", clsRFunctionParameter:=clsNotIsNaThreshFunction, bIncludeArgumentName:=False, iPosition:=0) + + clsPropSumFunction.SetRCommand("sum") + clsPropSumFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) + clsPropSumFunction.AddParameter("na.rm", "TRUE", iPosition:=1) + + clsNotIsNaThreshFunction.SetRCommand("!is.na") + clsNotIsNaThreshFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) + + clsMeanFunction.SetRCommand("mean") + clsMeanFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) + clsMeanFunction.AddParameter("na.rm", "TRUE", iPosition:=1) + + 'ggplot functions + operators + clsGgplotFunction.SetPackageName("ggplot2") + clsGgplotFunction.SetRCommand("ggplot") + clsGgplotFunction.AddParameter("mapping", clsRFunctionParameter:=clsGgPlotAesFunction, iPosition:=0) + + clsPlusOperator.SetOperation("+") + clsPlusOperator.AddParameter("ggplot", clsRFunctionParameter:=clsGgplotFunction, iPosition:=0) + clsPlusOperator.AddParameter("geom_smooth", clsRFunctionParameter:=clsGeomSmoothFunction, iPosition:=3) + + clsFacetWrapTildeOperator.SetOperation("~") + clsFacetWrapTildeOperator.AddParameter("", "", iPosition:=0) + + clsPbsSplinesTildeOperator.SetOperation("~") + clsPbsSplinesTildeOperator.AddParameter("y", "y", iPosition:=0) + + clsGeomPointFunction.SetPackageName("ggplot2") + clsGeomPointFunction.SetRCommand("geom_point") + + clsGeomLineFunction.SetPackageName("ggplot2") + clsGeomLineFunction.SetRCommand("geom_line") + clsGeomLineFunction.AddParameter("mapping", clsRFunctionParameter:=clsGeomLineAesFunction, iPosition:=0) + + clsGeomSmoothFunction.SetPackageName("ggplot2") + clsGeomSmoothFunction.SetRCommand("geom_smooth") + clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) + clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsGeomSmoothFunction.AddParameter("se", "FALSE", iPosition:=3) + + clsGgPlotAesFunction.SetPackageName("ggplot2") + clsGgPlotAesFunction.SetRCommand("aes") + clsGgPlotAesFunction.AddParameter("y", "calc_summary", iPosition:=1) + clsGgPlotAesFunction.AddParameter("colour", "data", iPosition:=2) + clsGgPlotAesFunction.AddParameter("weight", "n", iPosition:=3) + + clsGeomLineAesFunction.SetPackageName("ggplot2") + clsGeomLineAesFunction.SetRCommand("aes") + + clsFacetWrapFunction.SetPackageName("ggplot2") + clsFacetWrapFunction.SetRCommand("facet_wrap") + clsFacetWrapFunction.AddParameter("tilde", clsROperatorParameter:=clsFacetWrapTildeOperator, bIncludeArgumentName:=False, iPosition:=0) + + clsAsFormulaFunction.SetRCommand("as.formula") + clsAsFormulaFunction.AddParameter("paste", clsRFunctionParameter:=clsPasteFunction, bIncludeArgumentName:=False, iPosition:=0) + + clsPasteFunction.SetRCommand("paste") + clsPasteFunction.AddParameter("y", Chr(34) & "y~" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) + clsPasteFunction.AddParameter("fourier", clsRFunctionParameter:=clsFourierSeriesFunction, bIncludeArgumentName:=False, iPosition:=1) + + clsFourierSeriesFunction.SetRCommand("fourier_series") + clsFourierSeriesFunction.AddParameter("x", Chr(34) & "x" & Chr(34), bIncludeArgumentName:=False, iPosition:=0) + clsFourierSeriesFunction.AddParameter("n", 3, iPosition:=1) + clsFourierSeriesFunction.AddParameter("period", 366, iPosition:=2) + + clsListFunction.SetRCommand("list") + clsListFunction.AddParameter("binomial", clsRFunctionParameter:=clsBinomialFunction, bIncludeArgumentName:=False, iPosition:=0) + + clsBinomialFunction.SetRCommand("binomial") + clsBinomialFunction.AddParameter("link", Chr(34) & "logit" & Chr(34), iPosition:=0) + + clsPbsFunction.SetPackageName("pbs") + clsPbsFunction.SetRCommand("pbs") + clsPbsFunction.AddParameter("x", "x", bIncludeArgumentName:=False, iPosition:=0) + + clsNsFunction.SetPackageName("splines") + clsNsFunction.SetRCommand("ns") + clsNsFunction.AddParameter("x", "x", bIncludeArgumentName:=False, iPosition:=0) + + clsPipeOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorSeasonalityComparisons.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") + ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) + End Sub + + Private Sub SetRcodeForControls(bReset As Boolean) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsRefGreaterOperator, ucrReceiverReference.GetParameter, iAdditionalPairNo:=1) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsRefLessOperator, ucrReceiverReference.GetParameter, iAdditionalPairNo:=2) + + ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEstGreaterOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=1) + ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEstLessOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=2) + + ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsRefLessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=1) + + ucrInputEstimateThreshold.AddAdditionalCodeParameterPair(clsEstLessOperator, ucrInputEstimateThreshold.GetParameter, iAdditionalPairNo:=1) + + ucrReceiverSeasonality.AddAdditionalCodeParameterPair(clsGgPlotAesFunction, New RParameter("x", 0), iAdditionalPairNo:=1) + + ucrReceiverStation.AddAdditionalCodeParameterPair(clsFacetWrapTildeOperator, New RParameter("station", 1), iAdditionalPairNo:=1) + + ucrNudDf.AddAdditionalCodeParameterPair(clsPbsFunction, ucrNudDf.GetParameter, iAdditionalPairNo:=1) + + ucrSelectorSeasonalityComparisons.SetRCode(clsPipeOperator, bReset) + ucrReceiverEstimate.SetRCode(clsEstIsNotNaFunction, bReset) + ucrReceiverReference.SetRCode(clsRefIsNotNaFunction, bReset) + ucrInputReferenceThreshold.SetRCode(clsRefGreaterOperator, bReset) + ucrInputEstimateThreshold.SetRCode(clsEstGreaterOperator, bReset) + ucrReceiverStation.SetRCode(clsGroupByFunction, bReset) + ucrReceiverSeasonality.SetRCode(clsGroupByFunction, bReset) + ucrInputN.SetRCode(clsMovingFunction, bReset) + ucrChkRemoveMissing.SetRCode(clsPipeOperator, bReset) + ucrChkMovingAverage.SetRCode(clsPipeOperator, bReset) + ucrChkPoints.SetRCode(clsPlusOperator, bReset) + ucrSaveGraph.SetRCode(clsPipeOperator, bReset) + ucrNudSpan.SetRCode(clsGeomSmoothFunction, bReset) + ucrNudDf.SetRCode(clsNsFunction, bReset) + ucrNudHarmonics.SetRCode(clsFourierSeriesFunction, bReset) + ucrNudPeriod.SetRCode(clsFourierSeriesFunction, bReset) + End Sub + + Private Sub TestOkEnabled() + If ucrReceiverReference.IsEmpty OrElse ucrReceiverEstimate.IsEmpty OrElse ucrReceiverSeasonality.IsEmpty OrElse (ucrChkMovingAverage.Checked AndAlso ucrInputN.IsEmpty) OrElse ((ucrInputReferenceSummary.GetText = "Prop Above" OrElse ucrInputReferenceSummary.GetText = "Prop Below") AndAlso ucrInputReferenceThreshold.IsEmpty) OrElse ((ucrInputEstimateSummary.GetText = "Prop Above" OrElse ucrInputEstimateSummary.GetText = "Prop Below") AndAlso ucrInputEstimateThreshold.IsEmpty) OrElse Not ucrSaveGraph.IsComplete OrElse (ucrInputSmoothing.GetText = "Fourier Series" AndAlso (ucrNudHarmonics.GetText = "" OrElse ucrNudPeriod.GetText = "")) OrElse (ucrInputSmoothing.GetText = "LOESS" AndAlso ucrNudSpan.GetText = "") OrElse ((ucrInputSmoothing.GetText = "Periodic Splines" OrElse ucrInputSmoothing.GetText = "Natural Splines") AndAlso ucrNudDf.GetText = "") Then + ucrBase.OKEnabled(False) + Else + ucrBase.OKEnabled(True) + End If + End Sub + + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + SetRcodeForControls(True) + TestOkEnabled() + End Sub + + Private Sub ucrInputReferenceSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimate.ControlValueChanged + Select Case ucrInputReferenceSummary.GetText + Case "Prop Above" + clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefGreaterOperator, iPosition:=0) + Case "Prop Below" + clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefLessOperator, iPosition:=0) + Case "Mean" + clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) + clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + End Select + + End Sub + + Private Sub ucrInputEstimateSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputEstimateSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimate.ControlValueChanged + Select Case ucrInputEstimateSummary.GetText + Case "Prop Above" + clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEstGreaterOperator, iPosition:=1) + Case "Prop Below" + clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEstLessOperator, iPosition:=1) + Case "Mean" + clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) + clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + End Select + End Sub + + Private Sub ucrChkRemoveMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkRemoveMissing.ControlValueChanged + If ucrChkRemoveMissing.Checked Then + clsPipeOperator.AddParameter("filter", clsRFunctionParameter:=clsFilterFunction, iPosition:=1) + Else + clsPipeOperator.RemoveParameterByName("filter") + End If + End Sub + + Private Sub ucrChkMovingAverage_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMovingAverage.ControlValueChanged + If ucrChkMovingAverage.Checked Then + clsPipeOperator.AddParameter("moving_mutate", clsRFunctionParameter:=clsMovingMutateFunction, iPosition:=6) + clsPlusOperator.AddParameter("geom_line", clsRFunctionParameter:=clsGeomLineFunction, iPosition:=2) + clsGeomLineAesFunction.AddParameter("y", "moving", iPosition:=0) + Else + clsPipeOperator.RemoveParameterByName("moving_mutate") + clsPlusOperator.RemoveParameterByName("geom_line") + clsGeomLineAesFunction.RemoveParameterByName("y") + End If + End Sub + + Private Sub ucrChkPoints_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPoints.ControlValueChanged + If ucrChkPoints.Checked Then + clsPlusOperator.AddParameter("geom_point", clsRFunctionParameter:=clsGeomPointFunction, iPosition:=1) + Else + clsPlusOperator.RemoveParameterByName("ggplot") + End If + End Sub + + Private Sub ucrInputSmoothing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSmoothing.ControlValueChanged + Select Case ucrInputSmoothing.GetText + Case "Fourier Series" + clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) + clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsGeomSmoothFunction.AddParameter("formula", clsRFunctionParameter:=clsAsFormulaFunction, iPosition:=1) + Case "Periodic Splines" + clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) + clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsPbsSplinesTildeOperator.AddParameter("pbs", clsRFunctionParameter:=clsPbsFunction, iPosition:=1) + clsPbsSplinesTildeOperator.RemoveParameterByName("ns") + clsPbsSplinesTildeOperator.RemoveParameterByName("x") + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + Case "Natural Splines" + clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) + clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") + clsPbsSplinesTildeOperator.RemoveParameterByName("x") + clsPbsSplinesTildeOperator.AddParameter("ns", clsRFunctionParameter:=clsNsFunction, iPosition:=1) + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + Case "LOESS" + clsGeomSmoothFunction.AddParameter("method", Chr(34) & "loess" & Chr(34), iPosition:=0) + clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") + clsPbsSplinesTildeOperator.RemoveParameterByName("ns") + clsPbsSplinesTildeOperator.AddParameter("x", "x", iPosition:=1) + clsGeomSmoothFunction.RemoveParameterByName("method.args") + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + End Select + + End Sub + + Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged + If Not ucrReceiverStation.IsEmpty Then + clsPlusOperator.AddParameter("facet_wrap", clsRFunctionParameter:=clsFacetWrapFunction, iPosition:=4) + Else + clsPlusOperator.RemoveParameterByName("facet_wrap") + End If + End Sub + + Private Sub ucrReceiverReference_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReference.ControlContentsChanged, ucrReceiverEstimate.ControlContentsChanged, ucrReceiverSeasonality.ControlContentsChanged, ucrChkMovingAverage.ControlContentsChanged, ucrInputN.ControlContentsChanged, ucrInputReferenceSummary.ControlContentsChanged, ucrInputReferenceThreshold.ControlContentsChanged, ucrInputEstimateSummary.ControlContentsChanged, ucrInputEstimateThreshold.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrInputSmoothing.ControlContentsChanged, ucrNudHarmonics.ControlContentsChanged, ucrNudPeriod.ControlContentsChanged, ucrNudSpan.ControlContentsChanged, ucrNudDf.ControlContentsChanged + TestOkEnabled() + End Sub +End Class diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 7d26bbc0f53..34297ccb9f0 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1282,3 +1282,11 @@ summary_sample <- function(x, size, replace = FALSE){ else if(length(x)==1){return(x)} else{sample(x = x, size = size, replace = replace)} } + +fourier_series <- function(x, n, period) { + p2 <- "2 * pi" + h <- seq_len(n) + paste0("sin(", x, " * ", h, " * ", p2, " / ", period, ")", " + ", + "cos(", x, " * ", h, " * ", p2, " / ", period, ")", + collapse = " + ") +} From 05276d1f1b1cbd540115af632b9d979a1fbb6599 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Thu, 17 Sep 2020 15:18:21 +0000 Subject: [PATCH 144/277] fixed span and df defaults --- instat/dlgSeasonalPlot.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index f775a6b79b9..cc55b5d82e7 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -291,6 +291,7 @@ Public Class dlgSeasonalPlot clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) clsGeomSmoothFunction.AddParameter("se", "FALSE", iPosition:=3) + clsGeomSmoothFunction.AddParameter("span", 0.5, iPosition:=4) clsGgPlotAesFunction.SetPackageName("ggplot2") clsGgPlotAesFunction.SetRCommand("aes") @@ -325,11 +326,12 @@ Public Class dlgSeasonalPlot clsPbsFunction.SetPackageName("pbs") clsPbsFunction.SetRCommand("pbs") - clsPbsFunction.AddParameter("x", "x", bIncludeArgumentName:=False, iPosition:=0) + clsPbsFunction.AddParameter("df", 6, iPosition:=1) clsNsFunction.SetPackageName("splines") clsNsFunction.SetRCommand("ns") clsNsFunction.AddParameter("x", "x", bIncludeArgumentName:=False, iPosition:=0) + clsNsFunction.AddParameter("df", 6, iPosition:=1) clsPipeOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorSeasonalityComparisons.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) From 86f48f635692a1a39acd4cff86fba0488aad63a0 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 17 Sep 2020 18:30:31 +0300 Subject: [PATCH 145/277] renaming sources and data --- instat/dlgImportGriddedData.resx | 642 ++++++------------ instat/dlgImportGriddedData.vb | 68 +- .../static/InstatObject/R/instat_object_R6.R | 48 +- 3 files changed, 281 insertions(+), 477 deletions(-) diff --git a/instat/dlgImportGriddedData.resx b/instat/dlgImportGriddedData.resx index 409bc7b58e5..ed1c8bdd4a1 100644 --- a/instat/dlgImportGriddedData.resx +++ b/instat/dlgImportGriddedData.resx @@ -357,114 +357,6 @@ 5 - - rdoCustomRange - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDateRange - - - 0 - - - rdoEntireRange - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDateRange - - - 1 - - - lblTo - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDateRange - - - 2 - - - lblFrom - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpDateRange - - - 3 - - - ucrDtpMinDate - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 4 - - - ucrDtpMaxDate - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 5 - - - ucrPnlDateRange - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 6 - - - 3, 57 - - - 408, 117 - - - 4 - - - Date Range - - - grpDateRange - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - Button @@ -597,137 +489,92 @@ 3 - - rdoPoint - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLocationRange - - - 0 - - - rdoArea - - - System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 48, 65 - - grpLocationRange + + 180, 20 - + 1 - - ucrPnlLocationRange - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + ucrDtpMinDate - - grpLocationRange + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 2 + + grpDateRange - - lblMinLon + + 4 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 48, 90 - - grpLocationRange + + 180, 20 - + 3 - - lblMinLat - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpLocationRange - - - 4 - - - ucrInputMinLon + + ucrDtpMaxDate - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpLocationRange + + grpDateRange - + 5 - - ucrInputMinLat - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 6 - - - ucrInputMaxLat - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 101, 20 - - grpLocationRange + + 206, 37 - - 9 + + 23 - - ucrInputMaxLon + + ucrPnlDateRange - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpLocationRange + + grpDateRange - - 10 + + 6 - - 3, 174 + + 3, 57 - + 408, 117 - - 5 + + 4 - - Location Range + + Date Range - - grpLocationRange + + grpDateRange - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 12 + + 3 Button @@ -739,7 +586,7 @@ NoControl - 203, 19 + 104, 19 102, 28 @@ -775,7 +622,7 @@ NoControl - 103, 19 + 204, 19 102, 28 @@ -798,68 +645,197 @@ grpLocationRange - - 1 + + 1 + + + 103, 16 + + + 202, 37 + + + 26 + + + ucrPnlLocationRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 2 + + + True + + + NoControl + + + 72, 67 + + + 24, 13 + + + 10 + + + Min + + + lblMinLon + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLocationRange + + + 3 + + + True + + + NoControl + + + 72, 92 + + + 24, 13 + + + 9 + + + Min + + + lblMinLat + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLocationRange + + + 4 + + + 99, 64 + + + 75, 21 + + + 7 + + + ucrInputMinLon + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 5 + + + 99, 88 + + + 75, 21 + + + 11 + + + ucrInputMinLat + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 6 - - True + + 210, 88 - - NoControl + + 75, 21 - - 72, 67 + + 13 - - 24, 13 + + ucrInputMaxLat - - 10 + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - Min + + grpLocationRange - - lblMinLon + + 9 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 210, 64 - - grpLocationRange + + 75, 21 - - 3 + + 9 - - True + + ucrInputMaxLon - - NoControl + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 72, 92 + + grpLocationRange - - 24, 13 + + 10 - - 9 + + 3, 174 - - Min + + 408, 117 - - lblMinLat + + 5 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Location Range - + grpLocationRange - - 4 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 12 True @@ -895,7 +871,7 @@ 135, 345 - 217, 21 + 153, 21 11 @@ -933,69 +909,6 @@ 2 - - 48, 65 - - - 180, 20 - - - 1 - - - ucrDtpMinDate - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 4 - - - 48, 90 - - - 180, 20 - - - 3 - - - ucrDtpMaxDate - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 5 - - - 101, 20 - - - 206, 37 - - - 23 - - - ucrPnlDateRange - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 6 - 150, 297 @@ -1080,111 +993,6 @@ 11 - - 103, 16 - - - 202, 37 - - - 26 - - - ucrPnlLocationRange - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 2 - - - 99, 64 - - - 75, 21 - - - 7 - - - ucrInputMinLon - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 5 - - - 99, 88 - - - 75, 21 - - - 11 - - - ucrInputMinLat - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 6 - - - 210, 88 - - - 75, 21 - - - 13 - - - ucrInputMaxLat - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 9 - - - 210, 64 - - - 75, 21 - - - 9 - - - ucrInputMaxLon - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpLocationRange - - - 10 - True diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 490f29f2677..8b530e6bd92 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -40,17 +40,17 @@ Public Class dlgImportGriddedData ucrBase.iHelpTopicID = 526 ucrInputSource.SetParameter(New RParameter("source", 0)) - dctDownloadPairs.Add("NASA", Chr(34) & "NASA_TRMM_3B42" & Chr(34)) - dctDownloadPairs.Add("NOAA", Chr(34) & "NOAA_RFE2" & Chr(34)) + dctDownloadPairs.Add("NASA", Chr(34) & "NASA" & Chr(34)) + dctDownloadPairs.Add("NOAA", Chr(34) & "NOAA" & Chr(34)) dctDownloadPairs.Add("TAMSAT", Chr(34) & "TAMSAT" & Chr(34)) - dctDownloadPairs.Add("UCSB CHIRPS", Chr(34) & "CHIRPS_V2P0" & Chr(34)) + dctDownloadPairs.Add("UCSB_CHIRPS", Chr(34) & "UCSB_CHIRPS" & Chr(34)) ucrInputSource.SetItems(dctDownloadPairs) ucrInputSource.SetDropDownStyleAsNonEditable() ucrInputData.SetParameter(New RParameter("data", 1)) dctFiles = New Dictionary(Of String, String) - dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_estimated_prcp" & Chr(34)) - dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_estimated_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "TRMM 3B42 3-Hourly Precipitation" ucrInputData.SetDropDownStyleAsNonEditable() @@ -81,8 +81,8 @@ Public Class dlgImportGriddedData ucrInputNewDataFrameName.SetParameter(New RParameter("name", 9)) ucrPnlLocationRange.SetParameter(New RParameter("download_type", 10)) - ucrPnlLocationRange.AddRadioButton(rdoArea, Chr(34) & "area" & Chr(34)) - ucrPnlLocationRange.AddRadioButton(rdoPoint, Chr(34) & "point" & Chr(34)) + ucrPnlLocationRange.AddRadioButton(rdoArea, Chr(34) & "Area" & Chr(34)) + ucrPnlLocationRange.AddRadioButton(rdoPoint, Chr(34) & "Point" & Chr(34)) ucrPnlDateRange.AddRadioButton(rdoEntireRange) ucrPnlDateRange.AddRadioButton(rdoCustomRange) @@ -96,11 +96,13 @@ Public Class dlgImportGriddedData ucrPnlLocationRange.AddToLinkedControls({ucrInputMaxLat, ucrInputMaxLon}, {rdoArea}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlDateRange.AddToLinkedControls({ucrDtpMinDate, ucrDtpMaxDate}, {rdoCustomRange}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDontImportData.AddToLinkedControls(ucrInputNewDataFrameName, {False}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputMaxLon.SetLinkedDisplayControl(lblMaxLon) ucrInputMinLat.SetLinkedDisplayControl(lblLat) ucrInputMaxLat.SetLinkedDisplayControl(lblMaxLat) ucrDtpMinDate.SetLinkedDisplayControl(lblFrom) ucrDtpMaxDate.SetLinkedDisplayControl(lblTo) + ucrInputNewDataFrameName.SetLinkedDisplayControl(lblNewDataFrameName) clsDefaultStartDate = New RFunction clsDefaultStartDate.SetRCommand("as.Date") @@ -117,17 +119,16 @@ Public Class dlgImportGriddedData rdoEntireRange.Checked = True clsDownloadFromIRIFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$download_from_IRI") - clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NASA_TRMM_3B42" & Chr(34), iPosition:=0) - clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "3_hourly_estimated_prcp" & Chr(34), iPosition:=1) + clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NASA" & Chr(34), iPosition:=0) + clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "3_hourly_prcp" & Chr(34), iPosition:=1) clsDownloadFromIRIFunction.AddParameter("path", Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments).Replace("\", "/"), iPosition:=2) - 'opted to set this as default location since it has data for all sources - clsDownloadFromIRIFunction.AddParameter("min_lon", 10, iPosition:=3) - clsDownloadFromIRIFunction.AddParameter("max_lon", 10.5, iPosition:=4) - clsDownloadFromIRIFunction.AddParameter("min_lat", 10, iPosition:=5) - clsDownloadFromIRIFunction.AddParameter("max_lat", 10.5, iPosition:=6) + clsDownloadFromIRIFunction.AddParameter("min_lon", 34.58, iPosition:=3) + clsDownloadFromIRIFunction.AddParameter("max_lon", 35.08, iPosition:=4) + clsDownloadFromIRIFunction.AddParameter("min_lat", 0, iPosition:=5) + clsDownloadFromIRIFunction.AddParameter("max_lat", 0.5, iPosition:=6) clsDownloadFromIRIFunction.AddParameter("min_date", clsRFunctionParameter:=clsDefaultStartDate, iPosition:=7) clsDownloadFromIRIFunction.AddParameter("max_date", clsRFunctionParameter:=clsDefaultEndDate, iPosition:=8) - clsDownloadFromIRIFunction.AddParameter("download_type", Chr(34) & "area" & Chr(34), iPosition:=10) + clsDownloadFromIRIFunction.AddParameter("download_type", Chr(34) & "Point" & Chr(34), iPosition:=10) ucrBase.clsRsyntax.SetBaseRFunction(clsDownloadFromIRIFunction) End Sub @@ -156,43 +157,44 @@ Public Class dlgImportGriddedData Select Case ucrInputSource.GetText Case "NASA" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_estimated_prcp" & Chr(34)) - dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_estimated_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "daily_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "3_hourly_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "TRMM 3B42 3-Hourly Precipitation" ucrDtpMinDate.MinDate = New Date(1998, 1, 1) ucrDtpMaxDate.MinDate = New Date(1998, 1, 1) Case "NOAA" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("RFE2 Daily Precipitation", Chr(34) & "daily_estimated_prcp" & Chr(34)) - dctFiles.Add("RFE2 10-day Precipitation", Chr(34) & "10day_estimated_prcp" & Chr(34)) + dctFiles.Add("RFE2 Daily Precipitation", Chr(34) & "daily_rfev2_est_prcp" & Chr(34)) + dctFiles.Add("RFE2 10-day Precipitation", Chr(34) & "10day_rfev2_est_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "RFE2 Daily Precipitation" ucrDtpMinDate.MinDate = New Date(2000, 10, 31) ucrDtpMaxDate.MinDate = New Date(2000, 10, 31) Case "TAMSAT" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("v3.1 Daily Rainfall", Chr(34) & "daily_rainfall_estimates" & Chr(34)) - dctFiles.Add("v3.1 Daily Rainfall Complete (Filled)", Chr(34) & "daily_recovered_rainfall_estimate" & Chr(34)) - dctFiles.Add("v3.1 Dekadal Rainfall", Chr(34) & "dekadal_rainfall_estimates" & Chr(34)) - dctFiles.Add("v3.1 Dekadal Rainfall Complete (Filled)", Chr(34) & "dekadal_recovered_rainfall_estimate" & Chr(34)) - dctFiles.Add("v3.1 Monthly Rainfall", Chr(34) & "monthly_rainfall_estimates" & Chr(34)) - dctFiles.Add("v3.1 Monthly Rainfall Complete (Filled)", Chr(34) & "monthly_recovered_rainfall_estimate" & Chr(34)) + dctFiles.Add("v3.1 Daily Rainfall", Chr(34) & "daily_rfe" & Chr(34)) + dctFiles.Add("v3.1 Daily Rainfall Complete (Filled)", Chr(34) & "daily_rfe_filled" & Chr(34)) + dctFiles.Add("v3.1 Dekadal Rainfall", Chr(34) & "dekadal_rfe" & Chr(34)) + dctFiles.Add("v3.1 Dekadal Rainfall Complete (Filled)", Chr(34) & "dekadal_rfe_filled" & Chr(34)) + dctFiles.Add("v3.1 Monthly Rainfall", Chr(34) & "monthly_rfe" & Chr(34)) + dctFiles.Add("v3.1 Monthly Rainfall Complete (Filled)", Chr(34) & "monthly_rfe_filled" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "v3.1 Daily Rainfall" ucrDtpMinDate.MinDate = New Date(1983, 1, 1) ucrDtpMaxDate.MinDate = New Date(1983, 1, 1) - Case "UCSB CHIRPS" + Case "UCSB_CHIRPS" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily Precipitation 0.25 degree", Chr(34) & "daily_improved_0p25" & Chr(34)) - dctFiles.Add("Daily Precipitation 0.05 degree", Chr(34) & "daily_improved_0p05" & Chr(34)) - dctFiles.Add("Dekad Precipitation 0.05 degree", Chr(34) & "dekad" & Chr(34)) - dctFiles.Add("Monthly Precipitation 0.05 degree", Chr(34) & "monthly" & Chr(34)) + dctFiles.Add("Daily Precipitation 0.25 degree", Chr(34) & "daily_improved_global_0p25_prcp" & Chr(34)) + dctFiles.Add("Daily Precipitation 0.05 degree", Chr(34) & "daily_improved_global_0p05_prcp" & Chr(34)) + dctFiles.Add("Dekad Precipitation 0.05 degree", Chr(34) & "dekad_prcp" & Chr(34)) + dctFiles.Add("Monthly Precipitation 0.05 degree", Chr(34) & "monthly_global_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily Precipitation 0.25 degree" ucrDtpMinDate.MinDate = New Date(1981, 1, 1) ucrDtpMaxDate.MinDate = New Date(1981, 1, 1) End Select + ucrInputNewDataFrameName.SetPrefix(ucrInputSource.GetText.ToLower) End Sub Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click @@ -208,10 +210,6 @@ Public Class dlgImportGriddedData End Using End Sub - Private Sub ucrInputData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputData.ControlValueChanged, ucrInputSource.ControlValueChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged - ucrInputNewDataFrameName.SetName(ucrInputSource.GetText & "_" & ucrInputData.GetText & "_" & (ucrDtpMinDate.DateValue & "_" & ucrDtpMaxDate.DateValue).Replace("/", "_")) - End Sub - Private Sub ucrDtpMaxDate_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrDtpMaxDate.ControlValueChanged, ucrDtpMinDate.ControlValueChanged If ucrDtpMinDate.DateValue > ucrDtpMaxDate.DateValue AndAlso bShowMessageBox Then MsgBox("From date is greater than To date. Ok will Not be enabled on the dialog.", Title:="Date bounds", Buttons:=MsgBoxStyle.Information) @@ -232,4 +230,4 @@ Public Class dlgImportGriddedData Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged, ucrPnlDateRange.ControlContentsChanged TestOkEnabled() End Sub -End Class +End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 7c777d4f1c5..bc77a118057 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2088,31 +2088,29 @@ DataBook$set("public","package_check", function(package) { } ) -DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "point", import = TRUE){ +DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "Point", import = TRUE){ init_URL <- "https://iridl.ldeo.columbia.edu/SOURCES/" - if(source == "CHIRPS_V2P0"){prexyaddress <- paste0(init_URL, ".UCSB/.CHIRPS/.v2p0") - if(data == "daily_improved_0p25") {extension <- ".daily-improved/.global/.0p25/.prcp"}#1 Jan 1981 to 31 Jul 2020 - else if(data == "daily_improved_0p05") {extension <- ".daily-improved/.global/.0p05/.prcp"}#1 Jan 1981 to 31 Jul 2020 - else if(data == "dekad") {extension <- ".dekad/.prcp"}#(days since 1960-01-01) ordered [ (1-10 Jan 1981) (11-20 Jan 1981) (21-31 Jan 1981) ... (21-31 Aug 2020)] - else if(data == "monthly") {extension <- ".monthly/.global/.precipitation"}#grid: /T (months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) by 1.0 N= 475 pts :grid + if(source == "UCSB_CHIRPS"){prexyaddress <- paste0(init_URL, ".UCSB/.CHIRPS/.v2p0") + if(data == "daily_improved_global_0p25_prcp") {extension <- ".daily-improved/.global/.0p25/.prcp"}#1 Jan 1981 to 31 Jul 2020 + else if(data == "daily_improved_global_0p05_prcp") {extension <- ".daily-improved/.global/.0p05/.prcp"}#1 Jan 1981 to 31 Jul 2020 + else if(data == "dekad_prcp") {extension <- ".dekad/.prcp"}#(days since 1960-01-01) ordered [ (1-10 Jan 1981) (11-20 Jan 1981) (21-31 Jan 1981) ... (21-31 Aug 2020)] + else if(data == "monthly_global_prcp") {extension <- ".monthly/.global/.precipitation"}#grid: /T (months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) by 1.0 N= 475 pts :grid else stop("Data file does not exist for CHIRPS V2P0 data") - #Annual and 2Monthly and 3monthly does not exist for CHIRPS_V2P0 }else if(source == "TAMSAT") {prexyaddress <-paste0(init_URL, ".Reading/.Meteorology/.TAMSAT/.TARCAT/.v3p1") - if(data == "daily_rainfall_estimates") {extension <- ".daily/.rfe"}#grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid - else if(data == "daily_recovered_rainfall_estimate ") {extension <- ".daily/.rfe_filled/"}#grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid - else if(data == "dekadal_rainfall_estimates") {extension <- ".dekadal/.rfe/"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid - else if(data == "dekadal_recovered_rainfall_estimate") {extension <- ".dekadal/.rfe_filled/"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid - else if(data == "monthly_rainfall_estimates") {extension <- ".monthly/.rfe/"}#grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid - else if(data == "monthly_recovered_rainfall_estimate") {extension <- ".monthly/.rfe_filled/"}#grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid + if(data == "daily_rfe") {extension <- ".daily/.rfe"}#grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid + else if(data == "daily_rfe_filled") {extension <- ".daily/.rfe_filled/"}#grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid + else if(data == "dekadal_rfe") {extension <- ".dekadal/.rfe/"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid + else if(data == "dekadal_rfe_filled") {extension <- ".dekadal/.rfe_filled/"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid + else if(data == "monthly_rfe") {extension <- ".monthly/.rfe/"}#grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid + else if(data == "monthly_rfe_filled") {extension <- ".monthly/.rfe_filled/"}#grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid else stop("Data file does not exist for TAMSAT data") - #monthly,climatology and TAMSAT RFE 0p1 are yet to be implemented. }else if(source == "NOAA_ARC2") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa/.DAILY/.ARC2") - if(data == "daily_estimated_prcp") {extension <- ".daily/.est_prcp"}#(days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) - else if(data == "monthly_average_estimated_prcp") {extension <- ".monthly/.est_prcp"}#(months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) + if(data == "daily_est_prcp") {extension <- ".daily/.est_prcp"}#(days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) + else if(data == "monthly_est_prcp") {extension <- ".monthly/.est_prcp"}#(months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) else stop("Data file does not exist for NOAA ARC2 data") - }else if(source=="NOAA_RFE2") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa") - if(data == "daily_estimated_prcp"){extension <- ".DAILY/.RFEv2/.est_prcp"}#(days since 2000-10-31 12:00:00) ordered (31 Oct 2000) to (12 Sep 2020) - else if(data == "10day_estimated_prcp"){extension <- ".TEN-DAY/.RFEv2/.est_prcp"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Dec 1999) (11-20 Dec 1999) (21-31 Dec 1999) ... (1-10 Sep 2020)] N= 748 pts :grid + }else if(source=="NOAA") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa") + if(data == "daily_rfev2_est_prcp"){extension <- ".DAILY/.RFEv2/.est_prcp"}#(days since 2000-10-31 12:00:00) ordered (31 Oct 2000) to (12 Sep 2020) + else if(data == "10day_rfev2_est_prcp"){extension <- ".TEN-DAY/.RFEv2/.est_prcp"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Dec 1999) (11-20 Dec 1999) (21-31 Dec 1999) ... (1-10 Sep 2020)] N= 748 pts :grid else stop("Data file does not exist for NOAA RFE2 data") }else if(source=="NOAA_CMORPH_DAILY" || source=="NOAA_CMORPH_3HOURLY" || source=="NOAA_CMORPH_DAILY_CALCULATED") { if(source=="NOAA_CMORPH_DAILY") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily")} @@ -2125,17 +2123,17 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi else if(data == "renamed102015_mean_microwave_only_est_prcp") {extension <- ".renamed102015/.mean/.microwave-only/.comb"} else if(data == "renamed102015_mean_morphed_est_prcp") {extension <- ".renamed102015/.mean/.morphed/.cmorph"} else stop("Data file does not exist for NOAA CMORPH data") - }else if(source=="NASA_TRMM_3B42") {prexyaddress <- paste0(init_URL, ".NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") - if(data == "daily_estimated_prcp") {extension <- ".daily/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (1 Jan 1998) to (31 May 2015) - else if(data == "3_hourly_estimated_prcp") {extension <- ".three-hourly/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) + }else if(source=="NASA") {prexyaddress <- paste0(init_URL, ".NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") + if(data == "daily_prcp") {extension <- ".daily/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (1 Jan 1998) to (31 May 2015) + else if(data == "3_hourly_prcp") {extension <- ".three-hourly/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) else stop("Data file does not exist for NASA TRMM 3B42 data") }else{stop("Source not specified correctly.")} prexyaddress <- paste(prexyaddress, extension, sep="/") - if(download_type == "area"){URL <- add_xy_area_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, max_lon = max_lon, max_lat = max_lat)} - else if(download_type == "point"){URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat)} + if(download_type == "Area"){URL <- add_xy_area_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, max_lon = max_lon, max_lat = max_lat)} + else if(download_type == "Point"){URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat)} if(!missing(min_date)&!missing(max_date)){URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date)} URL <- URL %>% add_nc() - file_name <- tempfile(name, tmpdir = path, fileext = ".nc") + file_name <- tempfile(pattern = tolower(source), tmpdir = path, fileext = ".nc") result <- download.file(url = URL, destfile = file_name, method = "libcurl", mode = "wb", cacheOK = FALSE) if(import && result == 0) { nc <- ncdf4::nc_open(filename = file_name) From 4f32357948f47314abd45abc6b7a656f19ad5f97 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Thu, 17 Sep 2020 15:42:47 +0000 Subject: [PATCH 146/277] fixed Tab Order --- instat/dlgSeasonalPlot.Designer.vb | 130 ++++++++++++++--------------- 1 file changed, 65 insertions(+), 65 deletions(-) diff --git a/instat/dlgSeasonalPlot.Designer.vb b/instat/dlgSeasonalPlot.Designer.vb index c04bd29e878..cca230f0c8a 100644 --- a/instat/dlgSeasonalPlot.Designer.vb +++ b/instat/dlgSeasonalPlot.Designer.vb @@ -35,7 +35,11 @@ Partial Class dlgSeasonalPlot Me.ucrChkPoints = New instat.ucrCheck() Me.ucrChkMovingAverage = New instat.ucrCheck() Me.grpSmoothing = New System.Windows.Forms.GroupBox() + Me.ucrNudSpan = New instat.ucrNud() + Me.lblSpan = New System.Windows.Forms.Label() + Me.lblDf = New System.Windows.Forms.Label() Me.lblPeriod = New System.Windows.Forms.Label() + Me.ucrNudDf = New instat.ucrNud() Me.lblHarmonics = New System.Windows.Forms.Label() Me.ucrNudPeriod = New instat.ucrNud() Me.ucrNudHarmonics = New instat.ucrNud() @@ -51,10 +55,6 @@ Partial Class dlgSeasonalPlot Me.lblStation = New System.Windows.Forms.Label() Me.lblReference = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() - Me.ucrNudSpan = New instat.ucrNud() - Me.ucrNudDf = New instat.ucrNud() - Me.lblSpan = New System.Windows.Forms.Label() - Me.lblDf = New System.Windows.Forms.Label() Me.grpValues.SuspendLayout() Me.grpSmoothing.SuspendLayout() Me.SuspendLayout() @@ -64,7 +64,7 @@ Partial Class dlgSeasonalPlot Me.ucrBase.Location = New System.Drawing.Point(12, 429) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) - Me.ucrBase.TabIndex = 0 + Me.ucrBase.TabIndex = 19 ' 'ucrSelectorSeasonalityComparisons ' @@ -75,7 +75,7 @@ Partial Class dlgSeasonalPlot Me.ucrSelectorSeasonalityComparisons.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorSeasonalityComparisons.Name = "ucrSelectorSeasonalityComparisons" Me.ucrSelectorSeasonalityComparisons.Size = New System.Drawing.Size(210, 180) - Me.ucrSelectorSeasonalityComparisons.TabIndex = 1 + Me.ucrSelectorSeasonalityComparisons.TabIndex = 0 ' 'ucrReceiverReference ' @@ -98,7 +98,7 @@ Partial Class dlgSeasonalPlot Me.ucrReceiverStation.Selector = Nothing Me.ucrReceiverStation.Size = New System.Drawing.Size(143, 20) Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 3 + Me.ucrReceiverStation.TabIndex = 14 Me.ucrReceiverStation.ucrSelector = Nothing ' 'ucrReceiverSeasonality @@ -110,7 +110,7 @@ Partial Class dlgSeasonalPlot Me.ucrReceiverSeasonality.Selector = Nothing Me.ucrReceiverSeasonality.Size = New System.Drawing.Size(143, 20) Me.ucrReceiverSeasonality.strNcFilePath = "" - Me.ucrReceiverSeasonality.TabIndex = 4 + Me.ucrReceiverSeasonality.TabIndex = 12 Me.ucrReceiverSeasonality.ucrSelector = Nothing ' 'ucrReceiverEstimate @@ -122,7 +122,7 @@ Partial Class dlgSeasonalPlot Me.ucrReceiverEstimate.Selector = Nothing Me.ucrReceiverEstimate.Size = New System.Drawing.Size(143, 20) Me.ucrReceiverEstimate.strNcFilePath = "" - Me.ucrReceiverEstimate.TabIndex = 5 + Me.ucrReceiverEstimate.TabIndex = 7 Me.ucrReceiverEstimate.ucrSelector = Nothing ' 'ucrChkRemoveMissing @@ -131,7 +131,7 @@ Partial Class dlgSeasonalPlot Me.ucrChkRemoveMissing.Location = New System.Drawing.Point(22, 219) Me.ucrChkRemoveMissing.Name = "ucrChkRemoveMissing" Me.ucrChkRemoveMissing.Size = New System.Drawing.Size(197, 20) - Me.ucrChkRemoveMissing.TabIndex = 6 + Me.ucrChkRemoveMissing.TabIndex = 15 ' 'grpValues ' @@ -142,7 +142,7 @@ Partial Class dlgSeasonalPlot Me.grpValues.Location = New System.Drawing.Point(12, 242) Me.grpValues.Name = "grpValues" Me.grpValues.Size = New System.Drawing.Size(232, 71) - Me.grpValues.TabIndex = 7 + Me.grpValues.TabIndex = 16 Me.grpValues.TabStop = False Me.grpValues.Text = "Values" ' @@ -195,10 +195,40 @@ Partial Class dlgSeasonalPlot Me.grpSmoothing.Location = New System.Drawing.Point(12, 317) Me.grpSmoothing.Name = "grpSmoothing" Me.grpSmoothing.Size = New System.Drawing.Size(243, 75) - Me.grpSmoothing.TabIndex = 8 + Me.grpSmoothing.TabIndex = 17 Me.grpSmoothing.TabStop = False Me.grpSmoothing.Text = "Smoothing" ' + 'ucrNudSpan + ' + Me.ucrNudSpan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSpan.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSpan.Location = New System.Drawing.Point(53, 45) + Me.ucrNudSpan.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSpan.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSpan.Name = "ucrNudSpan" + Me.ucrNudSpan.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSpan.TabIndex = 20 + Me.ucrNudSpan.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblSpan + ' + Me.lblSpan.AutoSize = True + Me.lblSpan.Location = New System.Drawing.Point(15, 49) + Me.lblSpan.Name = "lblSpan" + Me.lblSpan.Size = New System.Drawing.Size(35, 13) + Me.lblSpan.TabIndex = 23 + Me.lblSpan.Text = "Span:" + ' + 'lblDf + ' + Me.lblDf.AutoSize = True + Me.lblDf.Location = New System.Drawing.Point(12, 49) + Me.lblDf.Name = "lblDf" + Me.lblDf.Size = New System.Drawing.Size(103, 13) + Me.lblDf.TabIndex = 24 + Me.lblDf.Text = "Degrees of freedom:" + ' 'lblPeriod ' Me.lblPeriod.AutoSize = True @@ -208,6 +238,18 @@ Partial Class dlgSeasonalPlot Me.lblPeriod.TabIndex = 18 Me.lblPeriod.Text = "Periods:" ' + 'ucrNudDf + ' + Me.ucrNudDf.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDf.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudDf.Location = New System.Drawing.Point(117, 46) + Me.ucrNudDf.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDf.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDf.Name = "ucrNudDf" + Me.ucrNudDf.Size = New System.Drawing.Size(50, 20) + Me.ucrNudDf.TabIndex = 21 + Me.ucrNudDf.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'lblHarmonics ' Me.lblHarmonics.AutoSize = True @@ -257,7 +299,7 @@ Partial Class dlgSeasonalPlot Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveGraph.Name = "ucrSaveGraph" Me.ucrSaveGraph.Size = New System.Drawing.Size(255, 29) - Me.ucrSaveGraph.TabIndex = 9 + Me.ucrSaveGraph.TabIndex = 18 ' 'ucrInputEstimateSummary ' @@ -267,7 +309,7 @@ Partial Class dlgSeasonalPlot Me.ucrInputEstimateSummary.Location = New System.Drawing.Point(266, 175) Me.ucrInputEstimateSummary.Name = "ucrInputEstimateSummary" Me.ucrInputEstimateSummary.Size = New System.Drawing.Size(93, 21) - Me.ucrInputEstimateSummary.TabIndex = 10 + Me.ucrInputEstimateSummary.TabIndex = 9 ' 'ucrInputReferenceSummary ' @@ -277,7 +319,7 @@ Partial Class dlgSeasonalPlot Me.ucrInputReferenceSummary.Location = New System.Drawing.Point(266, 82) Me.ucrInputReferenceSummary.Name = "ucrInputReferenceSummary" Me.ucrInputReferenceSummary.Size = New System.Drawing.Size(89, 21) - Me.ucrInputReferenceSummary.TabIndex = 11 + Me.ucrInputReferenceSummary.TabIndex = 4 ' 'ucrInputReferenceThreshold ' @@ -287,7 +329,7 @@ Partial Class dlgSeasonalPlot Me.ucrInputReferenceThreshold.Location = New System.Drawing.Point(356, 82) Me.ucrInputReferenceThreshold.Name = "ucrInputReferenceThreshold" Me.ucrInputReferenceThreshold.Size = New System.Drawing.Size(53, 21) - Me.ucrInputReferenceThreshold.TabIndex = 12 + Me.ucrInputReferenceThreshold.TabIndex = 5 ' 'ucrInputEstimateThreshold ' @@ -297,7 +339,7 @@ Partial Class dlgSeasonalPlot Me.ucrInputEstimateThreshold.Location = New System.Drawing.Point(361, 175) Me.ucrInputEstimateThreshold.Name = "ucrInputEstimateThreshold" Me.ucrInputEstimateThreshold.Size = New System.Drawing.Size(48, 21) - Me.ucrInputEstimateThreshold.TabIndex = 13 + Me.ucrInputEstimateThreshold.TabIndex = 10 ' 'lblRefSummary ' @@ -305,7 +347,7 @@ Partial Class dlgSeasonalPlot Me.lblRefSummary.Location = New System.Drawing.Point(266, 66) Me.lblRefSummary.Name = "lblRefSummary" Me.lblRefSummary.Size = New System.Drawing.Size(53, 13) - Me.lblRefSummary.TabIndex = 14 + Me.lblRefSummary.TabIndex = 3 Me.lblRefSummary.Text = "Summary:" ' 'lblEstSummary @@ -314,7 +356,7 @@ Partial Class dlgSeasonalPlot Me.lblEstSummary.Location = New System.Drawing.Point(266, 159) Me.lblEstSummary.Name = "lblEstSummary" Me.lblEstSummary.Size = New System.Drawing.Size(53, 13) - Me.lblEstSummary.TabIndex = 15 + Me.lblEstSummary.TabIndex = 8 Me.lblEstSummary.Text = "Summary:" ' 'lblSeasonality @@ -323,7 +365,7 @@ Partial Class dlgSeasonalPlot Me.lblSeasonality.Location = New System.Drawing.Point(266, 206) Me.lblSeasonality.Name = "lblSeasonality" Me.lblSeasonality.Size = New System.Drawing.Size(64, 13) - Me.lblSeasonality.TabIndex = 16 + Me.lblSeasonality.TabIndex = 11 Me.lblSeasonality.Text = "Seasonality:" ' 'lblStation @@ -332,7 +374,7 @@ Partial Class dlgSeasonalPlot Me.lblStation.Location = New System.Drawing.Point(266, 252) Me.lblStation.Name = "lblStation" Me.lblStation.Size = New System.Drawing.Size(43, 13) - Me.lblStation.TabIndex = 17 + Me.lblStation.TabIndex = 13 Me.lblStation.Text = "Station:" ' 'lblReference @@ -341,7 +383,7 @@ Partial Class dlgSeasonalPlot Me.lblReference.Location = New System.Drawing.Point(266, 20) Me.lblReference.Name = "lblReference" Me.lblReference.Size = New System.Drawing.Size(60, 13) - Me.lblReference.TabIndex = 20 + Me.lblReference.TabIndex = 1 Me.lblReference.Text = "Reference:" ' 'lblEstimate @@ -350,51 +392,9 @@ Partial Class dlgSeasonalPlot Me.lblEstimate.Location = New System.Drawing.Point(266, 113) Me.lblEstimate.Name = "lblEstimate" Me.lblEstimate.Size = New System.Drawing.Size(50, 13) - Me.lblEstimate.TabIndex = 22 + Me.lblEstimate.TabIndex = 6 Me.lblEstimate.Text = "Estimate:" ' - 'ucrNudSpan - ' - Me.ucrNudSpan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSpan.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSpan.Location = New System.Drawing.Point(53, 45) - Me.ucrNudSpan.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudSpan.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSpan.Name = "ucrNudSpan" - Me.ucrNudSpan.Size = New System.Drawing.Size(50, 20) - Me.ucrNudSpan.TabIndex = 20 - Me.ucrNudSpan.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudDf - ' - Me.ucrNudDf.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDf.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDf.Location = New System.Drawing.Point(117, 46) - Me.ucrNudDf.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudDf.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDf.Name = "ucrNudDf" - Me.ucrNudDf.Size = New System.Drawing.Size(50, 20) - Me.ucrNudDf.TabIndex = 21 - Me.ucrNudDf.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblSpan - ' - Me.lblSpan.AutoSize = True - Me.lblSpan.Location = New System.Drawing.Point(15, 49) - Me.lblSpan.Name = "lblSpan" - Me.lblSpan.Size = New System.Drawing.Size(35, 13) - Me.lblSpan.TabIndex = 23 - Me.lblSpan.Text = "Span:" - ' - 'lblDf - ' - Me.lblDf.AutoSize = True - Me.lblDf.Location = New System.Drawing.Point(12, 49) - Me.lblDf.Name = "lblDf" - Me.lblDf.Size = New System.Drawing.Size(103, 13) - Me.lblDf.TabIndex = 24 - Me.lblDf.Text = "Degrees of freedom:" - ' 'dlgSeasonalPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) From d9cb572498e5118cc84ac7d92f2faa6c0dfa9be3 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Thu, 17 Sep 2020 21:38:36 +0300 Subject: [PATCH 147/277] Bug fixes --- instat/dlgSeasonalPlot.Designer.vb | 34 +++++++++++++++--------------- instat/dlgSeasonalPlot.vb | 18 ++++++++++------ 2 files changed, 28 insertions(+), 24 deletions(-) diff --git a/instat/dlgSeasonalPlot.Designer.vb b/instat/dlgSeasonalPlot.Designer.vb index cca230f0c8a..c65f6561b42 100644 --- a/instat/dlgSeasonalPlot.Designer.vb +++ b/instat/dlgSeasonalPlot.Designer.vb @@ -151,7 +151,7 @@ Partial Class dlgSeasonalPlot Me.ucrInputN.AddQuotesIfUnrecognised = True Me.ucrInputN.IsMultiline = False Me.ucrInputN.IsReadOnly = False - Me.ucrInputN.Location = New System.Drawing.Point(167, 41) + Me.ucrInputN.Location = New System.Drawing.Point(149, 41) Me.ucrInputN.Name = "ucrInputN" Me.ucrInputN.Size = New System.Drawing.Size(47, 21) Me.ucrInputN.TabIndex = 23 @@ -159,7 +159,7 @@ Partial Class dlgSeasonalPlot 'lblN ' Me.lblN.AutoSize = True - Me.lblN.Location = New System.Drawing.Point(148, 45) + Me.lblN.Location = New System.Drawing.Point(130, 43) Me.lblN.Name = "lblN" Me.lblN.Size = New System.Drawing.Size(16, 13) Me.lblN.TabIndex = 21 @@ -178,20 +178,20 @@ Partial Class dlgSeasonalPlot Me.ucrChkMovingAverage.Checked = False Me.ucrChkMovingAverage.Location = New System.Drawing.Point(8, 41) Me.ucrChkMovingAverage.Name = "ucrChkMovingAverage" - Me.ucrChkMovingAverage.Size = New System.Drawing.Size(134, 20) + Me.ucrChkMovingAverage.Size = New System.Drawing.Size(121, 20) Me.ucrChkMovingAverage.TabIndex = 7 ' 'grpSmoothing ' Me.grpSmoothing.Controls.Add(Me.ucrNudSpan) Me.grpSmoothing.Controls.Add(Me.lblSpan) - Me.grpSmoothing.Controls.Add(Me.lblDf) - Me.grpSmoothing.Controls.Add(Me.lblPeriod) Me.grpSmoothing.Controls.Add(Me.ucrNudDf) Me.grpSmoothing.Controls.Add(Me.lblHarmonics) - Me.grpSmoothing.Controls.Add(Me.ucrNudPeriod) + Me.grpSmoothing.Controls.Add(Me.lblDf) Me.grpSmoothing.Controls.Add(Me.ucrNudHarmonics) Me.grpSmoothing.Controls.Add(Me.ucrInputSmoothing) + Me.grpSmoothing.Controls.Add(Me.lblPeriod) + Me.grpSmoothing.Controls.Add(Me.ucrNudPeriod) Me.grpSmoothing.Location = New System.Drawing.Point(12, 317) Me.grpSmoothing.Name = "grpSmoothing" Me.grpSmoothing.Size = New System.Drawing.Size(243, 75) @@ -203,7 +203,7 @@ Partial Class dlgSeasonalPlot ' Me.ucrNudSpan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSpan.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSpan.Location = New System.Drawing.Point(53, 45) + Me.ucrNudSpan.Location = New System.Drawing.Point(45, 49) Me.ucrNudSpan.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudSpan.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSpan.Name = "ucrNudSpan" @@ -214,7 +214,7 @@ Partial Class dlgSeasonalPlot 'lblSpan ' Me.lblSpan.AutoSize = True - Me.lblSpan.Location = New System.Drawing.Point(15, 49) + Me.lblSpan.Location = New System.Drawing.Point(7, 52) Me.lblSpan.Name = "lblSpan" Me.lblSpan.Size = New System.Drawing.Size(35, 13) Me.lblSpan.TabIndex = 23 @@ -223,7 +223,7 @@ Partial Class dlgSeasonalPlot 'lblDf ' Me.lblDf.AutoSize = True - Me.lblDf.Location = New System.Drawing.Point(12, 49) + Me.lblDf.Location = New System.Drawing.Point(6, 51) Me.lblDf.Name = "lblDf" Me.lblDf.Size = New System.Drawing.Size(103, 13) Me.lblDf.TabIndex = 24 @@ -232,17 +232,17 @@ Partial Class dlgSeasonalPlot 'lblPeriod ' Me.lblPeriod.AutoSize = True - Me.lblPeriod.Location = New System.Drawing.Point(128, 49) + Me.lblPeriod.Location = New System.Drawing.Point(123, 52) Me.lblPeriod.Name = "lblPeriod" - Me.lblPeriod.Size = New System.Drawing.Size(45, 13) + Me.lblPeriod.Size = New System.Drawing.Size(40, 13) Me.lblPeriod.TabIndex = 18 - Me.lblPeriod.Text = "Periods:" + Me.lblPeriod.Text = "Period:" ' 'ucrNudDf ' Me.ucrNudDf.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDf.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDf.Location = New System.Drawing.Point(117, 46) + Me.ucrNudDf.Location = New System.Drawing.Point(110, 49) Me.ucrNudDf.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudDf.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudDf.Name = "ucrNudDf" @@ -253,7 +253,7 @@ Partial Class dlgSeasonalPlot 'lblHarmonics ' Me.lblHarmonics.AutoSize = True - Me.lblHarmonics.Location = New System.Drawing.Point(12, 49) + Me.lblHarmonics.Location = New System.Drawing.Point(6, 52) Me.lblHarmonics.Name = "lblHarmonics" Me.lblHarmonics.Size = New System.Drawing.Size(60, 13) Me.lblHarmonics.TabIndex = 19 @@ -263,7 +263,7 @@ Partial Class dlgSeasonalPlot ' Me.ucrNudPeriod.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudPeriod.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPeriod.Location = New System.Drawing.Point(176, 45) + Me.ucrNudPeriod.Location = New System.Drawing.Point(166, 49) Me.ucrNudPeriod.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudPeriod.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudPeriod.Name = "ucrNudPeriod" @@ -275,7 +275,7 @@ Partial Class dlgSeasonalPlot ' Me.ucrNudHarmonics.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudHarmonics.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHarmonics.Location = New System.Drawing.Point(74, 46) + Me.ucrNudHarmonics.Location = New System.Drawing.Point(70, 49) Me.ucrNudHarmonics.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudHarmonics.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudHarmonics.Name = "ucrNudHarmonics" @@ -288,7 +288,7 @@ Partial Class dlgSeasonalPlot Me.ucrInputSmoothing.AddQuotesIfUnrecognised = True Me.ucrInputSmoothing.GetSetSelectedIndex = -1 Me.ucrInputSmoothing.IsReadOnly = False - Me.ucrInputSmoothing.Location = New System.Drawing.Point(10, 20) + Me.ucrInputSmoothing.Location = New System.Drawing.Point(7, 20) Me.ucrInputSmoothing.Name = "ucrInputSmoothing" Me.ucrInputSmoothing.Size = New System.Drawing.Size(119, 21) Me.ucrInputSmoothing.TabIndex = 0 diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index cc55b5d82e7..18a0670bb1d 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -59,6 +59,8 @@ Public Class dlgSeasonalPlot ucrReceiverSeasonality.SetParameter(New RParameter("seasonality", 2, bNewIncludeArgumentName:=False)) ucrReceiverSeasonality.Selector = ucrSelectorSeasonalityComparisons ucrReceiverSeasonality.SetParameterIsRFunction() + ucrReceiverSeasonality.SetClimaticType("doy") + ucrReceiverSeasonality.bAutoFill = True ucrReceiverStation.SetParameter(New RParameter("station", 0, bNewIncludeArgumentName:=False)) ucrReceiverStation.Selector = ucrSelectorSeasonalityComparisons @@ -142,6 +144,7 @@ Public Class dlgSeasonalPlot clsEstLessOperator = New ROperator clsDivideOperator = New ROperator + clsPlusOperator = New ROperator clsFacetWrapTildeOperator = New ROperator clsPbsSplinesTildeOperator = New ROperator @@ -177,8 +180,8 @@ Public Class dlgSeasonalPlot ucrSelectorSeasonalityComparisons.Reset() ucrReceiverReference.SetMeAsReceiver() - ucrInputEstimateSummary.cboInput.SelectedItem = "Prop Above" - ucrInputReferenceSummary.cboInput.SelectedItem = "Prop Above" + ucrInputEstimateSummary.cboInput.SelectedItem = "Mean" + ucrInputReferenceSummary.cboInput.SelectedItem = "Mean" ucrInputSmoothing.cboInput.SelectedItem = "Fourier Series" clsPipeOperator.SetOperation("%>%") @@ -271,6 +274,7 @@ Public Class dlgSeasonalPlot clsPlusOperator.SetOperation("+") clsPlusOperator.AddParameter("ggplot", clsRFunctionParameter:=clsGgplotFunction, iPosition:=0) + clsPlusOperator.AddParameter("geom_line", clsRFunctionParameter:=clsGeomLineFunction, iPosition:=2) clsPlusOperator.AddParameter("geom_smooth", clsRFunctionParameter:=clsGeomSmoothFunction, iPosition:=3) clsFacetWrapTildeOperator.SetOperation("~") @@ -289,7 +293,7 @@ Public Class dlgSeasonalPlot clsGeomSmoothFunction.SetPackageName("ggplot2") clsGeomSmoothFunction.SetRCommand("geom_smooth") clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) - clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) clsGeomSmoothFunction.AddParameter("se", "FALSE", iPosition:=3) clsGeomSmoothFunction.AddParameter("span", 0.5, iPosition:=4) @@ -435,7 +439,7 @@ Public Class dlgSeasonalPlot If ucrChkPoints.Checked Then clsPlusOperator.AddParameter("geom_point", clsRFunctionParameter:=clsGeomPointFunction, iPosition:=1) Else - clsPlusOperator.RemoveParameterByName("ggplot") + clsPlusOperator.RemoveParameterByName("geom_point") End If End Sub @@ -443,18 +447,18 @@ Public Class dlgSeasonalPlot Select Case ucrInputSmoothing.GetText Case "Fourier Series" clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) - clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) clsGeomSmoothFunction.AddParameter("formula", clsRFunctionParameter:=clsAsFormulaFunction, iPosition:=1) Case "Periodic Splines" clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) - clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) clsPbsSplinesTildeOperator.AddParameter("pbs", clsRFunctionParameter:=clsPbsFunction, iPosition:=1) clsPbsSplinesTildeOperator.RemoveParameterByName("ns") clsPbsSplinesTildeOperator.RemoveParameterByName("x") clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) Case "Natural Splines" clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) - clsGeomLineAesFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") clsPbsSplinesTildeOperator.RemoveParameterByName("x") clsPbsSplinesTildeOperator.AddParameter("ns", clsRFunctionParameter:=clsNsFunction, iPosition:=1) From ad88e16b9a262b76363467808cd001d952befa57 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 17 Sep 2020 20:16:04 +0100 Subject: [PATCH 148/277] basic dialog functionality working for simepl graph --- instat/dlgTimeSeriesPlot.Designer.vb | 188 +++++++++++++-------------- instat/dlgTimeSeriesPlot.vb | 57 ++++++-- 2 files changed, 140 insertions(+), 105 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb index 85d23c3b536..7b735e59a78 100644 --- a/instat/dlgTimeSeriesPlot.Designer.vb +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -22,41 +22,23 @@ Partial Class dlgTimeSeriesPlot 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.ucrBase = New instat.ucrButtons() - Me.ucrSelectorTimeSeriesPlots = New instat.ucrSelectorByDataFrameAddRemove() Me.lblReferenceValues = New System.Windows.Forms.Label() - Me.ucrReceiverReference = New instat.ucrReceiverSingle() - Me.ucrReceiverEstimates = New instat.ucrReceiverSingle() Me.lblEstimates = New System.Windows.Forms.Label() Me.lblTime = New System.Windows.Forms.Label() - Me.ucrReceiverTime = New instat.ucrReceiverSingle() Me.lblStation = New System.Windows.Forms.Label() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() - Me.ucrChkNAValues = New instat.ucrCheck() - Me.ucrChkIncludeMeanLines = New instat.ucrCheck() - Me.ucrChkIncludePoints = New instat.ucrCheck() Me.cmdSummaries = New System.Windows.Forms.Button() Me.ucrSavePlot = New instat.ucrSave() + Me.ucrChkIncludePoints = New instat.ucrCheck() + Me.ucrChkIncludeMeanLines = New instat.ucrCheck() + Me.ucrChkNAValues = New instat.ucrCheck() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverTime = New instat.ucrReceiverSingle() + Me.ucrReceiverEstimates = New instat.ucrReceiverSingle() + Me.ucrReceiverReference = New instat.ucrReceiverSingle() + Me.ucrSelectorTimeSeriesPlots = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() Me.SuspendLayout() ' - 'ucrBase - ' - Me.ucrBase.Location = New System.Drawing.Point(10, 428) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) - Me.ucrBase.TabIndex = 14 - ' - 'ucrSelectorTimeSeriesPlots - ' - Me.ucrSelectorTimeSeriesPlots.bDropUnusedFilterLevels = False - Me.ucrSelectorTimeSeriesPlots.bShowHiddenColumns = False - Me.ucrSelectorTimeSeriesPlots.bUseCurrentFilter = True - Me.ucrSelectorTimeSeriesPlots.Location = New System.Drawing.Point(12, 9) - Me.ucrSelectorTimeSeriesPlots.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorTimeSeriesPlots.Name = "ucrSelectorTimeSeriesPlots" - Me.ucrSelectorTimeSeriesPlots.Size = New System.Drawing.Size(218, 180) - Me.ucrSelectorTimeSeriesPlots.TabIndex = 0 - ' 'lblReferenceValues ' Me.lblReferenceValues.AutoSize = True @@ -66,30 +48,6 @@ Partial Class dlgTimeSeriesPlot Me.lblReferenceValues.TabIndex = 1 Me.lblReferenceValues.Text = "Reference Values:" ' - 'ucrReceiverReference - ' - Me.ucrReceiverReference.frmParent = Me - Me.ucrReceiverReference.Location = New System.Drawing.Point(286, 39) - Me.ucrReceiverReference.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverReference.Name = "ucrReceiverReference" - Me.ucrReceiverReference.Selector = Nothing - Me.ucrReceiverReference.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverReference.strNcFilePath = "" - Me.ucrReceiverReference.TabIndex = 2 - Me.ucrReceiverReference.ucrSelector = Nothing - ' - 'ucrReceiverEstimates - ' - Me.ucrReceiverEstimates.frmParent = Me - Me.ucrReceiverEstimates.Location = New System.Drawing.Point(286, 86) - Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" - Me.ucrReceiverEstimates.Selector = Nothing - Me.ucrReceiverEstimates.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverEstimates.strNcFilePath = "" - Me.ucrReceiverEstimates.TabIndex = 4 - Me.ucrReceiverEstimates.ucrSelector = Nothing - ' 'lblEstimates ' Me.lblEstimates.AutoSize = True @@ -108,18 +66,6 @@ Partial Class dlgTimeSeriesPlot Me.lblTime.TabIndex = 5 Me.lblTime.Text = "Time (X axis):" ' - 'ucrReceiverTime - ' - Me.ucrReceiverTime.frmParent = Me - Me.ucrReceiverTime.Location = New System.Drawing.Point(286, 133) - Me.ucrReceiverTime.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverTime.Name = "ucrReceiverTime" - Me.ucrReceiverTime.Selector = Nothing - Me.ucrReceiverTime.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverTime.strNcFilePath = "" - Me.ucrReceiverTime.TabIndex = 6 - Me.ucrReceiverTime.ucrSelector = Nothing - ' 'lblStation ' Me.lblStation.AutoSize = True @@ -129,6 +75,47 @@ Partial Class dlgTimeSeriesPlot Me.lblStation.TabIndex = 7 Me.lblStation.Text = "Station:" ' + 'cmdSummaries + ' + Me.cmdSummaries.Location = New System.Drawing.Point(9, 345) + Me.cmdSummaries.Name = "cmdSummaries" + Me.cmdSummaries.Size = New System.Drawing.Size(75, 23) + Me.cmdSummaries.TabIndex = 12 + Me.cmdSummaries.Text = "Summaries" + Me.cmdSummaries.UseVisualStyleBackColor = True + ' + 'ucrSavePlot + ' + Me.ucrSavePlot.Location = New System.Drawing.Point(10, 385) + Me.ucrSavePlot.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSavePlot.Name = "ucrSavePlot" + Me.ucrSavePlot.Size = New System.Drawing.Size(403, 34) + Me.ucrSavePlot.TabIndex = 15 + ' + 'ucrChkIncludePoints + ' + Me.ucrChkIncludePoints.Checked = False + Me.ucrChkIncludePoints.Location = New System.Drawing.Point(10, 279) + Me.ucrChkIncludePoints.Name = "ucrChkIncludePoints" + Me.ucrChkIncludePoints.Size = New System.Drawing.Size(147, 20) + Me.ucrChkIncludePoints.TabIndex = 10 + ' + 'ucrChkIncludeMeanLines + ' + Me.ucrChkIncludeMeanLines.Checked = False + Me.ucrChkIncludeMeanLines.Location = New System.Drawing.Point(10, 316) + Me.ucrChkIncludeMeanLines.Name = "ucrChkIncludeMeanLines" + Me.ucrChkIncludeMeanLines.Size = New System.Drawing.Size(147, 20) + Me.ucrChkIncludeMeanLines.TabIndex = 11 + ' + 'ucrChkNAValues + ' + Me.ucrChkNAValues.Checked = False + Me.ucrChkNAValues.Location = New System.Drawing.Point(10, 242) + Me.ucrChkNAValues.Name = "ucrChkNAValues" + Me.ucrChkNAValues.Size = New System.Drawing.Size(272, 20) + Me.ucrChkNAValues.TabIndex = 9 + ' 'ucrReceiverStation ' Me.ucrReceiverStation.frmParent = Me @@ -141,46 +128,59 @@ Partial Class dlgTimeSeriesPlot Me.ucrReceiverStation.TabIndex = 8 Me.ucrReceiverStation.ucrSelector = Nothing ' - 'ucrChkNAValues + 'ucrReceiverTime ' - Me.ucrChkNAValues.Checked = False - Me.ucrChkNAValues.Location = New System.Drawing.Point(10, 242) - Me.ucrChkNAValues.Name = "ucrChkNAValues" - Me.ucrChkNAValues.Size = New System.Drawing.Size(100, 20) - Me.ucrChkNAValues.TabIndex = 9 + Me.ucrReceiverTime.frmParent = Me + Me.ucrReceiverTime.Location = New System.Drawing.Point(286, 133) + Me.ucrReceiverTime.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverTime.Name = "ucrReceiverTime" + Me.ucrReceiverTime.Selector = Nothing + Me.ucrReceiverTime.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverTime.strNcFilePath = "" + Me.ucrReceiverTime.TabIndex = 6 + Me.ucrReceiverTime.ucrSelector = Nothing ' - 'ucrChkIncludeMeanLines + 'ucrReceiverEstimates ' - Me.ucrChkIncludeMeanLines.Checked = False - Me.ucrChkIncludeMeanLines.Location = New System.Drawing.Point(10, 316) - Me.ucrChkIncludeMeanLines.Name = "ucrChkIncludeMeanLines" - Me.ucrChkIncludeMeanLines.Size = New System.Drawing.Size(100, 20) - Me.ucrChkIncludeMeanLines.TabIndex = 11 + Me.ucrReceiverEstimates.frmParent = Me + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(286, 86) + Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" + Me.ucrReceiverEstimates.Selector = Nothing + Me.ucrReceiverEstimates.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverEstimates.strNcFilePath = "" + Me.ucrReceiverEstimates.TabIndex = 4 + Me.ucrReceiverEstimates.ucrSelector = Nothing ' - 'ucrChkIncludePoints + 'ucrReceiverReference ' - Me.ucrChkIncludePoints.Checked = False - Me.ucrChkIncludePoints.Location = New System.Drawing.Point(10, 279) - Me.ucrChkIncludePoints.Name = "ucrChkIncludePoints" - Me.ucrChkIncludePoints.Size = New System.Drawing.Size(100, 20) - Me.ucrChkIncludePoints.TabIndex = 10 + Me.ucrReceiverReference.frmParent = Me + Me.ucrReceiverReference.Location = New System.Drawing.Point(286, 39) + Me.ucrReceiverReference.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverReference.Name = "ucrReceiverReference" + Me.ucrReceiverReference.Selector = Nothing + Me.ucrReceiverReference.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverReference.strNcFilePath = "" + Me.ucrReceiverReference.TabIndex = 2 + Me.ucrReceiverReference.ucrSelector = Nothing ' - 'cmdSummaries + 'ucrSelectorTimeSeriesPlots ' - Me.cmdSummaries.Location = New System.Drawing.Point(9, 345) - Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(75, 23) - Me.cmdSummaries.TabIndex = 12 - Me.cmdSummaries.Text = "Summaries" - Me.cmdSummaries.UseVisualStyleBackColor = True + Me.ucrSelectorTimeSeriesPlots.bDropUnusedFilterLevels = False + Me.ucrSelectorTimeSeriesPlots.bShowHiddenColumns = False + Me.ucrSelectorTimeSeriesPlots.bUseCurrentFilter = True + Me.ucrSelectorTimeSeriesPlots.Location = New System.Drawing.Point(12, 9) + Me.ucrSelectorTimeSeriesPlots.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorTimeSeriesPlots.Name = "ucrSelectorTimeSeriesPlots" + Me.ucrSelectorTimeSeriesPlots.Size = New System.Drawing.Size(218, 180) + Me.ucrSelectorTimeSeriesPlots.TabIndex = 0 ' - 'ucrSavePlot + 'ucrBase ' - Me.ucrSavePlot.Location = New System.Drawing.Point(10, 385) - Me.ucrSavePlot.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSavePlot.Name = "ucrSavePlot" - Me.ucrSavePlot.Size = New System.Drawing.Size(403, 34) - Me.ucrSavePlot.TabIndex = 15 + Me.ucrBase.Location = New System.Drawing.Point(10, 428) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 14 ' 'dlgTimeSeriesPlot ' diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 48d9298405a..2db0b83b2ef 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -66,6 +66,7 @@ Public Class dlgTimeSeriesPlot Private clsXScaleContinuousFunction As New RFunction Private clsYScaleContinuousFunction As New RFunction Private clsFacetFunction As New RFunction + Private clsFacetOperator As New ROperator Private clsThemeFunction As New RFunction Private dctThemeFunctions As Dictionary(Of String, RFunction) @@ -92,6 +93,8 @@ Public Class dlgTimeSeriesPlot Private Sub InitialiseDialog() 'ucrBase.iHelpTopicID = + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False + ucrBase.clsRsyntax.iCallType = 3 ucrSelectorTimeSeriesPlots.SetParameter(New RParameter("0", 0)) ucrSelectorTimeSeriesPlots.SetParameterIsrfunction() @@ -108,8 +111,10 @@ Public Class dlgTimeSeriesPlot ucrReceiverTime.SetParameter(New RParameter("x", 0)) ucrReceiverTime.Selector = ucrSelectorTimeSeriesPlots + ucrReceiverTime.SetParameterIsString() + ucrReceiverTime.bWithQuotes = False - ucrReceiverStation.SetParameter(New RParameter("0", 0)) + ucrReceiverStation.SetParameter(New RParameter("0", 0, bNewIncludeArgumentName:=False)) ucrReceiverStation.Selector = ucrSelectorTimeSeriesPlots ucrReceiverStation.SetParameterIsString() ucrReceiverStation.bWithQuotes = False @@ -119,6 +124,12 @@ Public Class dlgTimeSeriesPlot ucrChkNAValues.SetText("Remove rows with any missing values") ucrChkNAValues.SetParameter(clsAdjustNAMutateParameter, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrChkIncludePoints.SetText("Include Points") + ucrChkIncludePoints.Enabled = False + + ucrChkIncludeMeanLines.SetText("Include Mean Lines") + ucrChkIncludeMeanLines.Enabled = False + ucrSavePlot.SetPrefix("line") ucrSavePlot.SetIsComboBox() ucrSavePlot.SetCheckBoxText("Save Graph") @@ -149,16 +160,19 @@ Public Class dlgTimeSeriesPlot clsGeomLine = New RFunction clsGeomPoint = New RFunction clsGeomHLine = New RFunction + clsGeomHLineAes = New RFunction clsGeomText = New RFunction + clsGeomTextAes = New RFunction ucrSelectorTimeSeriesPlots.Reset() ucrSelectorTimeSeriesPlots.SetGgplotFunction(clsGgplotOperator) + ucrReceiverReference.SetMeAsReceiver() + ' Adjust NA values - SetDataFrameAssignTo() clsAdjustNAOperator.SetOperation("%>%") - clsAdjustNAOperator.AddParameter("1", clsRFunctionParameter:=clsAdjustNAMutate, iPosition:=1) + clsAdjustNAOperator.AddParameter(clsAdjustNAMutateParameter) clsAdjustNAMutate.Clear() clsAdjustNAMutate.SetPackageName("dplyr") @@ -180,6 +194,7 @@ Public Class dlgTimeSeriesPlot clsStackOperator.SetOperation("%>%") clsStackOperator.AddParameter("0", clsROperatorParameter:=clsAdjustNAOperator, iPosition:=0) clsStackOperator.AddParameter("1", clsRFunctionParameter:=clsPivotLonger, iPosition:=1) + clsStackOperator.bBrackets = False clsPivotLonger.SetPackageName("tidyr") clsPivotLonger.SetRCommand("pivot_longer") @@ -192,13 +207,14 @@ Public Class dlgTimeSeriesPlot ' Calculate means clsMeansOperator.SetOperation("%>%") - clsMeansOperator.AddParameter("0", clsRFunctionParameter:=clsPivotLonger, iPosition:=0) + clsMeansOperator.AddParameter("0", clsROperatorParameter:=clsStackOperator, iPosition:=0) clsMeansOperator.AddParameter("1", clsRFunctionParameter:=clsMeansGroupBy, iPosition:=1) - clsMeansOperator.AddParameter("1", clsRFunctionParameter:=clsMeansSummarise, iPosition:=2) + clsMeansOperator.AddParameter("2", clsRFunctionParameter:=clsMeansSummarise, iPosition:=2) + clsMeansOperator.bBrackets = False clsMeansGroupBy.SetPackageName("dplyr") clsMeansGroupBy.SetRCommand("group_by") - clsMeansGroupBy.AddParameter("1", strData, iPosition:=1) + clsMeansGroupBy.AddParameter("1", strData, iPosition:=1, bIncludeArgumentName:=False) clsMeansSummarise.SetPackageName("dplyr") clsMeansSummarise.SetRCommand("summarise") @@ -247,15 +263,22 @@ Public Class dlgTimeSeriesPlot 'clsGeomText.AddParameter("data", clsROperatorParameter:=, iPosition:=0) clsGeomText.AddParameter("mapping", clsRFunctionParameter:=clsGeomTextAes, iPosition:=1) + clsFacetFunction.SetPackageName("ggplot2") + clsFacetFunction.SetRCommand("facet_wrap") + clsFacetFunction.AddParameter("facets", clsROperatorParameter:=clsFacetOperator, iPosition:=0) + + clsFacetOperator.SetOperation("~") + clsFacetOperator.bForceIncludeOperation = True + clsGgplotOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() clsXScaleContinuousFunction = GgplotDefaults.clsXScalecontinuousFunction.Clone() clsYScaleContinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone() - clsFacetFunction = GgplotDefaults.clsFacetFunction.Clone() clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction.Clone() dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions) + clsGgplotOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") ucrBase.clsRsyntax.SetBaseROperator(clsGgplotOperator) @@ -264,15 +287,19 @@ Public Class dlgTimeSeriesPlot Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverReference.AddAdditionalCodeParameterPair(clsIfElseReference, New RParameter("no", 2), iAdditionalPairNo:=1) - ucrReceiverReference.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("0", 0), iAdditionalPairNo:=2) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("0", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsIfElseEstimates, New RParameter("no", 2), iAdditionalPairNo:=1) - ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("1", 1), iAdditionalPairNo:=2) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("1", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) + ucrReceiverStation.AddAdditionalCodeParameterPair(clsFacetOperator, New RParameter("1", 1), iAdditionalPairNo:=1) ucrSelectorTimeSeriesPlots.SetRCode(clsAdjustNAOperator, bReset) ucrReceiverReference.SetRCode(clsIsNaReference, bReset) ucrReceiverEstimates.SetRCode(clsIsNaEstimates, bReset) ucrReceiverStation.SetRCode(clsMeansGroupBy, bReset) ucrReceiverTime.SetRCode(clsGgplotAes, bReset) + ucrChkNAValues.SetRCode(clsAdjustNAOperator, bReset) + + SetDataFrameAssignTo() End Sub Private Sub TestOkEnabled() @@ -284,7 +311,7 @@ Public Class dlgTimeSeriesPlot End Sub Private Sub SetDataFrameAssignTo() - If ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" AndAlso clsAdjustNAOperator.clsParameters.Count > 1 Then + If ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then If ucrChkNAValues.Checked Then clsAdjustNAOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text) Else @@ -299,7 +326,7 @@ Public Class dlgTimeSeriesPlot End If End Sub - Private Sub ucrSelectorTimeSeriesPlots_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTimeSeriesPlots.ControlValueChanged + Private Sub ucrSelectorTimeSeriesPlots_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrSelectorTimeSeriesPlots.ControlValueChanged, ucrChkNAValues.ControlValueChanged SetDataFrameAssignTo() End Sub @@ -334,6 +361,14 @@ Public Class dlgTimeSeriesPlot End Sub Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlContentsChanged, ucrReceiverReference.ControlContentsChanged, ucrSavePlot.ControlContentsChanged + TestOkEnabled() + End Sub + Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged + If ucrReceiverStation.IsEmpty AndAlso clsFacetOperator.clsParameters.Count = 0 Then + clsGgplotOperator.RemoveParameterByName("facets") + Else + clsGgplotOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetFunction, iPosition:=30) + End If End Sub End Class \ No newline at end of file From 37abfa243eea4bb39d54629dfb35388181078d64 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 18 Sep 2020 15:41:00 +0300 Subject: [PATCH 149/277] code formatting following tidyverse style --- .../static/InstatObject/R/instat_object_R6.R | 180 +++++++++++++----- 1 file changed, 129 insertions(+), 51 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index bc77a118057..1d237a2e338 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2088,58 +2088,136 @@ DataBook$set("public","package_check", function(package) { } ) -DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "Point", import = TRUE){ +DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "Point", import = TRUE) { init_URL <- "https://iridl.ldeo.columbia.edu/SOURCES/" - if(source == "UCSB_CHIRPS"){prexyaddress <- paste0(init_URL, ".UCSB/.CHIRPS/.v2p0") - if(data == "daily_improved_global_0p25_prcp") {extension <- ".daily-improved/.global/.0p25/.prcp"}#1 Jan 1981 to 31 Jul 2020 - else if(data == "daily_improved_global_0p05_prcp") {extension <- ".daily-improved/.global/.0p05/.prcp"}#1 Jan 1981 to 31 Jul 2020 - else if(data == "dekad_prcp") {extension <- ".dekad/.prcp"}#(days since 1960-01-01) ordered [ (1-10 Jan 1981) (11-20 Jan 1981) (21-31 Jan 1981) ... (21-31 Aug 2020)] - else if(data == "monthly_global_prcp") {extension <- ".monthly/.global/.precipitation"}#grid: /T (months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) by 1.0 N= 475 pts :grid - else stop("Data file does not exist for CHIRPS V2P0 data") - }else if(source == "TAMSAT") {prexyaddress <-paste0(init_URL, ".Reading/.Meteorology/.TAMSAT/.TARCAT/.v3p1") - if(data == "daily_rfe") {extension <- ".daily/.rfe"}#grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid - else if(data == "daily_rfe_filled") {extension <- ".daily/.rfe_filled/"}#grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid - else if(data == "dekadal_rfe") {extension <- ".dekadal/.rfe/"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid - else if(data == "dekadal_rfe_filled") {extension <- ".dekadal/.rfe_filled/"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid - else if(data == "monthly_rfe") {extension <- ".monthly/.rfe/"}#grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid - else if(data == "monthly_rfe_filled") {extension <- ".monthly/.rfe_filled/"}#grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid - else stop("Data file does not exist for TAMSAT data") - }else if(source == "NOAA_ARC2") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa/.DAILY/.ARC2") - if(data == "daily_est_prcp") {extension <- ".daily/.est_prcp"}#(days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) - else if(data == "monthly_est_prcp") {extension <- ".monthly/.est_prcp"}#(months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) - else stop("Data file does not exist for NOAA ARC2 data") - }else if(source=="NOAA") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa") - if(data == "daily_rfev2_est_prcp"){extension <- ".DAILY/.RFEv2/.est_prcp"}#(days since 2000-10-31 12:00:00) ordered (31 Oct 2000) to (12 Sep 2020) - else if(data == "10day_rfev2_est_prcp"){extension <- ".TEN-DAY/.RFEv2/.est_prcp"}#grid: /T (days since 1960-01-01) ordered [ (1-10 Dec 1999) (11-20 Dec 1999) (21-31 Dec 1999) ... (1-10 Sep 2020)] N= 748 pts :grid - else stop("Data file does not exist for NOAA RFE2 data") - }else if(source=="NOAA_CMORPH_DAILY" || source=="NOAA_CMORPH_3HOURLY" || source=="NOAA_CMORPH_DAILY_CALCULATED") { - if(source=="NOAA_CMORPH_DAILY") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily")} - else if(source == "NOAA_CMORPH_3HOURLY") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.3-hourly")} - else if(source == "NOAA_CMORPH_DAILY_CALCULATED") {prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated")} - if(data == "mean_microwave_only_est_prcp") {extension <- ".mean/.microwave-only/.comb"} - else if(data == "mean_morphed_est_prcp") {extension <- ".mean/.morphed/.cmorph"} - else if(data == "orignames_mean_microwave_only_est_prcp") {extension <- ".orignames/.mean/.microwave-only/.comb"} - else if(data == "orignames_mean_morphed_est_prcp") {extension <- ".orignames/.mean/.morphed/.cmorph"} - else if(data == "renamed102015_mean_microwave_only_est_prcp") {extension <- ".renamed102015/.mean/.microwave-only/.comb"} - else if(data == "renamed102015_mean_morphed_est_prcp") {extension <- ".renamed102015/.mean/.morphed/.cmorph"} - else stop("Data file does not exist for NOAA CMORPH data") - }else if(source=="NASA") {prexyaddress <- paste0(init_URL, ".NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") - if(data == "daily_prcp") {extension <- ".daily/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (1 Jan 1998) to (31 May 2015) - else if(data == "3_hourly_prcp") {extension <- ".three-hourly/.precipitation"}#(days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) - else stop("Data file does not exist for NASA TRMM 3B42 data") - }else{stop("Source not specified correctly.")} - prexyaddress <- paste(prexyaddress, extension, sep="/") - if(download_type == "Area"){URL <- add_xy_area_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, max_lon = max_lon, max_lat = max_lat)} - else if(download_type == "Point"){URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat)} - if(!missing(min_date)&!missing(max_date)){URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date)} - URL <- URL %>% add_nc() + if (source == "UCSB_CHIRPS") { + prexyaddress <- paste0(init_URL, ".UCSB/.CHIRPS/.v2p0") + if (data == "daily_improved_global_0p25_prcp") { + extension <- ".daily-improved/.global/.0p25/.prcp" + } # 1 Jan 1981 to 31 Jul 2020 + else if (data == "daily_improved_global_0p05_prcp") { + extension <- ".daily-improved/.global/.0p05/.prcp" + } # 1 Jan 1981 to 31 Jul 2020 + else if (data == "dekad_prcp") { + extension <- ".dekad/.prcp" + } # (days since 1960-01-01) ordered [ (1-10 Jan 1981) (11-20 Jan 1981) (21-31 Jan 1981) ... (21-31 Aug 2020)] + else if (data == "monthly_global_prcp") { + extension <- ".monthly/.global/.precipitation" + } # grid: /T (months since 1960-01-01) ordered (Jan 1981) to (Jul 2020) by 1.0 N= 475 pts :grid + else { + stop("Data file does not exist for CHIRPS V2P0 data") + } + } else if (source == "TAMSAT") { + prexyaddress <- paste0(init_URL, ".Reading/.Meteorology/.TAMSAT/.TARCAT/.v3p1") + if (data == "daily_rfe") { + extension <- ".daily/.rfe" + } # grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid + else if (data == "daily_rfe_filled") { + extension <- ".daily/.rfe_filled/" + } # grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid + else if (data == "dekadal_rfe") { + extension <- ".dekadal/.rfe/" + } # grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid + else if (data == "dekadal_rfe_filled") { + extension <- ".dekadal/.rfe_filled/" + } # grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid + else if (data == "monthly_rfe") { + extension <- ".monthly/.rfe/" + } # grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid + else if (data == "monthly_rfe_filled") { + extension <- ".monthly/.rfe_filled/" + } # grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid + else { + stop("Data file does not exist for TAMSAT data") + } + } else if (source == "NOAA_ARC2") { + prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa/.DAILY/.ARC2") + if (data == "daily_est_prcp") { + extension <- ".daily/.est_prcp" + } # (days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) + else if (data == "monthly_est_prcp") { + extension <- ".monthly/.est_prcp" + } # (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) + else { + stop("Data file does not exist for NOAA ARC2 data") + } + } else if (source == "NOAA") { + prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa") + if (data == "daily_rfev2_est_prcp") { + extension <- ".DAILY/.RFEv2/.est_prcp" + } # (days since 2000-10-31 12:00:00) ordered (31 Oct 2000) to (12 Sep 2020) + else if (data == "10day_rfev2_est_prcp") { + extension <- ".TEN-DAY/.RFEv2/.est_prcp" + } # grid: /T (days since 1960-01-01) ordered [ (1-10 Dec 1999) (11-20 Dec 1999) (21-31 Dec 1999) ... (1-10 Sep 2020)] N= 748 pts :grid + else { + stop("Data file does not exist for NOAA RFE2 data") + } + } else if (source == "NOAA_CMORPH_DAILY" || source == "NOAA_CMORPH_3HOURLY" || source == "NOAA_CMORPH_DAILY_CALCULATED") { + if (source == "NOAA_CMORPH_DAILY") { + prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily") + } + else if (source == "NOAA_CMORPH_3HOURLY") { + prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.3-hourly") + } + else if (source == "NOAA_CMORPH_DAILY_CALCULATED") { + prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.CMORPH/.daily_calculated") + } + if (data == "mean_microwave_only_est_prcp") { + extension <- ".mean/.microwave-only/.comb" + } + else if (data == "mean_morphed_est_prcp") { + extension <- ".mean/.morphed/.cmorph" + } + else if (data == "orignames_mean_microwave_only_est_prcp") { + extension <- ".orignames/.mean/.microwave-only/.comb" + } + else if (data == "orignames_mean_morphed_est_prcp") { + extension <- ".orignames/.mean/.morphed/.cmorph" + } + else if (data == "renamed102015_mean_microwave_only_est_prcp") { + extension <- ".renamed102015/.mean/.microwave-only/.comb" + } + else if (data == "renamed102015_mean_morphed_est_prcp") { + extension <- ".renamed102015/.mean/.morphed/.cmorph" + } + else { + stop("Data file does not exist for NOAA CMORPH data") + } + } else if (source == "NASA") { + prexyaddress <- paste0(init_URL, ".NASA/.GES-DAAC/.TRMM_L3/.TRMM_3B42/.v7") + if (data == "daily_prcp") { + extension <- ".daily/.precipitation" + } # (days since 1998-01-01 00:00:00) ordered (1 Jan 1998) to (31 May 2015) + else if (data == "3_hourly_prcp") { + extension <- ".three-hourly/.precipitation" + } # (days since 1998-01-01 00:00:00) ordered (2230 31 Dec 1997 - 0130 1 Jan 1998) to (2230 30 May 2015 - 0130 31 May 2015) + else { + stop("Data file does not exist for NASA TRMM 3B42 data") + } + } else { + stop("Source not specified correctly.") + } + prexyaddress <- paste(prexyaddress, extension, sep = "/") + if (download_type == "Area") { + URL <- add_xy_area_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, max_lon = max_lon, max_lat = max_lat) + } + else if (download_type == "Point") { + URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat) + } + if (!missing(min_date) & !missing(max_date)) { + URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date) + } + URL <- URL %>% add_nc() file_name <- tempfile(pattern = tolower(source), tmpdir = path, fileext = ".nc") - result <- download.file(url = URL, destfile = file_name, method = "libcurl", mode = "wb", cacheOK = FALSE) - if(import && result == 0) { + result <- download.file(url = URL, destfile = file_name, method = "libcurl", mode = "wb", cacheOK = FALSE) + if (import && result == 0) { nc <- ncdf4::nc_open(filename = file_name) self$import_NetCDF(nc = nc, name = name) - ncdf4::nc_close(nc=nc) - }else if(result != 0){stop("No file downloaded please check your internet connection")} - if(missing(path)) {file.remove(file_name)} -} -) \ No newline at end of file + ncdf4::nc_close(nc = nc) + } else if (result != 0) { + stop("No file downloaded please check your internet connection") + } + if (missing(path)) { + file.remove(file_name) + } +}) \ No newline at end of file From 1cd18b96e0b1023528da39af5fade6866cd7ba75 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Fri, 18 Sep 2020 17:06:31 +0300 Subject: [PATCH 150/277] minor edits --- instat/dlgImportGriddedData.vb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 8b530e6bd92..78783077a55 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -157,8 +157,8 @@ Public Class dlgImportGriddedData Select Case ucrInputSource.GetText Case "NASA" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "daily_prcp" & Chr(34)) - dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "3_hourly_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "TRMM 3B42 3-Hourly Precipitation" ucrDtpMinDate.MinDate = New Date(1998, 1, 1) @@ -194,7 +194,7 @@ Public Class dlgImportGriddedData ucrDtpMinDate.MinDate = New Date(1981, 1, 1) ucrDtpMaxDate.MinDate = New Date(1981, 1, 1) End Select - ucrInputNewDataFrameName.SetPrefix(ucrInputSource.GetText.ToLower) + ucrInputNewDataFrameName.SetName(ucrInputSource.GetText.ToLower) End Sub Private Sub cmdBrowse_Click(sender As Object, e As EventArgs) Handles cmdBrowse.Click From 8aa41e02fc6046bf541e458d571291aa35369314 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Fri, 18 Sep 2020 17:48:43 +0100 Subject: [PATCH 151/277] added code for summary text --- instat/dlgTimeSeriesPlot.vb | 209 ++++++++++++++++++++++++++++++++++-- 1 file changed, 201 insertions(+), 8 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 2db0b83b2ef..534d6f847bc 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -48,17 +48,46 @@ Public Class dlgTimeSeriesPlot Private clsMeanFunction As RFunction ' Calculate Text Summaries + Private clsSummaryOperator As ROperator + Private clsSummaryGroupBy As RFunction + Private clsSummarise As RFunction + Private clsN As RFunction + Private clsCor As RFunction + Private clsMe As RFunction + Private clsMae As RFunction + Private clsRmse As RFunction + Private clsPbias As RFunction + Private clsRSd As RFunction + Private clsKge As RFunction + Private clsPasteN As RFunction + Private clsPasteCor As RFunction + Private clsPasteMe As RFunction + Private clsPasteMae As RFunction + Private clsPasteRmse As RFunction + Private clsPastePbias As RFunction + Private clsPasteRSd As RFunction + Private clsPasteKge As RFunction + Private clsRoundCor As RFunction + Private clsSignifMe As RFunction + Private clsSignifMae As RFunction + Private clsSignifRmse As RFunction + Private clsRoundPbias As RFunction + Private clsRoundRSd As RFunction + Private clsRoundKge As RFunction ' ggplot functions Private clsGgplotOperator As ROperator Private clsGgplotFunction As RFunction Private clsGgplotAes As RFunction Private clsGeomLine As RFunction + Private clsGeomPointParameter As RParameter Private clsGeomPoint As RFunction + Private clsGeomHLineParameter As RParameter Private clsGeomHLine As RFunction Private clsGeomHLineAes As RFunction Private clsGeomText As RFunction Private clsGeomTextAes As RFunction + Private clsPasteLabel As RFunction Private clsLabsFunction As New RFunction Private clsXlabsFunction As New RFunction @@ -103,32 +132,44 @@ Public Class dlgTimeSeriesPlot ucrReceiverReference.Selector = ucrSelectorTimeSeriesPlots ucrReceiverReference.SetParameterIsString() ucrReceiverReference.bWithQuotes = False + ucrReceiverReference.SetDataType("numeric") ucrReceiverEstimates.SetParameter(New RParameter("x", 0)) ucrReceiverEstimates.Selector = ucrSelectorTimeSeriesPlots ucrReceiverEstimates.SetParameterIsString() ucrReceiverEstimates.bWithQuotes = False + ucrReceiverEstimates.SetDataType("numeric") ucrReceiverTime.SetParameter(New RParameter("x", 0)) ucrReceiverTime.Selector = ucrSelectorTimeSeriesPlots ucrReceiverTime.SetParameterIsString() ucrReceiverTime.bWithQuotes = False + ucrReceiverTime.SetClimaticType("year") + ucrReceiverTime.bAutoFill = True ucrReceiverStation.SetParameter(New RParameter("0", 0, bNewIncludeArgumentName:=False)) ucrReceiverStation.Selector = ucrSelectorTimeSeriesPlots ucrReceiverStation.SetParameterIsString() ucrReceiverStation.bWithQuotes = False + ucrReceiverStation.SetDataType("factor") + ucrReceiverStation.SetClimaticType("station") + ucrReceiverStation.bAutoFill = True clsAdjustNAMutate = New RFunction clsAdjustNAMutateParameter = New RParameter("1", clsAdjustNAMutate, iNewPosition:=1) ucrChkNAValues.SetText("Remove rows with any missing values") ucrChkNAValues.SetParameter(clsAdjustNAMutateParameter, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + clsGeomPoint = New RFunction + clsGeomPointParameter = New RParameter(strGeomPointParameterName, clsGeomPoint, iNewPosition:=2) ucrChkIncludePoints.SetText("Include Points") - ucrChkIncludePoints.Enabled = False + ucrChkIncludePoints.SetParameter(clsGeomPointParameter, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + clsGeomHLine = New RFunction + clsGeomHLineAes = New RFunction + clsGeomHLineParameter = New RParameter(strGeomHLineParameterName, clsGeomHLine, iNewPosition:=3) ucrChkIncludeMeanLines.SetText("Include Mean Lines") - ucrChkIncludeMeanLines.Enabled = False + ucrChkIncludeMeanLines.SetParameter(clsGeomHLineParameter, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) ucrSavePlot.SetPrefix("line") ucrSavePlot.SetIsComboBox() @@ -154,19 +195,46 @@ Public Class dlgTimeSeriesPlot clsMeansSummarise = New RFunction clsMeanFunction = New RFunction + clsSummaryGroupBy = New RFunction + clsSummarise = New RFunction + clsN = New RFunction + clsCor = New RFunction + clsMe = New RFunction + clsMae = New RFunction + clsRmse = New RFunction + clsPbias = New RFunction + clsRSd = New RFunction + clsKge = New RFunction + clsPasteN = New RFunction + clsPasteCor = New RFunction + clsPasteMe = New RFunction + clsPasteMae = New RFunction + clsPasteRmse = New RFunction + clsPastePbias = New RFunction + clsPasteRSd = New RFunction + clsPasteKge = New RFunction + clsRoundCor = New RFunction + clsSignifMe = New RFunction + clsSignifMae = New RFunction + clsSignifRmse = New RFunction + clsRoundPbias = New RFunction + clsRoundRSd = New RFunction + clsRoundKge = New RFunction + clsGgplotOperator = New ROperator clsGgplotFunction = New RFunction clsGgplotAes = New RFunction clsGeomLine = New RFunction - clsGeomPoint = New RFunction - clsGeomHLine = New RFunction - clsGeomHLineAes = New RFunction + clsGeomPoint.Clear() + clsGeomHLine.Clear() + clsGeomHLineAes.Clear() clsGeomText = New RFunction clsGeomTextAes = New RFunction + clsPasteLabel = New RFunction ucrSelectorTimeSeriesPlots.Reset() ucrSelectorTimeSeriesPlots.SetGgplotFunction(clsGgplotOperator) - + ucrSavePlot.Reset() ucrReceiverReference.SetMeAsReceiver() ' Adjust NA values @@ -224,12 +292,46 @@ Public Class dlgTimeSeriesPlot clsMeanFunction.AddParameter("x", strValue, iPosition:=0) clsMeanFunction.AddParameter("na.rm", "TRUE", iPosition:=1) + ' Calculate summaries + clsSummaryOperator.SetOperation("%>%") + clsSummaryOperator.AddParameter("2", clsRFunctionParameter:=clsSummarise, iPosition:=2) + + clsSummaryGroupBy.SetPackageName("dplyr") + clsSummaryGroupBy.SetRCommand("group_by") + + clsSummarise.SetPackageName("dplyr") + clsSummarise.SetRCommand("summarise") + + clsN.SetPackageName("dplyr") + clsN.SetRCommand("n") + + clsCor.SetRCommand("cor") + clsCor.AddParameter("use", Chr(34) & "na.or.complete") + + clsMe.SetPackageName("hydroGOF") + clsMe.SetRCommand("me") + + clsMae.SetPackageName("hydroGOF") + clsMae.SetRCommand("mae") + + clsRmse.SetPackageName("hydroGOF") + clsRmse.SetRCommand("rmse") + + clsPbias.SetPackageName("hydroGOF") + clsPbias.SetRCommand("pbias") + + clsRSd.SetPackageName("hydroGOF") + clsRSd.SetRCommand("rSD") + + clsKge.SetPackageName("hydroGOF") + clsKge.SetRCommand("KGE") + ' Ggplot functions clsGgplotOperator.SetOperation("+") clsGgplotOperator.AddParameter("ggplot", clsRFunctionParameter:=clsGgplotFunction, iPosition:=0) clsGgplotOperator.AddParameter(strGeomLineParameterName, clsRFunctionParameter:=clsGeomLine, iPosition:=1) - clsGgplotOperator.AddParameter(strGeomPointParameterName, clsRFunctionParameter:=clsGeomPoint, iPosition:=2) + clsGgplotOperator.AddParameter(clsGeomPointParameter) clsGgplotOperator.AddParameter(strGeomHLineParameterName, clsRFunctionParameter:=clsGeomHLine, iPosition:=3) clsGgplotFunction.SetPackageName("ggplot2") @@ -260,8 +362,75 @@ Public Class dlgTimeSeriesPlot clsGeomText.SetPackageName("ggplot2") clsGeomText.SetRCommand("geom_text") - 'clsGeomText.AddParameter("data", clsROperatorParameter:=, iPosition:=0) + clsGeomText.AddParameter("data", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) clsGeomText.AddParameter("mapping", clsRFunctionParameter:=clsGeomTextAes, iPosition:=1) + clsGeomText.AddParameter("inherit.aes", "FALSE", iPosition:=10) + + clsGeomTextAes.SetPackageName("ggplot2") + clsGeomTextAes.SetRCommand("aes") + clsGeomTextAes.AddParameter("label", clsRFunctionParameter:=clsPasteLabel, iPosition:=0) + + clsPasteLabel.SetRCommand("paste") + + clsPasteN.SetRCommand("paste") + clsPasteN.AddParameter("0", Chr(34) & "n" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteN.AddParameter("1", clsRFunctionParameter:=clsN, iPosition:=1, bIncludeArgumentName:=False) + + clsPasteCor.SetRCommand("paste") + clsPasteCor.AddParameter("0", Chr(34) & "cor" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteCor.AddParameter("1", clsRFunctionParameter:=clsRoundCor, iPosition:=1, bIncludeArgumentName:=False) + + clsRoundCor.SetRCommand("round") + clsRoundCor.AddParameter("x", "cor", iPosition:=0) + clsRoundCor.AddParameter("digits", "2", iPosition:=1) + + clsPasteMe.SetRCommand("paste") + clsPasteMe.AddParameter("0", Chr(34) & "me" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteMe.AddParameter("1", clsRFunctionParameter:=clsSignifMe, iPosition:=1, bIncludeArgumentName:=False) + + clsSignifMe.SetRCommand("signif") + clsSignifMe.AddParameter("x", "me", iPosition:=0) + clsSignifMe.AddParameter("digits", "2", iPosition:=1) + + clsPasteMae.SetRCommand("paste") + clsPasteMae.AddParameter("0", Chr(34) & "mae" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteMae.AddParameter("1", clsRFunctionParameter:=clsSignifMae, iPosition:=1, bIncludeArgumentName:=False) + + clsSignifMae.SetRCommand("signif") + clsSignifMae.AddParameter("x", "mae", iPosition:=0) + clsSignifMae.AddParameter("digits", "2", iPosition:=1) + + clsPasteRmse.SetRCommand("paste") + clsPasteRmse.AddParameter("0", Chr(34) & "rmse" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteRmse.AddParameter("1", clsRFunctionParameter:=clsSignifRmse, iPosition:=1, bIncludeArgumentName:=False) + + clsSignifRmse.SetRCommand("signif") + clsSignifRmse.AddParameter("x", "rmse", iPosition:=0) + clsSignifRmse.AddParameter("digits", "2", iPosition:=1) + + clsPastePbias.SetRCommand("paste") + clsPastePbias.AddParameter("0", Chr(34) & "%bias" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPastePbias.AddParameter("1", clsRFunctionParameter:=clsRoundPbias, iPosition:=1, bIncludeArgumentName:=False) + + clsRoundPbias.SetRCommand("round") + clsRoundPbias.AddParameter("x", "pbias", iPosition:=0) + clsRoundPbias.AddParameter("digits", "2", iPosition:=1) + + clsPasteRSd.SetRCommand("paste") + clsPasteRSd.AddParameter("0", Chr(34) & "rSD" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteRSd.AddParameter("1", clsRFunctionParameter:=clsRoundRSd, iPosition:=1, bIncludeArgumentName:=False) + + clsRoundRSd.SetRCommand("round") + clsRoundRSd.AddParameter("x", "rsd", iPosition:=0) + clsRoundRSd.AddParameter("digits", "2", iPosition:=1) + + clsPasteKge.SetRCommand("paste") + clsPasteKge.AddParameter("0", Chr(34) & "KGE" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteKge.AddParameter("1", clsRFunctionParameter:=clsRoundKge, iPosition:=1, bIncludeArgumentName:=False) + + clsRoundKge.SetRCommand("round") + clsRoundKge.AddParameter("x", "kge", iPosition:=0) + clsRoundKge.AddParameter("digits", "2", iPosition:=1) clsFacetFunction.SetPackageName("ggplot2") clsFacetFunction.SetRCommand("facet_wrap") @@ -288,9 +457,24 @@ Public Class dlgTimeSeriesPlot Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverReference.AddAdditionalCodeParameterPair(clsIfElseReference, New RParameter("no", 2), iAdditionalPairNo:=1) ucrReceiverReference.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("0", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsCor, New RParameter("y", 1), iAdditionalPairNo:=3) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsMe, New RParameter("obs", 1), iAdditionalPairNo:=4) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsMae, New RParameter("obs", 1), iAdditionalPairNo:=5) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsRmse, New RParameter("obs", 1), iAdditionalPairNo:=6) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsPbias, New RParameter("obs", 1), iAdditionalPairNo:=7) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsRSd, New RParameter("obs", 1), iAdditionalPairNo:=8) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsKge, New RParameter("obs", 1), iAdditionalPairNo:=9) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsIfElseEstimates, New RParameter("no", 2), iAdditionalPairNo:=1) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("1", 1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsCor, New RParameter("x", 1), iAdditionalPairNo:=3) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsMe, New RParameter("sim", 1), iAdditionalPairNo:=4) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsMae, New RParameter("sim", 1), iAdditionalPairNo:=5) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsRmse, New RParameter("sim", 1), iAdditionalPairNo:=6) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsPbias, New RParameter("sim", 1), iAdditionalPairNo:=7) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsRSd, New RParameter("sim", 1), iAdditionalPairNo:=8) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsKge, New RParameter("sim", 1), iAdditionalPairNo:=9) ucrReceiverStation.AddAdditionalCodeParameterPair(clsFacetOperator, New RParameter("1", 1), iAdditionalPairNo:=1) + ucrReceiverStation.AddAdditionalCodeParameterPair(clsSummaryGroupBy, New RParameter("0", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) ucrSelectorTimeSeriesPlots.SetRCode(clsAdjustNAOperator, bReset) ucrReceiverReference.SetRCode(clsIsNaReference, bReset) @@ -298,6 +482,8 @@ Public Class dlgTimeSeriesPlot ucrReceiverStation.SetRCode(clsMeansGroupBy, bReset) ucrReceiverTime.SetRCode(clsGgplotAes, bReset) ucrChkNAValues.SetRCode(clsAdjustNAOperator, bReset) + ucrChkIncludePoints.SetRCode(clsGgplotOperator, bReset) + ucrChkIncludeMeanLines.SetRCode(clsGgplotOperator, bReset) SetDataFrameAssignTo() End Sub @@ -319,6 +505,7 @@ Public Class dlgTimeSeriesPlot End If clsStackOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_stack") clsMeansOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_mean") + clsSummaryOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_summary") Else clsAdjustNAOperator.RemoveAssignTo() clsStackOperator.RemoveAssignTo() @@ -370,5 +557,11 @@ Public Class dlgTimeSeriesPlot Else clsGgplotOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetFunction, iPosition:=30) End If + + If ucrReceiverStation.IsEmpty Then + clsSummaryOperator.RemoveParameterByName("0") + Else + clsSummaryOperator.AddParameter("0", clsRFunctionParameter:=clsSummaryGroupBy, iPosition:=0) + End If End Sub End Class \ No newline at end of file From 56a7505574ab559982800eb8e19ecb9c96a395ec Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 18 Sep 2020 23:35:52 +0300 Subject: [PATCH 152/277] changed 4 events to enable multiple reordering of list view items --- instat/ucrReorder.vb | 154 ++++++++++++++++++++----------------------- 1 file changed, 72 insertions(+), 82 deletions(-) diff --git a/instat/ucrReorder.vb b/instat/ucrReorder.vb index 01a12b5e07f..e749fa492d0 100644 --- a/instat/ucrReorder.vb +++ b/instat/ucrReorder.vb @@ -14,30 +14,16 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . -Imports instat Imports RDotNet Public Class ucrReorder Public Event OrderChanged() Public WithEvents ucrDataFrameList As ucrDataFrame Public WithEvents ucrReceiver As ucrReceiverSingle - Private strDataType As String - Dim selectedListViewItem As ListViewItem - Dim selectedIndex As Integer - Dim itemsCount As Integer + Private strDataType As String = "" Public bWithQuotes As Boolean = True Public bIsDataType As Boolean = True Public Event SelectedIndexChanged(sender As Object, e As EventArgs) - Public Sub New() - - ' This call is required by the designer. - InitializeComponent() - - ' Add any initialization after the InitializeComponent() call. - strDataType = "" - selectedListViewItem = New ListViewItem - End Sub - Public Sub setDataType(strType As String) strDataType = strType lstAvailableData.Clear() @@ -57,78 +43,82 @@ Public Class ucrReorder LoadList() End Sub - Private Sub cmdUp_Click(sender As Object, e As EventArgs) Handles cmdUp.Click - If lstAvailableData.Items.Count > 0 And lstAvailableData.SelectedItems.Count > 0 Then - selectedListViewItem = lstAvailableData.SelectedItems(0) - selectedIndex = lstAvailableData.SelectedItems.Item(0).Index - itemsCount = lstAvailableData.Items.Count - 'checks if the item is at the top, if true exits - If selectedIndex = 0 Then - Exit Sub - Else - lstAvailableData.Items.RemoveAt(selectedIndex) - lstAvailableData.Items.Insert(selectedIndex - 1, selectedListViewItem) - - End If - selectedListViewItem.Selected = True - lstAvailableData.Select() - selectedListViewItem.EnsureVisible() - RaiseEvent OrderChanged() - End If - + Private Sub cmdUp_Click(sender As Object, e As EventArgs) Handles cmdUp.Click + ReorderListViewItems("up") End Sub - Private Sub cmdDown_click(sender As Object, e As EventArgs) Handles cmdDown.Click - If lstAvailableData.Items.Count > 0 And lstAvailableData.SelectedItems.Count > 0 Then - selectedListViewItem = lstAvailableData.SelectedItems(0) - selectedIndex = selectedListViewItem.Index - itemsCount = lstAvailableData.Items.Count - 'checks if the item is at the bottom, if true exits - If selectedIndex = itemsCount - 1 Then - Exit Sub - Else - lstAvailableData.Items.Remove(selectedListViewItem) - lstAvailableData.Items.Insert(selectedIndex + 1, selectedListViewItem) - End If - selectedListViewItem.Selected = True - lstAvailableData.Select() - selectedListViewItem.EnsureVisible() - RaiseEvent OrderChanged() - End If - End Sub - - Private Sub cmdBottom_Click(sender As Object, e As EventArgs) Handles cmdBottom.Click - If lstAvailableData.Items.Count > 0 And lstAvailableData.SelectedItems.Count > 0 Then - selectedListViewItem = lstAvailableData.SelectedItems(0) - selectedIndex = selectedListViewItem.Index - itemsCount = lstAvailableData.Items.Count - 'checks if the item is at the bottom, if not moves it to the bottom - If Not selectedIndex = itemsCount - 1 Then - lstAvailableData.Items.Remove(selectedListViewItem) - lstAvailableData.Items.Insert(itemsCount - 1, selectedListViewItem) - End If - selectedListViewItem.Selected = True - lstAvailableData.Select() - selectedListViewItem.EnsureVisible() - RaiseEvent OrderChanged() - End If + Private Sub cmdDown_click(sender As Object, e As EventArgs) Handles cmdDown.Click + ReorderListViewItems("down") + End Sub + + Private Sub cmdBottom_Click(sender As Object, e As EventArgs) Handles cmdBottom.Click + ReorderListViewItems("bottom") End Sub Private Sub cmdTop_Click(sender As Object, e As EventArgs) Handles cmdTop.Click - If lstAvailableData.Items.Count > 0 And lstAvailableData.SelectedItems.Count > 0 Then - selectedListViewItem = lstAvailableData.SelectedItems(0) - selectedIndex = selectedListViewItem.Index - itemsCount = lstAvailableData.Items.Count - 'checks if the item is at the top, if not moves it to the top - If Not selectedIndex = 0 Then - lstAvailableData.Items.Remove(selectedListViewItem) - lstAvailableData.Items.Insert(0, selectedListViewItem) - End If - selectedListViewItem.Selected = True - lstAvailableData.Select() - selectedListViewItem.EnsureVisible() - RaiseEvent OrderChanged() - End If + ReorderListViewItems("top") + End Sub + + ''' + ''' reorders the items in the listview based on the direction option given + ''' opted to use string parameter because the sub is used inside this class only and by 4 events + ''' + ''' direction, allowed values; top,up,down,bottom. + Private Sub ReorderListViewItems(strDirection As String) + 'if no data selection just exit reorder + If lstAvailableData.SelectedItems.Count = 0 Then + Exit Sub + End If + + Dim dctSelectedItems As New Dictionary(Of Integer, ListViewItem) + Dim iStartindex As Integer = 0 + 'get the selected listview items with their original indices + For Each objItem As ListViewItem In lstAvailableData.SelectedItems + dctSelectedItems.Add(objItem.Index, objItem) + Next + + 'remove all selected items + For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + lstAvailableData.Items.Remove(kvpItem.Value) + Next + + 'reorder the items in the list view based on the option given + Select Case strDirection + Case "top" + For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + lstAvailableData.Items.Insert(iStartindex, kvpItem.Value) + iStartindex = iStartindex + 1 + Next + Case "up" + For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + If kvpItem.Key = 0 Then + lstAvailableData.Items.Insert(0, kvpItem.Value) + Else + lstAvailableData.Items.Insert(kvpItem.Key - 1, kvpItem.Value) + End If + Next + Case "down" + For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + If kvpItem.Key >= lstAvailableData.Items.Count - 1 Then + lstAvailableData.Items.Add(kvpItem.Value) + Else + lstAvailableData.Items.Insert(kvpItem.Key + 1, kvpItem.Value) + End If + Next + Case "bottom" + For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + lstAvailableData.Items.Add(kvpItem.Value) + iStartindex = iStartindex + 1 + Next + End Select + + 'change focus to the listview + lstAvailableData.Select() + 'scroll to the selected items if necessary + dctSelectedItems.Values.LastOrDefault().EnsureVisible() + 'selectedListViewItem.EnsureVisible() + 'notify order changed + RaiseEvent OrderChanged() End Sub Public Function GetVariableNames(Optional bWithQuotes As Boolean = True) As String From 9a825fe81380a434e161331bce2efca5b16e3a06 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Fri, 18 Sep 2020 23:52:02 +0300 Subject: [PATCH 153/277] comments addition --- instat/ucrReorder.vb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/instat/ucrReorder.vb b/instat/ucrReorder.vb index e749fa492d0..6b83f5ae47e 100644 --- a/instat/ucrReorder.vb +++ b/instat/ucrReorder.vb @@ -60,7 +60,7 @@ Public Class ucrReorder End Sub ''' - ''' reorders the items in the listview based on the direction option given + ''' reorders the items in the listview based on the direction option given and raises reorder event ''' opted to use string parameter because the sub is used inside this class only and by 4 events ''' ''' direction, allowed values; top,up,down,bottom. @@ -116,7 +116,6 @@ Public Class ucrReorder lstAvailableData.Select() 'scroll to the selected items if necessary dctSelectedItems.Values.LastOrDefault().EnsureVisible() - 'selectedListViewItem.EnsureVisible() 'notify order changed RaiseEvent OrderChanged() End Sub From 4d3ff88a03ab409187ec3d22e72c10b80271e15d Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Sat, 19 Sep 2020 13:57:51 +0100 Subject: [PATCH 154/277] summaries sub dialog implemented --- instat/dlgTimeSeriesPlot.vb | 48 ++++++-- instat/sdgTimeSeries.Designer.vb | 198 ++++++++++++++++------------- instat/sdgTimeSeries.vb | 205 ++++++++++++++++++++++++++++++- 3 files changed, 351 insertions(+), 100 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 534d6f847bc..1f9c1c83843 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -20,6 +20,7 @@ Public Class dlgTimeSeriesPlot Public bFirstLoad As Boolean = True Private bReset As Boolean = True + Private bResetSubdialog As Boolean = True ' Constants Private strReference As String = "" @@ -75,6 +76,8 @@ Public Class dlgTimeSeriesPlot Private clsRoundRSd As RFunction Private clsRoundKge As RFunction + Private dctSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) + ' ggplot functions Private clsGgplotOperator As ROperator Private clsGgplotFunction As RFunction @@ -195,32 +198,43 @@ Public Class dlgTimeSeriesPlot clsMeansSummarise = New RFunction clsMeanFunction = New RFunction + clsSummaryOperator = New ROperator clsSummaryGroupBy = New RFunction clsSummarise = New RFunction clsN = New RFunction clsCor = New RFunction + clsPbias = New RFunction + clsRSd = New RFunction clsMe = New RFunction clsMae = New RFunction clsRmse = New RFunction - clsPbias = New RFunction - clsRSd = New RFunction clsKge = New RFunction clsPasteN = New RFunction clsPasteCor = New RFunction + clsPastePbias = New RFunction + clsPasteRSd = New RFunction clsPasteMe = New RFunction clsPasteMae = New RFunction clsPasteRmse = New RFunction - clsPastePbias = New RFunction - clsPasteRSd = New RFunction clsPasteKge = New RFunction clsRoundCor = New RFunction + clsRoundPbias = New RFunction + clsRoundRSd = New RFunction clsSignifMe = New RFunction clsSignifMae = New RFunction clsSignifRmse = New RFunction - clsRoundPbias = New RFunction - clsRoundRSd = New RFunction clsRoundKge = New RFunction + dctSummaries = New Dictionary(Of String, Tuple(Of RFunction, RFunction)) + dctSummaries.Add("n", New Tuple(Of RFunction, RFunction)(clsN, clsPasteN)) + dctSummaries.Add("cor", New Tuple(Of RFunction, RFunction)(clsCor, clsPasteCor)) + dctSummaries.Add("pbias", New Tuple(Of RFunction, RFunction)(clsPbias, clsPastePbias)) + dctSummaries.Add("rsd", New Tuple(Of RFunction, RFunction)(clsRSd, clsPasteRSd)) + dctSummaries.Add("me", New Tuple(Of RFunction, RFunction)(clsMe, clsPasteMe)) + dctSummaries.Add("mae", New Tuple(Of RFunction, RFunction)(clsMae, clsPasteMae)) + dctSummaries.Add("rmse", New Tuple(Of RFunction, RFunction)(clsRmse, clsPasteRmse)) + dctSummaries.Add("kge", New Tuple(Of RFunction, RFunction)(clsKge, clsPasteKge)) + clsGgplotOperator = New ROperator clsGgplotFunction = New RFunction clsGgplotAes = New RFunction @@ -294,6 +308,7 @@ Public Class dlgTimeSeriesPlot ' Calculate summaries clsSummaryOperator.SetOperation("%>%") + clsSummaryOperator.AddParameter("0", clsROperatorParameter:=clsAdjustNAOperator, iPosition:=0) clsSummaryOperator.AddParameter("2", clsRFunctionParameter:=clsSummarise, iPosition:=2) clsSummaryGroupBy.SetPackageName("dplyr") @@ -306,7 +321,7 @@ Public Class dlgTimeSeriesPlot clsN.SetRCommand("n") clsCor.SetRCommand("cor") - clsCor.AddParameter("use", Chr(34) & "na.or.complete") + clsCor.AddParameter("use", Chr(34) & "na.or.complete" & Chr(34)) clsMe.SetPackageName("hydroGOF") clsMe.SetRCommand("me") @@ -364,6 +379,11 @@ Public Class dlgTimeSeriesPlot clsGeomText.SetRCommand("geom_text") clsGeomText.AddParameter("data", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) clsGeomText.AddParameter("mapping", clsRFunctionParameter:=clsGeomTextAes, iPosition:=1) + clsGeomText.AddParameter("x", "-Inf", iPosition:=3) + clsGeomText.AddParameter("y", "Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "0", iPosition:=5) + clsGeomText.AddParameter("vjust", "1", iPosition:=6) + clsGeomText.AddParameter("size", "5", iPosition:=7) clsGeomText.AddParameter("inherit.aes", "FALSE", iPosition:=10) clsGeomTextAes.SetPackageName("ggplot2") @@ -374,7 +394,7 @@ Public Class dlgTimeSeriesPlot clsPasteN.SetRCommand("paste") clsPasteN.AddParameter("0", Chr(34) & "n" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) - clsPasteN.AddParameter("1", clsRFunctionParameter:=clsN, iPosition:=1, bIncludeArgumentName:=False) + clsPasteN.AddParameter("1", "n", iPosition:=1, bIncludeArgumentName:=False) clsPasteCor.SetRCommand("paste") clsPasteCor.AddParameter("0", Chr(34) & "cor" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) @@ -510,6 +530,7 @@ Public Class dlgTimeSeriesPlot clsAdjustNAOperator.RemoveAssignTo() clsStackOperator.RemoveAssignTo() clsMeansOperator.RemoveAssignTo() + clsSummaryOperator.RemoveAssignTo() End If End Sub @@ -557,11 +578,16 @@ Public Class dlgTimeSeriesPlot Else clsGgplotOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetFunction, iPosition:=30) End If - If ucrReceiverStation.IsEmpty Then - clsSummaryOperator.RemoveParameterByName("0") + clsSummaryOperator.RemoveParameterByName("1") Else - clsSummaryOperator.AddParameter("0", clsRFunctionParameter:=clsSummaryGroupBy, iPosition:=0) + clsSummaryOperator.AddParameter("1", clsRFunctionParameter:=clsSummaryGroupBy, iPosition:=1) End If End Sub + + Private Sub cmdSummaries_Click(sender As Object, e As EventArgs) Handles cmdSummaries.Click + sdgTimeSeries.SetRCode(clsNewSummarise:=clsSummarise, dctNewSummaries:=dctSummaries, clsNewGgplotOperator:=clsGgplotOperator, clsNewGeomText:=clsGeomText, clsNewPasteLabel:=clsPasteLabel, bReset:=bResetSubdialog) + sdgTimeSeries.ShowDialog() + bResetSubdialog = False + End Sub End Class \ No newline at end of file diff --git a/instat/sdgTimeSeries.Designer.vb b/instat/sdgTimeSeries.Designer.vb index f5f705cb0c5..c21c69822ef 100644 --- a/instat/sdgTimeSeries.Designer.vb +++ b/instat/sdgTimeSeries.Designer.vb @@ -22,13 +22,15 @@ Partial Class sdgTimeSeries 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.Summaries = New System.Windows.Forms.GroupBox() - Me.UcrCheck6 = New instat.ucrCheck() - Me.UcrCheck5 = New instat.ucrCheck() - Me.UcrCheck4 = New instat.ucrCheck() - Me.UcrCheck3 = New instat.ucrCheck() - Me.UcrCheck2 = New instat.ucrCheck() - Me.UcrCheck1 = New instat.ucrCheck() + Me.grpSummaries = New System.Windows.Forms.GroupBox() + Me.ucrChkKge = New instat.ucrCheck() + Me.ucrChkRmse = New instat.ucrCheck() + Me.ucrChkMae = New instat.ucrCheck() + Me.ucrChkMe = New instat.ucrCheck() + Me.ucrChkRSd = New instat.ucrCheck() + Me.ucrChkPBias = New instat.ucrCheck() + Me.ucrChkCor = New instat.ucrCheck() + Me.ucrChkN = New instat.ucrCheck() Me.ucrInputSeparator = New System.Windows.Forms.TextBox() Me.lblSeparator = New System.Windows.Forms.Label() Me.lblPosition = New System.Windows.Forms.Label() @@ -36,83 +38,101 @@ Partial Class sdgTimeSeries Me.ucrInputPosition = New instat.ucrInputComboBox() Me.ucrInputFontSize = New System.Windows.Forms.TextBox() Me.ucrButtonsSummaries = New instat.ucrButtonsSubdialogue() - Me.Summaries.SuspendLayout() + Me.grpSummaries.SuspendLayout() Me.SuspendLayout() ' - 'Summaries - ' - Me.Summaries.Controls.Add(Me.UcrCheck6) - Me.Summaries.Controls.Add(Me.UcrCheck5) - Me.Summaries.Controls.Add(Me.UcrCheck4) - Me.Summaries.Controls.Add(Me.UcrCheck3) - Me.Summaries.Controls.Add(Me.UcrCheck2) - Me.Summaries.Controls.Add(Me.UcrCheck1) - Me.Summaries.Location = New System.Drawing.Point(11, 13) - Me.Summaries.Name = "Summaries" - Me.Summaries.Size = New System.Drawing.Size(332, 139) - Me.Summaries.TabIndex = 0 - Me.Summaries.TabStop = False - Me.Summaries.Text = "grpSummaries" - ' - 'UcrCheck6 - ' - Me.UcrCheck6.Checked = False - Me.UcrCheck6.Location = New System.Drawing.Point(219, 65) - Me.UcrCheck6.Name = "UcrCheck6" - Me.UcrCheck6.Size = New System.Drawing.Size(100, 20) - Me.UcrCheck6.TabIndex = 5 - ' - 'UcrCheck5 - ' - Me.UcrCheck5.Checked = False - Me.UcrCheck5.Location = New System.Drawing.Point(113, 65) - Me.UcrCheck5.Name = "UcrCheck5" - Me.UcrCheck5.Size = New System.Drawing.Size(100, 20) - Me.UcrCheck5.TabIndex = 4 - ' - 'UcrCheck4 - ' - Me.UcrCheck4.Checked = False - Me.UcrCheck4.Location = New System.Drawing.Point(7, 65) - Me.UcrCheck4.Name = "UcrCheck4" - Me.UcrCheck4.Size = New System.Drawing.Size(100, 20) - Me.UcrCheck4.TabIndex = 3 - ' - 'UcrCheck3 - ' - Me.UcrCheck3.Checked = False - Me.UcrCheck3.Location = New System.Drawing.Point(219, 29) - Me.UcrCheck3.Name = "UcrCheck3" - Me.UcrCheck3.Size = New System.Drawing.Size(100, 20) - Me.UcrCheck3.TabIndex = 2 - ' - 'UcrCheck2 - ' - Me.UcrCheck2.Checked = False - Me.UcrCheck2.Location = New System.Drawing.Point(113, 29) - Me.UcrCheck2.Name = "UcrCheck2" - Me.UcrCheck2.Size = New System.Drawing.Size(100, 20) - Me.UcrCheck2.TabIndex = 1 - ' - 'UcrCheck1 - ' - Me.UcrCheck1.Checked = False - Me.UcrCheck1.Location = New System.Drawing.Point(7, 29) - Me.UcrCheck1.Name = "UcrCheck1" - Me.UcrCheck1.Size = New System.Drawing.Size(100, 20) - Me.UcrCheck1.TabIndex = 0 + 'grpSummaries + ' + Me.grpSummaries.Controls.Add(Me.ucrChkKge) + Me.grpSummaries.Controls.Add(Me.ucrChkRmse) + Me.grpSummaries.Controls.Add(Me.ucrChkMae) + Me.grpSummaries.Controls.Add(Me.ucrChkMe) + Me.grpSummaries.Controls.Add(Me.ucrChkRSd) + Me.grpSummaries.Controls.Add(Me.ucrChkPBias) + Me.grpSummaries.Controls.Add(Me.ucrChkCor) + Me.grpSummaries.Controls.Add(Me.ucrChkN) + Me.grpSummaries.Location = New System.Drawing.Point(11, 13) + Me.grpSummaries.Name = "grpSummaries" + Me.grpSummaries.Size = New System.Drawing.Size(294, 112) + Me.grpSummaries.TabIndex = 0 + Me.grpSummaries.TabStop = False + Me.grpSummaries.Text = "Annotated Summaries" + ' + 'ucrChkKge + ' + Me.ucrChkKge.Checked = False + Me.ucrChkKge.Location = New System.Drawing.Point(224, 67) + Me.ucrChkKge.Name = "ucrChkKge" + Me.ucrChkKge.Size = New System.Drawing.Size(60, 20) + Me.ucrChkKge.TabIndex = 10 + ' + 'ucrChkRmse + ' + Me.ucrChkRmse.Checked = False + Me.ucrChkRmse.Location = New System.Drawing.Point(153, 67) + Me.ucrChkRmse.Name = "ucrChkRmse" + Me.ucrChkRmse.Size = New System.Drawing.Size(60, 20) + Me.ucrChkRmse.TabIndex = 9 + ' + 'ucrChkMae + ' + Me.ucrChkMae.Checked = False + Me.ucrChkMae.Location = New System.Drawing.Point(82, 67) + Me.ucrChkMae.Name = "ucrChkMae" + Me.ucrChkMae.Size = New System.Drawing.Size(60, 20) + Me.ucrChkMae.TabIndex = 8 + ' + 'ucrChkMe + ' + Me.ucrChkMe.Checked = False + Me.ucrChkMe.Location = New System.Drawing.Point(11, 67) + Me.ucrChkMe.Name = "ucrChkMe" + Me.ucrChkMe.Size = New System.Drawing.Size(60, 20) + Me.ucrChkMe.TabIndex = 7 + ' + 'ucrChkRSd + ' + Me.ucrChkRSd.Checked = False + Me.ucrChkRSd.Location = New System.Drawing.Point(224, 29) + Me.ucrChkRSd.Name = "ucrChkRSd" + Me.ucrChkRSd.Size = New System.Drawing.Size(60, 20) + Me.ucrChkRSd.TabIndex = 6 + ' + 'ucrChkPBias + ' + Me.ucrChkPBias.Checked = False + Me.ucrChkPBias.Location = New System.Drawing.Point(153, 29) + Me.ucrChkPBias.Name = "ucrChkPBias" + Me.ucrChkPBias.Size = New System.Drawing.Size(60, 20) + Me.ucrChkPBias.TabIndex = 2 + ' + 'ucrChkCor + ' + Me.ucrChkCor.Checked = False + Me.ucrChkCor.Location = New System.Drawing.Point(82, 29) + Me.ucrChkCor.Name = "ucrChkCor" + Me.ucrChkCor.Size = New System.Drawing.Size(60, 20) + Me.ucrChkCor.TabIndex = 1 + ' + 'ucrChkN + ' + Me.ucrChkN.Checked = False + Me.ucrChkN.Location = New System.Drawing.Point(11, 29) + Me.ucrChkN.Name = "ucrChkN" + Me.ucrChkN.Size = New System.Drawing.Size(60, 20) + Me.ucrChkN.TabIndex = 0 ' 'ucrInputSeparator ' - Me.ucrInputSeparator.Location = New System.Drawing.Point(87, 167) + Me.ucrInputSeparator.Location = New System.Drawing.Point(89, 136) Me.ucrInputSeparator.Name = "ucrInputSeparator" - Me.ucrInputSeparator.Size = New System.Drawing.Size(100, 20) + Me.ucrInputSeparator.Size = New System.Drawing.Size(43, 20) Me.ucrInputSeparator.TabIndex = 1 ' 'lblSeparator ' Me.lblSeparator.AutoSize = True - Me.lblSeparator.Location = New System.Drawing.Point(13, 170) + Me.lblSeparator.Location = New System.Drawing.Point(11, 140) Me.lblSeparator.Name = "lblSeparator" Me.lblSeparator.Size = New System.Drawing.Size(56, 13) Me.lblSeparator.TabIndex = 2 @@ -121,7 +141,7 @@ Partial Class sdgTimeSeries 'lblPosition ' Me.lblPosition.AutoSize = True - Me.lblPosition.Location = New System.Drawing.Point(22, 203) + Me.lblPosition.Location = New System.Drawing.Point(11, 171) Me.lblPosition.Name = "lblPosition" Me.lblPosition.Size = New System.Drawing.Size(47, 13) Me.lblPosition.TabIndex = 3 @@ -130,7 +150,7 @@ Partial Class sdgTimeSeries 'lblFontSize ' Me.lblFontSize.AutoSize = True - Me.lblFontSize.Location = New System.Drawing.Point(15, 238) + Me.lblFontSize.Location = New System.Drawing.Point(11, 203) Me.lblFontSize.Name = "lblFontSize" Me.lblFontSize.Size = New System.Drawing.Size(54, 13) Me.lblFontSize.TabIndex = 4 @@ -141,21 +161,21 @@ Partial Class sdgTimeSeries Me.ucrInputPosition.AddQuotesIfUnrecognised = True Me.ucrInputPosition.GetSetSelectedIndex = -1 Me.ucrInputPosition.IsReadOnly = False - Me.ucrInputPosition.Location = New System.Drawing.Point(87, 200) + Me.ucrInputPosition.Location = New System.Drawing.Point(89, 167) Me.ucrInputPosition.Name = "ucrInputPosition" Me.ucrInputPosition.Size = New System.Drawing.Size(100, 21) Me.ucrInputPosition.TabIndex = 5 ' 'ucrInputFontSize ' - Me.ucrInputFontSize.Location = New System.Drawing.Point(87, 231) + Me.ucrInputFontSize.Location = New System.Drawing.Point(89, 199) Me.ucrInputFontSize.Name = "ucrInputFontSize" Me.ucrInputFontSize.Size = New System.Drawing.Size(100, 20) Me.ucrInputFontSize.TabIndex = 6 ' 'ucrButtonsSummaries ' - Me.ucrButtonsSummaries.Location = New System.Drawing.Point(96, 277) + Me.ucrButtonsSummaries.Location = New System.Drawing.Point(82, 241) Me.ucrButtonsSummaries.Margin = New System.Windows.Forms.Padding(4) Me.ucrButtonsSummaries.Name = "ucrButtonsSummaries" Me.ucrButtonsSummaries.Size = New System.Drawing.Size(150, 31) @@ -165,7 +185,7 @@ Partial Class sdgTimeSeries ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(349, 321) + Me.ClientSize = New System.Drawing.Size(315, 276) Me.Controls.Add(Me.ucrButtonsSummaries) Me.Controls.Add(Me.ucrInputFontSize) Me.Controls.Add(Me.ucrInputPosition) @@ -173,26 +193,23 @@ Partial Class sdgTimeSeries Me.Controls.Add(Me.lblPosition) Me.Controls.Add(Me.lblSeparator) Me.Controls.Add(Me.ucrInputSeparator) - Me.Controls.Add(Me.Summaries) + Me.Controls.Add(Me.grpSummaries) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "sdgTimeSeries" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Summaries" - Me.Summaries.ResumeLayout(False) + Me.grpSummaries.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents Summaries As GroupBox - Friend WithEvents UcrCheck6 As ucrCheck - Friend WithEvents UcrCheck5 As ucrCheck - Friend WithEvents UcrCheck4 As ucrCheck - Friend WithEvents UcrCheck3 As ucrCheck - Friend WithEvents UcrCheck2 As ucrCheck - Friend WithEvents UcrCheck1 As ucrCheck + Friend WithEvents grpSummaries As GroupBox + Friend WithEvents ucrChkPBias As ucrCheck + Friend WithEvents ucrChkCor As ucrCheck + Friend WithEvents ucrChkN As ucrCheck Friend WithEvents ucrInputSeparator As TextBox Friend WithEvents lblSeparator As Label Friend WithEvents lblPosition As Label @@ -200,4 +217,9 @@ Partial Class sdgTimeSeries Friend WithEvents ucrInputPosition As ucrInputComboBox Friend WithEvents ucrInputFontSize As TextBox Friend WithEvents ucrButtonsSummaries As ucrButtonsSubdialogue + Friend WithEvents ucrChkKge As ucrCheck + Friend WithEvents ucrChkRmse As ucrCheck + Friend WithEvents ucrChkMae As ucrCheck + Friend WithEvents ucrChkMe As ucrCheck + Friend WithEvents ucrChkRSd As ucrCheck End Class diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb index 8e40a5f2814..8e4d1002a73 100644 --- a/instat/sdgTimeSeries.vb +++ b/instat/sdgTimeSeries.vb @@ -1,3 +1,206 @@ -Public Class sdgTimeSeries +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . +Imports instat.Translations + +Public Class sdgTimeSeries + Private bRCodeSet As Boolean = False + Private bControlsInitialised As Boolean = False + + Private strGeomTextParameterName As String = "geom_text" + + Private clsSummarise As RFunction + Private clsN As RFunction + Private clsCor As RFunction + Private clsPbias As RFunction + Private clsRSd As RFunction + Private clsMe As RFunction + Private clsMae As RFunction + Private clsRmse As RFunction + Private clsKge As RFunction + + Private clsGgplotOperator As ROperator + Private clsGeomText As RFunction + Private clsPasteLabel As RFunction + Private clsPasteN As RFunction + Private clsPasteCor As RFunction + Private clsPastePbias As RFunction + Private clsPasteRSd As RFunction + Private clsPasteMe As RFunction + Private clsPasteMae As RFunction + Private clsPasteRmse As RFunction + Private clsPasteKge As RFunction + + Private dctSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) + + Private Sub sdgTimeSeries_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + End Sub + + Public Sub InitialiseControls() + ucrChkN.SetText("N") + ucrChkN.AddParameterPresentCondition(True, "n") + ucrChkN.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) + + ucrChkCor.SetText("Cor") + ucrChkCor.AddParameterPresentCondition(True, "cor") + ucrChkCor.AddParameterPresentCondition(False, "cor", bNewIsPositive:=False) + + ucrChkPBias.SetText("% Bias") + ucrChkPBias.AddParameterPresentCondition(True, "pbias") + ucrChkPBias.AddParameterPresentCondition(False, "pbias", bNewIsPositive:=False) + + ucrChkRSd.SetText("rSD") + ucrChkRSd.AddParameterPresentCondition(True, "rsd") + ucrChkRSd.AddParameterPresentCondition(False, "rsd", bNewIsPositive:=False) + + ucrChkMe.SetText("ME") + ucrChkMe.AddParameterPresentCondition(True, "me") + ucrChkMe.AddParameterPresentCondition(False, "me", bNewIsPositive:=False) + + ucrChkMae.SetText("MAE") + ucrChkMae.AddParameterPresentCondition(True, "mae") + ucrChkMae.AddParameterPresentCondition(False, "mae", bNewIsPositive:=False) + + ucrChkRmse.SetText("RMSE") + ucrChkRmse.AddParameterPresentCondition(True, "rmse") + ucrChkRmse.AddParameterPresentCondition(False, "rmse", bNewIsPositive:=False) + + ucrChkKge.SetText("KGE") + ucrChkKge.AddParameterPresentCondition(True, "kge") + ucrChkKge.AddParameterPresentCondition(False, "kge", bNewIsPositive:=False) + End Sub + + Public Sub SetRCode(clsNewSummarise As RFunction, dctNewSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)), clsNewGgplotOperator As ROperator, clsNewGeomText As RFunction, clsNewPasteLabel As RFunction, Optional bReset As Boolean = False) + bRCodeSet = False + + If Not bControlsInitialised Then + InitialiseControls() + End If + + clsSummarise = clsNewSummarise + dctSummaries = dctNewSummaries + clsGgplotOperator = clsNewGgplotOperator + clsGeomText = clsNewGeomText + clsPasteLabel = clsNewPasteLabel + + ucrChkN.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + ucrChkCor.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + ucrChkPBias.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + ucrChkRSd.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + ucrChkMe.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + ucrChkMae.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + ucrChkRmse.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + ucrChkKge.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + + bRCodeSet = True + CheckBoxesCheck() + End Sub + + Private Sub ucrChk_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkN.ControlValueChanged, ucrChkCor.ControlValueChanged, ucrChkPBias.ControlValueChanged, ucrChkRSd.ControlValueChanged, ucrChkMe.ControlValueChanged, ucrChkMae.ControlValueChanged, ucrChkRmse.ControlValueChanged, ucrChkKge.ControlValueChanged + CheckBoxesCheck() + End Sub + + Private Sub CheckBoxesCheck() + If bRCodeSet Then + If Not ucrChkN.Checked AndAlso Not ucrChkCor.Checked AndAlso Not ucrChkPBias.Checked AndAlso Not ucrChkRSd.Checked AndAlso Not ucrChkMe.Checked AndAlso Not ucrChkMae.Checked AndAlso Not ucrChkRmse.Checked AndAlso Not ucrChkKge.Checked Then + clsGgplotOperator.RemoveParameterByName(strGeomTextParameterName) + Else + clsGgplotOperator.AddParameter(strGeomTextParameterName, clsRFunctionParameter:=clsGeomText, iPosition:=4) + End If + End If + End Sub + + Private Sub ucrChkN_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkN.ControlValueChanged + If ucrChkN.Checked Then + clsSummarise.AddParameter("n", clsRFunctionParameter:=dctSummaries("n").Item1, iPosition:=0) + clsPasteLabel.AddParameter("n", clsRFunctionParameter:=dctSummaries("n").Item2, iPosition:=0) + Else + clsSummarise.RemoveParameterByName("n") + clsPasteLabel.RemoveParameterByName("n") + End If + End Sub + + Private Sub ucrChkCor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkCor.ControlValueChanged + If ucrChkCor.Checked Then + clsSummarise.AddParameter("cor", clsRFunctionParameter:=dctSummaries("cor").Item1, iPosition:=1) + clsPasteLabel.AddParameter("cor", clsRFunctionParameter:=dctSummaries("cor").Item2, iPosition:=1) + Else + clsSummarise.RemoveParameterByName("cor") + clsPasteLabel.RemoveParameterByName("cor") + End If + End Sub + + Private Sub ucrChkPBias_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPBias.ControlValueChanged + If ucrChkPBias.Checked Then + clsSummarise.AddParameter("pbias", clsRFunctionParameter:=dctSummaries("pbias").Item1, iPosition:=2) + clsPasteLabel.AddParameter("pbias", clsRFunctionParameter:=dctSummaries("pbias").Item2, iPosition:=2) + Else + clsSummarise.RemoveParameterByName("pbias") + clsPasteLabel.RemoveParameterByName("pbias") + End If + End Sub + + Private Sub ucrChkRSd_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkRSd.ControlValueChanged + If ucrChkRSd.Checked Then + clsSummarise.AddParameter("rsd", clsRFunctionParameter:=dctSummaries("rsd").Item1, iPosition:=3) + clsPasteLabel.AddParameter("rsd", clsRFunctionParameter:=dctSummaries("rsd").Item2, iPosition:=3) + Else + clsSummarise.RemoveParameterByName("rsd") + clsPasteLabel.RemoveParameterByName("rsd") + End If + End Sub + + Private Sub ucrChkMe_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMe.ControlValueChanged + If ucrChkMe.Checked Then + clsSummarise.AddParameter("me", clsRFunctionParameter:=dctSummaries("me").Item1, iPosition:=4) + clsPasteLabel.AddParameter("me", clsRFunctionParameter:=dctSummaries("me").Item2, iPosition:=4) + Else + clsSummarise.RemoveParameterByName("me") + clsPasteLabel.RemoveParameterByName("me") + End If + End Sub + + Private Sub ucrChkMae_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMae.ControlValueChanged + If ucrChkMae.Checked Then + clsSummarise.AddParameter("mae", clsRFunctionParameter:=dctSummaries("mae").Item1, iPosition:=5) + clsPasteLabel.AddParameter("mae", clsRFunctionParameter:=dctSummaries("mae").Item2, iPosition:=5) + Else + clsSummarise.RemoveParameterByName("mae") + clsPasteLabel.RemoveParameterByName("mae") + End If + End Sub + + Private Sub ucrChkRmse_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkRmse.ControlValueChanged + If ucrChkRmse.Checked Then + clsSummarise.AddParameter("rmse", clsRFunctionParameter:=dctSummaries("rmse").Item1, iPosition:=6) + clsPasteLabel.AddParameter("rmse", clsRFunctionParameter:=dctSummaries("rmse").Item2, iPosition:=6) + Else + clsSummarise.RemoveParameterByName("rmse") + clsPasteLabel.RemoveParameterByName("rmse") + End If + End Sub + + Private Sub ucrChkKge_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkKge.ControlValueChanged + If ucrChkKge.Checked Then + clsSummarise.AddParameter("kge", clsRFunctionParameter:=dctSummaries("kge").Item1, iPosition:=7) + clsPasteLabel.AddParameter("kge", clsRFunctionParameter:=dctSummaries("kge").Item2, iPosition:=7) + Else + clsSummarise.RemoveParameterByName("kge") + clsPasteLabel.RemoveParameterByName("kge") + End If + End Sub End Class \ No newline at end of file From 0ec8f358a04d21a60b0501721b429c87f8767bdf Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Sat, 19 Sep 2020 20:24:28 +0100 Subject: [PATCH 155/277] completed summary annotations sub dialog and main dialog --- instat/dlgTimeSeriesPlot.Designer.vb | 4 +- instat/dlgTimeSeriesPlot.vb | 14 ++++-- instat/sdgTimeSeries.Designer.vb | 72 ++++++++++++++------------- instat/sdgTimeSeries.vb | 74 ++++++++++++++++++++++------ 4 files changed, 109 insertions(+), 55 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb index 7b735e59a78..ee1b4011aff 100644 --- a/instat/dlgTimeSeriesPlot.Designer.vb +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -79,9 +79,9 @@ Partial Class dlgTimeSeriesPlot ' Me.cmdSummaries.Location = New System.Drawing.Point(9, 345) Me.cmdSummaries.Name = "cmdSummaries" - Me.cmdSummaries.Size = New System.Drawing.Size(75, 23) + Me.cmdSummaries.Size = New System.Drawing.Size(120, 23) Me.cmdSummaries.TabIndex = 12 - Me.cmdSummaries.Text = "Summaries" + Me.cmdSummaries.Text = "Summary Annotations" Me.cmdSummaries.UseVisualStyleBackColor = True ' 'ucrSavePlot diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 1f9c1c83843..1b64dc630e7 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -136,12 +136,14 @@ Public Class dlgTimeSeriesPlot ucrReceiverReference.SetParameterIsString() ucrReceiverReference.bWithQuotes = False ucrReceiverReference.SetDataType("numeric") + ucrReceiverReference.strSelectorHeading = "Numerics" ucrReceiverEstimates.SetParameter(New RParameter("x", 0)) ucrReceiverEstimates.Selector = ucrSelectorTimeSeriesPlots ucrReceiverEstimates.SetParameterIsString() ucrReceiverEstimates.bWithQuotes = False ucrReceiverEstimates.SetDataType("numeric") + ucrReceiverEstimates.strSelectorHeading = "Numerics" ucrReceiverTime.SetParameter(New RParameter("x", 0)) ucrReceiverTime.Selector = ucrSelectorTimeSeriesPlots @@ -157,6 +159,7 @@ Public Class dlgTimeSeriesPlot ucrReceiverStation.SetDataType("factor") ucrReceiverStation.SetClimaticType("station") ucrReceiverStation.bAutoFill = True + ucrReceiverStation.strSelectorHeading = "Factors" clsAdjustNAMutate = New RFunction clsAdjustNAMutateParameter = New RParameter("1", clsAdjustNAMutate, iNewPosition:=1) @@ -310,6 +313,7 @@ Public Class dlgTimeSeriesPlot clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.AddParameter("0", clsROperatorParameter:=clsAdjustNAOperator, iPosition:=0) clsSummaryOperator.AddParameter("2", clsRFunctionParameter:=clsSummarise, iPosition:=2) + clsSummaryOperator.bBrackets = False clsSummaryGroupBy.SetPackageName("dplyr") clsSummaryGroupBy.SetRCommand("group_by") @@ -391,6 +395,7 @@ Public Class dlgTimeSeriesPlot clsGeomTextAes.AddParameter("label", clsRFunctionParameter:=clsPasteLabel, iPosition:=0) clsPasteLabel.SetRCommand("paste") + clsPasteLabel.AddParameter("sep", Chr(34) & " ; " & Chr(34), iPosition:=8) clsPasteN.SetRCommand("paste") clsPasteN.AddParameter("0", Chr(34) & "n" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) @@ -405,7 +410,7 @@ Public Class dlgTimeSeriesPlot clsRoundCor.AddParameter("digits", "2", iPosition:=1) clsPasteMe.SetRCommand("paste") - clsPasteMe.AddParameter("0", Chr(34) & "me" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteMe.AddParameter("0", Chr(34) & "ME" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) clsPasteMe.AddParameter("1", clsRFunctionParameter:=clsSignifMe, iPosition:=1, bIncludeArgumentName:=False) clsSignifMe.SetRCommand("signif") @@ -413,7 +418,7 @@ Public Class dlgTimeSeriesPlot clsSignifMe.AddParameter("digits", "2", iPosition:=1) clsPasteMae.SetRCommand("paste") - clsPasteMae.AddParameter("0", Chr(34) & "mae" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteMae.AddParameter("0", Chr(34) & "MAE" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) clsPasteMae.AddParameter("1", clsRFunctionParameter:=clsSignifMae, iPosition:=1, bIncludeArgumentName:=False) clsSignifMae.SetRCommand("signif") @@ -421,7 +426,7 @@ Public Class dlgTimeSeriesPlot clsSignifMae.AddParameter("digits", "2", iPosition:=1) clsPasteRmse.SetRCommand("paste") - clsPasteRmse.AddParameter("0", Chr(34) & "rmse" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteRmse.AddParameter("0", Chr(34) & "RMSE" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) clsPasteRmse.AddParameter("1", clsRFunctionParameter:=clsSignifRmse, iPosition:=1, bIncludeArgumentName:=False) clsSignifRmse.SetRCommand("signif") @@ -429,7 +434,7 @@ Public Class dlgTimeSeriesPlot clsSignifRmse.AddParameter("digits", "2", iPosition:=1) clsPastePbias.SetRCommand("paste") - clsPastePbias.AddParameter("0", Chr(34) & "%bias" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPastePbias.AddParameter("0", Chr(34) & "% Bias" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) clsPastePbias.AddParameter("1", clsRFunctionParameter:=clsRoundPbias, iPosition:=1, bIncludeArgumentName:=False) clsRoundPbias.SetRCommand("round") @@ -504,6 +509,7 @@ Public Class dlgTimeSeriesPlot ucrChkNAValues.SetRCode(clsAdjustNAOperator, bReset) ucrChkIncludePoints.SetRCode(clsGgplotOperator, bReset) ucrChkIncludeMeanLines.SetRCode(clsGgplotOperator, bReset) + ucrSavePlot.SetRCode(clsGgplotOperator, bReset) SetDataFrameAssignTo() End Sub diff --git a/instat/sdgTimeSeries.Designer.vb b/instat/sdgTimeSeries.Designer.vb index c21c69822ef..0264b5efe4a 100644 --- a/instat/sdgTimeSeries.Designer.vb +++ b/instat/sdgTimeSeries.Designer.vb @@ -31,13 +31,13 @@ Partial Class sdgTimeSeries Me.ucrChkPBias = New instat.ucrCheck() Me.ucrChkCor = New instat.ucrCheck() Me.ucrChkN = New instat.ucrCheck() - Me.ucrInputSeparator = New System.Windows.Forms.TextBox() Me.lblSeparator = New System.Windows.Forms.Label() Me.lblPosition = New System.Windows.Forms.Label() Me.lblFontSize = New System.Windows.Forms.Label() Me.ucrInputPosition = New instat.ucrInputComboBox() - Me.ucrInputFontSize = New System.Windows.Forms.TextBox() Me.ucrButtonsSummaries = New instat.ucrButtonsSubdialogue() + Me.ucrInputSeparator = New instat.ucrInputTextBox() + Me.ucrInputFontSize = New instat.ucrInputTextBox() Me.grpSummaries.SuspendLayout() Me.SuspendLayout() ' @@ -53,15 +53,15 @@ Partial Class sdgTimeSeries Me.grpSummaries.Controls.Add(Me.ucrChkN) Me.grpSummaries.Location = New System.Drawing.Point(11, 13) Me.grpSummaries.Name = "grpSummaries" - Me.grpSummaries.Size = New System.Drawing.Size(294, 112) + Me.grpSummaries.Size = New System.Drawing.Size(294, 95) Me.grpSummaries.TabIndex = 0 Me.grpSummaries.TabStop = False - Me.grpSummaries.Text = "Annotated Summaries" + Me.grpSummaries.Text = "Summaries" ' 'ucrChkKge ' Me.ucrChkKge.Checked = False - Me.ucrChkKge.Location = New System.Drawing.Point(224, 67) + Me.ucrChkKge.Location = New System.Drawing.Point(224, 61) Me.ucrChkKge.Name = "ucrChkKge" Me.ucrChkKge.Size = New System.Drawing.Size(60, 20) Me.ucrChkKge.TabIndex = 10 @@ -69,7 +69,7 @@ Partial Class sdgTimeSeries 'ucrChkRmse ' Me.ucrChkRmse.Checked = False - Me.ucrChkRmse.Location = New System.Drawing.Point(153, 67) + Me.ucrChkRmse.Location = New System.Drawing.Point(153, 61) Me.ucrChkRmse.Name = "ucrChkRmse" Me.ucrChkRmse.Size = New System.Drawing.Size(60, 20) Me.ucrChkRmse.TabIndex = 9 @@ -77,7 +77,7 @@ Partial Class sdgTimeSeries 'ucrChkMae ' Me.ucrChkMae.Checked = False - Me.ucrChkMae.Location = New System.Drawing.Point(82, 67) + Me.ucrChkMae.Location = New System.Drawing.Point(82, 61) Me.ucrChkMae.Name = "ucrChkMae" Me.ucrChkMae.Size = New System.Drawing.Size(60, 20) Me.ucrChkMae.TabIndex = 8 @@ -85,7 +85,7 @@ Partial Class sdgTimeSeries 'ucrChkMe ' Me.ucrChkMe.Checked = False - Me.ucrChkMe.Location = New System.Drawing.Point(11, 67) + Me.ucrChkMe.Location = New System.Drawing.Point(11, 61) Me.ucrChkMe.Name = "ucrChkMe" Me.ucrChkMe.Size = New System.Drawing.Size(60, 20) Me.ucrChkMe.TabIndex = 7 @@ -122,17 +122,10 @@ Partial Class sdgTimeSeries Me.ucrChkN.Size = New System.Drawing.Size(60, 20) Me.ucrChkN.TabIndex = 0 ' - 'ucrInputSeparator - ' - Me.ucrInputSeparator.Location = New System.Drawing.Point(89, 136) - Me.ucrInputSeparator.Name = "ucrInputSeparator" - Me.ucrInputSeparator.Size = New System.Drawing.Size(43, 20) - Me.ucrInputSeparator.TabIndex = 1 - ' 'lblSeparator ' Me.lblSeparator.AutoSize = True - Me.lblSeparator.Location = New System.Drawing.Point(11, 140) + Me.lblSeparator.Location = New System.Drawing.Point(11, 125) Me.lblSeparator.Name = "lblSeparator" Me.lblSeparator.Size = New System.Drawing.Size(56, 13) Me.lblSeparator.TabIndex = 2 @@ -141,7 +134,7 @@ Partial Class sdgTimeSeries 'lblPosition ' Me.lblPosition.AutoSize = True - Me.lblPosition.Location = New System.Drawing.Point(11, 171) + Me.lblPosition.Location = New System.Drawing.Point(11, 156) Me.lblPosition.Name = "lblPosition" Me.lblPosition.Size = New System.Drawing.Size(47, 13) Me.lblPosition.TabIndex = 3 @@ -150,7 +143,7 @@ Partial Class sdgTimeSeries 'lblFontSize ' Me.lblFontSize.AutoSize = True - Me.lblFontSize.Location = New System.Drawing.Point(11, 203) + Me.lblFontSize.Location = New System.Drawing.Point(11, 188) Me.lblFontSize.Name = "lblFontSize" Me.lblFontSize.Size = New System.Drawing.Size(54, 13) Me.lblFontSize.TabIndex = 4 @@ -161,45 +154,58 @@ Partial Class sdgTimeSeries Me.ucrInputPosition.AddQuotesIfUnrecognised = True Me.ucrInputPosition.GetSetSelectedIndex = -1 Me.ucrInputPosition.IsReadOnly = False - Me.ucrInputPosition.Location = New System.Drawing.Point(89, 167) + Me.ucrInputPosition.Location = New System.Drawing.Point(89, 152) Me.ucrInputPosition.Name = "ucrInputPosition" Me.ucrInputPosition.Size = New System.Drawing.Size(100, 21) Me.ucrInputPosition.TabIndex = 5 ' - 'ucrInputFontSize - ' - Me.ucrInputFontSize.Location = New System.Drawing.Point(89, 199) - Me.ucrInputFontSize.Name = "ucrInputFontSize" - Me.ucrInputFontSize.Size = New System.Drawing.Size(100, 20) - Me.ucrInputFontSize.TabIndex = 6 - ' 'ucrButtonsSummaries ' - Me.ucrButtonsSummaries.Location = New System.Drawing.Point(82, 241) + Me.ucrButtonsSummaries.Location = New System.Drawing.Point(82, 228) Me.ucrButtonsSummaries.Margin = New System.Windows.Forms.Padding(4) Me.ucrButtonsSummaries.Name = "ucrButtonsSummaries" Me.ucrButtonsSummaries.Size = New System.Drawing.Size(150, 31) Me.ucrButtonsSummaries.TabIndex = 7 ' + 'ucrInputSeparator + ' + Me.ucrInputSeparator.AddQuotesIfUnrecognised = True + Me.ucrInputSeparator.IsMultiline = False + Me.ucrInputSeparator.IsReadOnly = False + Me.ucrInputSeparator.Location = New System.Drawing.Point(89, 121) + Me.ucrInputSeparator.Name = "ucrInputSeparator" + Me.ucrInputSeparator.Size = New System.Drawing.Size(40, 21) + Me.ucrInputSeparator.TabIndex = 8 + ' + 'ucrInputFontSize + ' + Me.ucrInputFontSize.AddQuotesIfUnrecognised = True + Me.ucrInputFontSize.IsMultiline = False + Me.ucrInputFontSize.IsReadOnly = False + Me.ucrInputFontSize.Location = New System.Drawing.Point(89, 184) + Me.ucrInputFontSize.Name = "ucrInputFontSize" + Me.ucrInputFontSize.Size = New System.Drawing.Size(40, 21) + Me.ucrInputFontSize.TabIndex = 9 + ' 'sdgTimeSeries ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(315, 276) - Me.Controls.Add(Me.ucrButtonsSummaries) + Me.ClientSize = New System.Drawing.Size(315, 265) Me.Controls.Add(Me.ucrInputFontSize) + Me.Controls.Add(Me.ucrInputSeparator) + Me.Controls.Add(Me.ucrButtonsSummaries) Me.Controls.Add(Me.ucrInputPosition) Me.Controls.Add(Me.lblFontSize) Me.Controls.Add(Me.lblPosition) Me.Controls.Add(Me.lblSeparator) - Me.Controls.Add(Me.ucrInputSeparator) Me.Controls.Add(Me.grpSummaries) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "sdgTimeSeries" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen - Me.Text = "Summaries" + Me.Text = "Summary Annotations" Me.grpSummaries.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() @@ -210,16 +216,16 @@ Partial Class sdgTimeSeries Friend WithEvents ucrChkPBias As ucrCheck Friend WithEvents ucrChkCor As ucrCheck Friend WithEvents ucrChkN As ucrCheck - Friend WithEvents ucrInputSeparator As TextBox Friend WithEvents lblSeparator As Label Friend WithEvents lblPosition As Label Friend WithEvents lblFontSize As Label Friend WithEvents ucrInputPosition As ucrInputComboBox - Friend WithEvents ucrInputFontSize As TextBox Friend WithEvents ucrButtonsSummaries As ucrButtonsSubdialogue Friend WithEvents ucrChkKge As ucrCheck Friend WithEvents ucrChkRmse As ucrCheck Friend WithEvents ucrChkMae As ucrCheck Friend WithEvents ucrChkMe As ucrCheck Friend WithEvents ucrChkRSd As ucrCheck + Friend WithEvents ucrInputSeparator As ucrInputTextBox + Friend WithEvents ucrInputFontSize As ucrInputTextBox End Class diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb index 8e4d1002a73..b1ffd7a7efa 100644 --- a/instat/sdgTimeSeries.vb +++ b/instat/sdgTimeSeries.vb @@ -22,27 +22,16 @@ Public Class sdgTimeSeries Private strGeomTextParameterName As String = "geom_text" + Private strTopLeft As String = "Top Left" + Private strTopRight As String = "Top Right" + Private strBottomLeft As String = "Bottom Left" + Private strBottomRight As String = "Bottom Right" + Private clsSummarise As RFunction - Private clsN As RFunction - Private clsCor As RFunction - Private clsPbias As RFunction - Private clsRSd As RFunction - Private clsMe As RFunction - Private clsMae As RFunction - Private clsRmse As RFunction - Private clsKge As RFunction Private clsGgplotOperator As ROperator Private clsGeomText As RFunction Private clsPasteLabel As RFunction - Private clsPasteN As RFunction - Private clsPasteCor As RFunction - Private clsPastePbias As RFunction - Private clsPasteRSd As RFunction - Private clsPasteMe As RFunction - Private clsPasteMae As RFunction - Private clsPasteRmse As RFunction - Private clsPasteKge As RFunction Private dctSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) @@ -82,6 +71,24 @@ Public Class sdgTimeSeries ucrChkKge.SetText("KGE") ucrChkKge.AddParameterPresentCondition(True, "kge") ucrChkKge.AddParameterPresentCondition(False, "kge", bNewIsPositive:=False) + + ucrInputPosition.SetItems({"Top Left", "Top Right", "Bottom Left", "Bottom Right"}) + ucrInputPosition.SetDropDownStyleAsNonEditable() + ucrInputPosition.AddParameterValuesCondition(strTopLeft, "x", "-Inf") + ucrInputPosition.AddParameterValuesCondition(strTopLeft, "y", "Inf") + ucrInputPosition.AddParameterValuesCondition(strTopRight, "x", "Inf") + ucrInputPosition.AddParameterValuesCondition(strTopRight, "y", "Inf") + ucrInputPosition.AddParameterValuesCondition(strBottomLeft, "x", "-Inf") + ucrInputPosition.AddParameterValuesCondition(strBottomLeft, "y", "-Inf") + ucrInputPosition.AddParameterValuesCondition(strBottomRight, "x", "Inf") + ucrInputPosition.AddParameterValuesCondition(strBottomRight, "y", "-Inf") + + ucrInputSeparator.SetParameter(New RParameter("sep", iNewPosition:=8)) + + ucrInputFontSize.SetParameter(New RParameter("size", iNewPosition:=8)) + ucrInputFontSize.SetValidationTypeAsNumeric() + ucrInputFontSize.AddQuotesIfUnrecognised = False + End Sub Public Sub SetRCode(clsNewSummarise As RFunction, dctNewSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)), clsNewGgplotOperator As ROperator, clsNewGeomText As RFunction, clsNewPasteLabel As RFunction, Optional bReset As Boolean = False) @@ -106,8 +113,13 @@ Public Class sdgTimeSeries ucrChkRmse.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) ucrChkKge.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) + ucrInputPosition.SetRCode(clsGeomText, bReset, bCloneIfNeeded:=True) + ucrInputSeparator.SetRCode(clsPasteLabel, bReset, bCloneIfNeeded:=True) + ucrInputFontSize.SetRCode(clsGeomText, bReset, bCloneIfNeeded:=True) + bRCodeSet = True CheckBoxesCheck() + TextPosition() End Sub Private Sub ucrChk_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkN.ControlValueChanged, ucrChkCor.ControlValueChanged, ucrChkPBias.ControlValueChanged, ucrChkRSd.ControlValueChanged, ucrChkMe.ControlValueChanged, ucrChkMae.ControlValueChanged, ucrChkRmse.ControlValueChanged, ucrChkKge.ControlValueChanged @@ -203,4 +215,34 @@ Public Class sdgTimeSeries clsPasteLabel.RemoveParameterByName("kge") End If End Sub + + Private Sub ucrInputPosition_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPosition.ControlValueChanged + TextPosition() + End Sub + + Private Sub TextPosition() + If bRCodeSet Then + If ucrInputPosition.GetText() = strTopLeft Then + clsGeomText.AddParameter("x", "-Inf", iPosition:=3) + clsGeomText.AddParameter("y", "Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "0", iPosition:=5) + clsGeomText.AddParameter("vjust", "1", iPosition:=6) + ElseIf ucrInputPosition.GetText() = strTopRight Then + clsGeomText.AddParameter("x", "Inf", iPosition:=3) + clsGeomText.AddParameter("y", "Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "1", iPosition:=5) + clsGeomText.AddParameter("vjust", "1", iPosition:=6) + ElseIf ucrInputPosition.GetText() = strBottomLeft Then + clsGeomText.AddParameter("x", "-Inf", iPosition:=3) + clsGeomText.AddParameter("y", "-Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "0", iPosition:=5) + clsGeomText.AddParameter("vjust", "0", iPosition:=6) + ElseIf ucrInputPosition.GetText() = strBottomRight Then + clsGeomText.AddParameter("x", "Inf", iPosition:=3) + clsGeomText.AddParameter("y", "-Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "1", iPosition:=5) + clsGeomText.AddParameter("vjust", "0", iPosition:=6) + End If + End If + End Sub End Class \ No newline at end of file From 625653865c4444b8ca358028358d96dba2ef4404 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Sun, 20 Sep 2020 19:01:25 +0100 Subject: [PATCH 156/277] changed ifelse to select case --- instat/sdgTimeSeries.vb | 43 +++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb index b1ffd7a7efa..d6fa5ed5510 100644 --- a/instat/sdgTimeSeries.vb +++ b/instat/sdgTimeSeries.vb @@ -222,27 +222,28 @@ Public Class sdgTimeSeries Private Sub TextPosition() If bRCodeSet Then - If ucrInputPosition.GetText() = strTopLeft Then - clsGeomText.AddParameter("x", "-Inf", iPosition:=3) - clsGeomText.AddParameter("y", "Inf", iPosition:=4) - clsGeomText.AddParameter("hjust", "0", iPosition:=5) - clsGeomText.AddParameter("vjust", "1", iPosition:=6) - ElseIf ucrInputPosition.GetText() = strTopRight Then - clsGeomText.AddParameter("x", "Inf", iPosition:=3) - clsGeomText.AddParameter("y", "Inf", iPosition:=4) - clsGeomText.AddParameter("hjust", "1", iPosition:=5) - clsGeomText.AddParameter("vjust", "1", iPosition:=6) - ElseIf ucrInputPosition.GetText() = strBottomLeft Then - clsGeomText.AddParameter("x", "-Inf", iPosition:=3) - clsGeomText.AddParameter("y", "-Inf", iPosition:=4) - clsGeomText.AddParameter("hjust", "0", iPosition:=5) - clsGeomText.AddParameter("vjust", "0", iPosition:=6) - ElseIf ucrInputPosition.GetText() = strBottomRight Then - clsGeomText.AddParameter("x", "Inf", iPosition:=3) - clsGeomText.AddParameter("y", "-Inf", iPosition:=4) - clsGeomText.AddParameter("hjust", "1", iPosition:=5) - clsGeomText.AddParameter("vjust", "0", iPosition:=6) - End If + Select Case ucrInputPosition.GetText() + Case strTopLeft + clsGeomText.AddParameter("x", "-Inf", iPosition:=3) + clsGeomText.AddParameter("y", "Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "0", iPosition:=5) + clsGeomText.AddParameter("vjust", "1", iPosition:=6) + Case strTopRight + clsGeomText.AddParameter("x", "Inf", iPosition:=3) + clsGeomText.AddParameter("y", "Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "1", iPosition:=5) + clsGeomText.AddParameter("vjust", "1", iPosition:=6) + Case strBottomLeft + clsGeomText.AddParameter("x", "-Inf", iPosition:=3) + clsGeomText.AddParameter("y", "-Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "0", iPosition:=5) + clsGeomText.AddParameter("vjust", "0", iPosition:=6) + Case strBottomRight + clsGeomText.AddParameter("x", "Inf", iPosition:=3) + clsGeomText.AddParameter("y", "-Inf", iPosition:=4) + clsGeomText.AddParameter("hjust", "1", iPosition:=5) + clsGeomText.AddParameter("vjust", "0", iPosition:=6) + End Select End If End Sub End Class \ No newline at end of file From 6b3e5bbcf8daa4009ac818b6d112a46b9f6a4477 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 21 Sep 2020 11:27:25 +0300 Subject: [PATCH 157/277] developer error on reset fix --- instat/dlgImportGriddedData.resx | 263 ++++++++++++++++++++----------- instat/dlgImportGriddedData.vb | 14 +- 2 files changed, 182 insertions(+), 95 deletions(-) diff --git a/instat/dlgImportGriddedData.resx b/instat/dlgImportGriddedData.resx index ed1c8bdd4a1..bb3ebf48273 100644 --- a/instat/dlgImportGriddedData.resx +++ b/instat/dlgImportGriddedData.resx @@ -357,6 +357,114 @@ 5 + + rdoCustomRange + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDateRange + + + 0 + + + rdoEntireRange + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDateRange + + + 1 + + + lblTo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDateRange + + + 2 + + + lblFrom + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpDateRange + + + 3 + + + ucrDtpMinDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 4 + + + ucrDtpMaxDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 5 + + + ucrPnlDateRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 6 + + + 3, 57 + + + 408, 117 + + + 4 + + + Date Range + + + grpDateRange + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + Button @@ -489,93 +597,6 @@ 3 - - 48, 65 - - - 180, 20 - - - 1 - - - ucrDtpMinDate - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 4 - - - 48, 90 - - - 180, 20 - - - 3 - - - ucrDtpMaxDate - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 5 - - - 101, 20 - - - 206, 37 - - - 23 - - - ucrPnlDateRange - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 6 - - - 3, 57 - - - 408, 117 - - - 4 - - - Date Range - - - grpDateRange - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - Button @@ -652,7 +673,7 @@ 103, 16 - 202, 37 + 214, 37 26 @@ -909,6 +930,69 @@ 2 + + 48, 65 + + + 180, 20 + + + 1 + + + ucrDtpMinDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 4 + + + 48, 90 + + + 180, 20 + + + 3 + + + ucrDtpMaxDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 5 + + + 101, 20 + + + 206, 37 + + + 23 + + + ucrPnlDateRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 6 + 150, 297 @@ -1002,6 +1086,9 @@ 420, 424 + + NoControl + CenterScreen diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 78783077a55..a4dcdc59ca0 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -19,8 +19,8 @@ Public Class dlgImportGriddedData Private bFirstLoad As Boolean = True Private bReset As Boolean = True Private bShowMessageBox As Boolean - Private clsDownloadFromIRIFunction As New RFunction - Private clsDefaultStartDate, clsDefaultEndDate As New RFunction + Private clsDownloadFromIRIFunction As RFunction + Private clsDefaultStartDate, clsDefaultEndDate As RFunction Private dctDownloadPairs, dctFiles As New Dictionary(Of String, String) Private Sub dlgImportGriddedData_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -48,11 +48,6 @@ Public Class dlgImportGriddedData ucrInputSource.SetDropDownStyleAsNonEditable() ucrInputData.SetParameter(New RParameter("data", 1)) - dctFiles = New Dictionary(Of String, String) - dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_prcp" & Chr(34)) - dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_prcp" & Chr(34)) - ucrInputData.SetItems(dctFiles) - ucrInputData.cboInput.SelectedItem = "TRMM 3B42 3-Hourly Precipitation" ucrInputData.SetDropDownStyleAsNonEditable() ucrInputFilePath.SetParameter(New RParameter("path", 2)) @@ -118,6 +113,11 @@ Public Class dlgImportGriddedData 'temp fix rdoEntireRange.Checked = True + dctFiles = New Dictionary(Of String, String) + dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_prcp" & Chr(34)) + dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_prcp" & Chr(34)) + ucrInputData.SetItems(dctFiles) + clsDownloadFromIRIFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$download_from_IRI") clsDownloadFromIRIFunction.AddParameter("source", Chr(34) & "NASA" & Chr(34), iPosition:=0) clsDownloadFromIRIFunction.AddParameter("data", Chr(34) & "3_hourly_prcp" & Chr(34), iPosition:=1) From 3447132a26fc404463d317cfbe9b10215ea7f043 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 21 Sep 2020 13:02:37 +0300 Subject: [PATCH 158/277] setting conditions properly hence removed temporary fix! --- instat/dlgImportGriddedData.vb | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index a4dcdc59ca0..70ab287864f 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -20,7 +20,6 @@ Public Class dlgImportGriddedData Private bReset As Boolean = True Private bShowMessageBox As Boolean Private clsDownloadFromIRIFunction As RFunction - Private clsDefaultStartDate, clsDefaultEndDate As RFunction Private dctDownloadPairs, dctFiles As New Dictionary(Of String, String) Private Sub dlgImportGriddedData_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -82,7 +81,7 @@ Public Class dlgImportGriddedData ucrPnlDateRange.AddRadioButton(rdoEntireRange) ucrPnlDateRange.AddRadioButton(rdoCustomRange) ucrPnlDateRange.AddParameterPresentCondition(rdoCustomRange, {"min_date", "max_date"}) - ucrPnlDateRange.AddParameterPresentCondition(rdoArea, {"min_date", "max_date"}, False) + ucrPnlDateRange.AddParameterPresentCondition(rdoEntireRange, {"min_date", "max_date"}, False) ucrChkDontImportData.SetParameter(New RParameter("import", 11)) ucrChkDontImportData.SetValuesCheckedAndUnchecked("FALSE", "TRUE") @@ -98,21 +97,12 @@ Public Class dlgImportGriddedData ucrDtpMinDate.SetLinkedDisplayControl(lblFrom) ucrDtpMaxDate.SetLinkedDisplayControl(lblTo) ucrInputNewDataFrameName.SetLinkedDisplayControl(lblNewDataFrameName) - - clsDefaultStartDate = New RFunction - clsDefaultStartDate.SetRCommand("as.Date") - clsDefaultStartDate.AddParameter("x", Chr(34) & "2000/10/31" & Chr(34)) - - clsDefaultEndDate = ucrDtpMaxDate.ValueAsRDate End Sub Private Sub SetDefaults() clsDownloadFromIRIFunction = New RFunction bShowMessageBox = True - 'temp fix - rdoEntireRange.Checked = True - dctFiles = New Dictionary(Of String, String) dctFiles.Add("TRMM 3B42 3-Hourly Precipitation", Chr(34) & "3_hourly_prcp" & Chr(34)) dctFiles.Add("TRMM 3B42 Daily Precipitation", Chr(34) & "daily_prcp" & Chr(34)) @@ -126,8 +116,6 @@ Public Class dlgImportGriddedData clsDownloadFromIRIFunction.AddParameter("max_lon", 35.08, iPosition:=4) clsDownloadFromIRIFunction.AddParameter("min_lat", 0, iPosition:=5) clsDownloadFromIRIFunction.AddParameter("max_lat", 0.5, iPosition:=6) - clsDownloadFromIRIFunction.AddParameter("min_date", clsRFunctionParameter:=clsDefaultStartDate, iPosition:=7) - clsDownloadFromIRIFunction.AddParameter("max_date", clsRFunctionParameter:=clsDefaultEndDate, iPosition:=8) clsDownloadFromIRIFunction.AddParameter("download_type", Chr(34) & "Point" & Chr(34), iPosition:=10) ucrBase.clsRsyntax.SetBaseRFunction(clsDownloadFromIRIFunction) @@ -227,6 +215,16 @@ Public Class dlgImportGriddedData End If End Sub + Private Sub ucrPnlDateRange_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDateRange.ControlValueChanged + If rdoCustomRange.Checked Then + clsDownloadFromIRIFunction.AddParameter("min_date", clsRFunctionParameter:=ucrDtpMinDate.ValueAsRDate, iPosition:=7) + clsDownloadFromIRIFunction.AddParameter("max_date", clsRFunctionParameter:=ucrDtpMaxDate.ValueAsRDate, iPosition:=8) + ElseIf rdoEntireRange.Checked Then + clsDownloadFromIRIFunction.RemoveParameterByName("min_date") + clsDownloadFromIRIFunction.RemoveParameterByName("max_date") + End If + End Sub + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged, ucrPnlDateRange.ControlContentsChanged TestOkEnabled() End Sub From 571b5e6e09d1787604d5fdf2130c379113141373 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Mon, 21 Sep 2020 19:30:56 +0300 Subject: [PATCH 159/277] fixes viewing of taylor plots --- instat/clsRLink.vb | 11 ++++++++--- instat/static/InstatObject/R/data_object_R6.R | 4 ++-- instat/static/InstatObject/R/instat_object_R6.R | 9 +++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/instat/clsRLink.vb b/instat/clsRLink.vb index 8b2f4cc1de7..8f61f26a3a2 100644 --- a/instat/clsRLink.vb +++ b/instat/clsRLink.vb @@ -2277,11 +2277,10 @@ Public Class RLink '''-------------------------------------------------------------------------------------------- Public Sub ViewLastGraph(Optional bAsPlotly As Boolean = False) Dim clsLastGraph As New RFunction - Dim clsInteractivePlot As New RFunction - clsLastGraph.SetRCommand(strInstatDataObject & "$get_last_graph") If bAsPlotly Then + Dim clsInteractivePlot As New RFunction clsLastGraph.AddParameter("print_graph", "FALSE", iPosition:=0) clsInteractivePlot.SetPackageName("plotly") clsInteractivePlot.SetRCommand("ggplotly") @@ -2289,7 +2288,13 @@ Public Class RLink 'Need to set iCallType = 2 to obtain a graph in an interactive viewer. RunScript(clsInteractivePlot.ToScript(), iCallType:=2, strComment:="View last graph as Plotly", bSeparateThread:=False) Else - RunScript(clsLastGraph.ToScript(), strComment:="View last graph", bSeparateThread:=False) + Dim strGlobalGraphDisplayOption As String + 'store the current set graph display option, to restore after display + strGlobalGraphDisplayOption = Me.strGraphDisplayOption + Me.strGraphDisplayOption = "view_R_viewer" + RunScript(clsLastGraph.ToScript(), iCallType:=3, strComment:="View last graph", bSeparateThread:=False) + 'restore the graph display option + Me.strGraphDisplayOption = strGlobalGraphDisplayOption End If End Sub diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 4f7216f4070..a1bfc3aa80a 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -1648,7 +1648,7 @@ DataSheet$set("public", "add_object", function(object, object_name) { if(object_name %in% names(private$objects)) message("An object called ", object_name, " already exists. It will be replaced.") private$objects[[object_name]] <- object self$append_to_changes(list(Added_object, object_name)) - if(any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot") %in% class(object))) { + if(any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot", "openair") %in% class(object))) { private$.last_graph <- object_name } } @@ -1672,7 +1672,7 @@ DataSheet$set("public", "get_object_names", function(type = "", as_list = FALSE, if(type == "") out = names(private$objects) else { if(type == model_label) out = names(private$objects)[!sapply(private$objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot", "htmlTable", "Surv") %in% class(x)))] - else if(type == graph_label) out = names(private$objects)[sapply(private$objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot") %in% class(x)))] + else if(type == graph_label) out = names(private$objects)[sapply(private$objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot", "openair") %in% class(x)))] else if(type == surv_label) out = names(private$objects)[sapply(private$objects, function(x) any(c("Surv") %in% class(x)))] else if(type == table_label) out = names(private$objects)[sapply(private$objects, function(x) any(c("htmlTable", "data.frame", "list") %in% class(x)))] else stop("type: ", type, " not recognised") diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index aa50fc516a3..6b7e70fbbf0 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -523,7 +523,7 @@ DataBook$set("public", "get_objects", function(data_name, object_name, include_o if(!include_empty) out = out[sapply(out, function(x) length(x) > 0)] } if(!missing(object_name) && length(object_name) == 1) { - if(print_graph && (ggplot2::is.ggplot(out) || any(c("gg", "ggmultiplot") %in% class(out)))) return(print(out)) + if(print_graph && (ggplot2::is.ggplot(out) || any(c("gg", "ggmultiplot", "openair") %in% class(out)))) return(print(out)) else return(out) } else return(out) @@ -544,7 +544,7 @@ DataBook$set("public", "get_objects", function(data_name, object_name, include_o return(lst) } else { - if(print_graph && (ggplot2::is.ggplot(out) || any(c("gg", "ggmultiplot") %in% class(out)))) return(print(out)) + if(print_graph && (ggplot2::is.ggplot(out) || any(c("gg", "ggmultiplot", "openair") %in% class(out)))) return(print(out)) else return(out) } } @@ -554,8 +554,9 @@ DataBook$set("public", "get_objects", function(data_name, object_name, include_o DataBook$set("public", "get_object_names", function(data_name, include_overall = TRUE, include, exclude, type = "", include_empty = FALSE, as_list = FALSE, excluded_items = c()) { if(type == "") overall_object_names = names(private$.objects) else { - if(type == model_label) overall_object_names = names(private$.objects)[!sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot", "htmlTable", "Surv") %in% class(x)))] - else if(type == graph_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot") %in% class(x)))] + if(type == model_label) overall_object_names = names(private$.objects)[!sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", " + ", "ggsurv", "ggsurvplot", "htmlTable", "Surv") %in% class(x)))] + else if(type == graph_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot", "openair") %in% class(x)))] else if(type == surv_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("Surv") %in% class(x)))] else if(type == table_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("htmlTable") %in% class(x)))] else stop("type: ", type, " not recognised") From 3c08788cd192bee90ef6de39d82f017219be8a99 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 22 Sep 2020 09:54:37 +0100 Subject: [PATCH 160/277] added comments to main dialog --- instat/dlgTimeSeriesPlot.Designer.vb | 30 ++++++------ instat/dlgTimeSeriesPlot.vb | 70 +++++++++++++++++++++------- 2 files changed, 67 insertions(+), 33 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb index ee1b4011aff..c5292021c55 100644 --- a/instat/dlgTimeSeriesPlot.Designer.vb +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -31,7 +31,7 @@ Partial Class dlgTimeSeriesPlot Me.ucrChkIncludePoints = New instat.ucrCheck() Me.ucrChkIncludeMeanLines = New instat.ucrCheck() Me.ucrChkNAValues = New instat.ucrCheck() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverFacetBy = New instat.ucrReceiverSingle() Me.ucrReceiverTime = New instat.ucrReceiverSingle() Me.ucrReceiverEstimates = New instat.ucrReceiverSingle() Me.ucrReceiverReference = New instat.ucrReceiverSingle() @@ -71,9 +71,9 @@ Partial Class dlgTimeSeriesPlot Me.lblStation.AutoSize = True Me.lblStation.Location = New System.Drawing.Point(286, 165) Me.lblStation.Name = "lblStation" - Me.lblStation.Size = New System.Drawing.Size(43, 13) + Me.lblStation.Size = New System.Drawing.Size(94, 13) Me.lblStation.TabIndex = 7 - Me.lblStation.Text = "Station:" + Me.lblStation.Text = "Facet By (Station):" ' 'cmdSummaries ' @@ -116,17 +116,17 @@ Partial Class dlgTimeSeriesPlot Me.ucrChkNAValues.Size = New System.Drawing.Size(272, 20) Me.ucrChkNAValues.TabIndex = 9 ' - 'ucrReceiverStation + 'ucrReceiverFacetBy ' - Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(286, 180) - Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStation.Name = "ucrReceiverStation" - Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) - Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 8 - Me.ucrReceiverStation.ucrSelector = Nothing + Me.ucrReceiverFacetBy.frmParent = Me + Me.ucrReceiverFacetBy.Location = New System.Drawing.Point(286, 180) + Me.ucrReceiverFacetBy.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverFacetBy.Name = "ucrReceiverFacetBy" + Me.ucrReceiverFacetBy.Selector = Nothing + Me.ucrReceiverFacetBy.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverFacetBy.strNcFilePath = "" + Me.ucrReceiverFacetBy.TabIndex = 8 + Me.ucrReceiverFacetBy.ucrSelector = Nothing ' 'ucrReceiverTime ' @@ -192,7 +192,7 @@ Partial Class dlgTimeSeriesPlot Me.Controls.Add(Me.ucrChkIncludePoints) Me.Controls.Add(Me.ucrChkIncludeMeanLines) Me.Controls.Add(Me.ucrChkNAValues) - Me.Controls.Add(Me.ucrReceiverStation) + Me.Controls.Add(Me.ucrReceiverFacetBy) Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.ucrReceiverTime) Me.Controls.Add(Me.lblTime) @@ -221,7 +221,7 @@ Partial Class dlgTimeSeriesPlot Friend WithEvents ucrChkIncludePoints As ucrCheck Friend WithEvents ucrChkIncludeMeanLines As ucrCheck Friend WithEvents ucrChkNAValues As ucrCheck - Friend WithEvents ucrReceiverStation As ucrReceiverSingle + Friend WithEvents ucrReceiverFacetBy As ucrReceiverSingle Friend WithEvents lblStation As Label Friend WithEvents ucrReceiverTime As ucrReceiverSingle Friend WithEvents lblTime As Label diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 1b64dc630e7..51af6e6c128 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -23,12 +23,20 @@ Public Class dlgTimeSeriesPlot Private bResetSubdialog As Boolean = True ' Constants - Private strReference As String = "" + ' These store the names of the selected columns. This is used to ensure old parameters are correctly removed from dplyr::mutate when selected columns are changed. + ' See ucrReceiverEstimates.ControlValueChanged and ucrReceiverReference.ControlValueChanged event handles for their use. Private strEstimates As String = "" + Private strReference As String = "" + ' The name of the "names" column when the data is stacked Private strData As String = "data" + ' The name of the "values" column when the data is stacked Private strValue As String = "value" ' Adjust NA values + ' These functions construct the R code below if ucrChkNAValues is checked. This ensures the two columns have the same missing values. + ' df <- df %>% + ' mutate(gauge = ifelse(is.na(estimate), NA, gauge), + ' estimate = ifelse(is.na(gauge), NA, estimate)) Private clsAdjustNAOperator As ROperator Private clsAdjustNAMutateParameter As RParameter Private clsAdjustNAMutate As RFunction @@ -38,17 +46,31 @@ Public Class dlgTimeSeriesPlot Private clsIsNaEstimates As RFunction ' Stack data + ' These functions construct the R code below. This stacks the two columns which is needed for plotting. + ' df_stack <- df %>% + ' pivot_longer(cols = c(gauge, estimate), names_to = "data", values_to = "value") Private clsStackOperator As ROperator Private clsPivotLonger As RFunction Private clsPivotCFunction As RFunction ' Calculate means + ' These functions construct the R code below if mean lines are added. + ' df_mean <- df_stack %>% + ' group_by(station, data) %>% + ' summarise(mean = mean(value, na.rm = TRUE)) Private clsMeansOperator As ROperator Private clsMeansGroupBy As RFunction Private clsMeansSummarise As RFunction Private clsMeanFunction As RFunction ' Calculate Text Summaries + ' These functions construct the R code below if annotated summaries are added. + ' df_summary <- df %>% + ' group_by(station) %>% + ' summarise(n = n(), + ' cor = cor(estimate, gauge, use = "na.or.complete"), + ' me = hydroGOF : Me(estimate, gauge), + ' mae = hydroGOF:mae(estimate, gauge)) Private clsSummaryOperator As ROperator Private clsSummaryGroupBy As RFunction Private clsSummarise As RFunction @@ -76,6 +98,9 @@ Public Class dlgTimeSeriesPlot Private clsRoundRSd As RFunction Private clsRoundKge As RFunction + ' A dictionary of the summary functions above. The key is the summary name in lower case e.g. "bias" + ' The value is a tuple of two RFunctions. Item1 is the summary function. Item2 is the paste function containing the summary. + ' This dictionary is created to avoid passing all the RFunctions to the sub dialog individually. Private dctSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) ' ggplot functions @@ -149,17 +174,15 @@ Public Class dlgTimeSeriesPlot ucrReceiverTime.Selector = ucrSelectorTimeSeriesPlots ucrReceiverTime.SetParameterIsString() ucrReceiverTime.bWithQuotes = False - ucrReceiverTime.SetClimaticType("year") - ucrReceiverTime.bAutoFill = True - - ucrReceiverStation.SetParameter(New RParameter("0", 0, bNewIncludeArgumentName:=False)) - ucrReceiverStation.Selector = ucrSelectorTimeSeriesPlots - ucrReceiverStation.SetParameterIsString() - ucrReceiverStation.bWithQuotes = False - ucrReceiverStation.SetDataType("factor") - ucrReceiverStation.SetClimaticType("station") - ucrReceiverStation.bAutoFill = True - ucrReceiverStation.strSelectorHeading = "Factors" + + ucrReceiverFacetBy.SetParameter(New RParameter("0", 0, bNewIncludeArgumentName:=False)) + ucrReceiverFacetBy.Selector = ucrSelectorTimeSeriesPlots + ucrReceiverFacetBy.SetParameterIsString() + ucrReceiverFacetBy.bWithQuotes = False + ucrReceiverFacetBy.SetDataType("factor") + ucrReceiverFacetBy.SetClimaticType("station") + ucrReceiverFacetBy.bAutoFill = True + ucrReceiverFacetBy.strSelectorHeading = "Factors" clsAdjustNAMutate = New RFunction clsAdjustNAMutateParameter = New RParameter("1", clsAdjustNAMutate, iNewPosition:=1) @@ -310,6 +333,7 @@ Public Class dlgTimeSeriesPlot clsMeanFunction.AddParameter("na.rm", "TRUE", iPosition:=1) ' Calculate summaries + clsSummaryOperator.SetOperation("%>%") clsSummaryOperator.AddParameter("0", clsROperatorParameter:=clsAdjustNAOperator, iPosition:=0) clsSummaryOperator.AddParameter("2", clsRFunctionParameter:=clsSummarise, iPosition:=2) @@ -498,13 +522,13 @@ Public Class dlgTimeSeriesPlot ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsPbias, New RParameter("sim", 1), iAdditionalPairNo:=7) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsRSd, New RParameter("sim", 1), iAdditionalPairNo:=8) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsKge, New RParameter("sim", 1), iAdditionalPairNo:=9) - ucrReceiverStation.AddAdditionalCodeParameterPair(clsFacetOperator, New RParameter("1", 1), iAdditionalPairNo:=1) - ucrReceiverStation.AddAdditionalCodeParameterPair(clsSummaryGroupBy, New RParameter("0", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) + ucrReceiverFacetBy.AddAdditionalCodeParameterPair(clsFacetOperator, New RParameter("1", 1), iAdditionalPairNo:=1) + ucrReceiverFacetBy.AddAdditionalCodeParameterPair(clsSummaryGroupBy, New RParameter("0", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) ucrSelectorTimeSeriesPlots.SetRCode(clsAdjustNAOperator, bReset) ucrReceiverReference.SetRCode(clsIsNaReference, bReset) ucrReceiverEstimates.SetRCode(clsIsNaEstimates, bReset) - ucrReceiverStation.SetRCode(clsMeansGroupBy, bReset) + ucrReceiverFacetBy.SetRCode(clsMeansGroupBy, bReset) ucrReceiverTime.SetRCode(clsGgplotAes, bReset) ucrChkNAValues.SetRCode(clsAdjustNAOperator, bReset) ucrChkIncludePoints.SetRCode(clsGgplotOperator, bReset) @@ -522,6 +546,10 @@ Public Class dlgTimeSeriesPlot End If End Sub + ''' + ''' Assigns the ROperators that correspond to a calculated data frame a standard assignment name based on the selected data frame. + ''' This makes the R code more readable and shorter. + ''' Private Sub SetDataFrameAssignTo() If ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text <> "" Then If ucrChkNAValues.Checked Then @@ -545,6 +573,8 @@ Public Class dlgTimeSeriesPlot End Sub Private Sub ucrReceiverEstimates_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlValueChanged + ' This ensures clsAdjustNAMutate has the correct parameters. Unlike in most functions, in dplyr::mutate, the parameter name is the selected variable. + ' Storing and then removing strEstimates as a parameter ensures dplyr::mutate does not keep old parameters when the selected variable is changed. If ucrReceiverEstimates.IsEmpty Then If strEstimates <> "" Then clsAdjustNAMutate.RemoveParameterByName(strEstimates) @@ -557,6 +587,8 @@ Public Class dlgTimeSeriesPlot End Sub Private Sub ucrReceiverReference_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReference.ControlValueChanged + ' This ensures clsAdjustNAMutate has the correct parameters. Unlike in most functions, in dplyr::mutate, the parameter name is the selected variable. + ' Storing and then removing strReference as a parameter ensures dplyr::mutate does not keep old parameters when the selected variable is changed. If ucrReceiverReference.IsEmpty Then If strReference <> "" Then clsAdjustNAMutate.RemoveParameterByName(strReference) @@ -578,13 +610,15 @@ Public Class dlgTimeSeriesPlot TestOkEnabled() End Sub - Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged - If ucrReceiverStation.IsEmpty AndAlso clsFacetOperator.clsParameters.Count = 0 Then + Private Sub ucrReceiverFacetBy_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverFacetBy.ControlValueChanged + ' Facets are handles manually since they could also be managed on a sub dialog. + ' The check for clsFacetOperator.clsParameters.Count = 0 ensures that facets added on a subdialog are not removed when ucrReceiverFacetBy is empty. + If ucrReceiverFacetBy.IsEmpty AndAlso clsFacetOperator.clsParameters.Count = 0 Then clsGgplotOperator.RemoveParameterByName("facets") Else clsGgplotOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetFunction, iPosition:=30) End If - If ucrReceiverStation.IsEmpty Then + If ucrReceiverFacetBy.IsEmpty Then clsSummaryOperator.RemoveParameterByName("1") Else clsSummaryOperator.AddParameter("1", clsRFunctionParameter:=clsSummaryGroupBy, iPosition:=1) From 16f135a85bd5572610fee281173d2172de7b2ad3 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 22 Sep 2020 12:01:25 +0300 Subject: [PATCH 161/277] removed unintentional code change --- instat/static/InstatObject/R/instat_object_R6.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 6b7e70fbbf0..ea5254b8a92 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -554,8 +554,7 @@ DataBook$set("public", "get_objects", function(data_name, object_name, include_o DataBook$set("public", "get_object_names", function(data_name, include_overall = TRUE, include, exclude, type = "", include_empty = FALSE, as_list = FALSE, excluded_items = c()) { if(type == "") overall_object_names = names(private$.objects) else { - if(type == model_label) overall_object_names = names(private$.objects)[!sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", " - ", "ggsurv", "ggsurvplot", "htmlTable", "Surv") %in% class(x)))] + if(type == model_label) overall_object_names = names(private$.objects)[!sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggsurv", "ggsurvplot", "htmlTable", "Surv") %in% class(x)))] else if(type == graph_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot", "openair") %in% class(x)))] else if(type == surv_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("Surv") %in% class(x)))] else if(type == table_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("htmlTable") %in% class(x)))] From 7bf1ea79f889266e7675b525cb810f0be67111a7 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 22 Sep 2020 12:05:26 +0300 Subject: [PATCH 162/277] removed unintnetional change --- instat/static/InstatObject/R/instat_object_R6.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index ea5254b8a92..e4b7ead5622 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -554,7 +554,7 @@ DataBook$set("public", "get_objects", function(data_name, object_name, include_o DataBook$set("public", "get_object_names", function(data_name, include_overall = TRUE, include, exclude, type = "", include_empty = FALSE, as_list = FALSE, excluded_items = c()) { if(type == "") overall_object_names = names(private$.objects) else { - if(type == model_label) overall_object_names = names(private$.objects)[!sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggsurv", "ggsurvplot", "htmlTable", "Surv") %in% class(x)))] + if(type == model_label) overall_object_names = names(private$.objects)[!sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot", "htmlTable", "Surv") %in% class(x)))] else if(type == graph_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("ggplot", "gg", "gtable", "grob", "ggmultiplot", "ggsurv", "ggsurvplot", "openair") %in% class(x)))] else if(type == surv_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("Surv") %in% class(x)))] else if(type == table_label) overall_object_names = names(private$.objects)[sapply(private$.objects, function(x) any(c("htmlTable") %in% class(x)))] From ea971ccc2c31357ad6df6d9c1cbcb41c2622613c Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 22 Sep 2020 15:30:58 +0100 Subject: [PATCH 163/277] initial code for adding individual summaries --- instat/dlgTimeSeriesPlot.vb | 272 +++++++++++++----- instat/sdgTimeSeries.Designer.vb | 229 +++++++++++---- instat/sdgTimeSeries.vb | 59 +++- .../InstatObject/R/stand_alone_functions.R | 5 + 4 files changed, 433 insertions(+), 132 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 51af6e6c128..c78bc4940a6 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -53,19 +53,31 @@ Public Class dlgTimeSeriesPlot Private clsPivotLonger As RFunction Private clsPivotCFunction As RFunction - ' Calculate means - ' These functions construct the R code below if mean lines are added. - ' df_mean <- df_stack %>% + ' Calculate Individual Summaries. + ' These functions construct the R code below if mean lines and/or if annotated individual summaries are added. + ' df_individual <- df_stack %>% ' group_by(station, data) %>% - ' summarise(mean = mean(value, na.rm = TRUE)) - Private clsMeansOperator As ROperator - Private clsMeansGroupBy As RFunction - Private clsMeansSummarise As RFunction - Private clsMeanFunction As RFunction - - ' Calculate Text Summaries - ' These functions construct the R code below if annotated summaries are added. - ' df_summary <- df %>% + ' summarise(mean = mean(value, na.rm = TRUE) + ' sd = sd(value, na.rm = TRUE)) + Private clsIndividualSummariesOperator As ROperator + Private clsIndividualSummariesGroupBy As RFunction + Private clsIndividualSummariesSummarise As RFunction + Private clsNIndividual As RFunction + Private clsMean As RFunction + Private clsSd As RFunction + Private clsSlope As RFunction + Private clsPasteNIndividual As RFunction + Private clsPasteMean As RFunction + Private clsPasteSd As RFunction + Private clsPasteSlope As RFunction + Private clsSignifMean As RFunction + Private clsRoundSd As RFunction + Private clsSignifSlope As RFunction + + + ' Calculate Comparison Summaries + ' These functions construct the R code below if annotated comparison summaries are added. + ' df_comparison <- df %>% ' group_by(station) %>% ' summarise(n = n(), ' cor = cor(estimate, gauge, use = "na.or.complete"), @@ -74,7 +86,7 @@ Public Class dlgTimeSeriesPlot Private clsSummaryOperator As ROperator Private clsSummaryGroupBy As RFunction Private clsSummarise As RFunction - Private clsN As RFunction + Private clsNComparison As RFunction Private clsCor As RFunction Private clsMe As RFunction Private clsMae As RFunction @@ -101,7 +113,7 @@ Public Class dlgTimeSeriesPlot ' A dictionary of the summary functions above. The key is the summary name in lower case e.g. "bias" ' The value is a tuple of two RFunctions. Item1 is the summary function. Item2 is the paste function containing the summary. ' This dictionary is created to avoid passing all the RFunctions to the sub dialog individually. - Private dctSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) + Private dctComparisonSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) ' ggplot functions Private clsGgplotOperator As ROperator @@ -113,9 +125,18 @@ Public Class dlgTimeSeriesPlot Private clsGeomHLineParameter As RParameter Private clsGeomHLine As RFunction Private clsGeomHLineAes As RFunction - Private clsGeomText As RFunction - Private clsGeomTextAes As RFunction - Private clsPasteLabel As RFunction + Private clsComparisonGeomText As RFunction + Private clsComparisonGeomTextAes As RFunction + Private clsComparisonPasteLabel As RFunction + + Private clsReferenceGeomText As RFunction + Private clsReferenceGeomTextAes As RFunction + Private clsReferencePasteLabel As RFunction + Private clsReferenceFilter As RFunction + Private clsEstimatesGeomText As RFunction + Private clsEstimatesGeomTextAes As RFunction + Private clsEstimatesPasteLabel As RFunction + Private clsEstimatesFilter As RFunction Private clsLabsFunction As New RFunction Private clsXlabsFunction As New RFunction @@ -219,15 +240,22 @@ Public Class dlgTimeSeriesPlot clsPivotLonger = New RFunction clsPivotCFunction = New RFunction - clsMeansOperator = New ROperator - clsMeansGroupBy = New RFunction - clsMeansSummarise = New RFunction - clsMeanFunction = New RFunction + clsIndividualSummariesOperator = New ROperator + clsIndividualSummariesGroupBy = New RFunction + clsIndividualSummariesSummarise = New RFunction + clsNIndividual = New RFunction + clsMean = New RFunction + clsSd = New RFunction + clsSlope = New RFunction + clsPasteNIndividual = New RFunction + clsPasteMean = New RFunction + clsPasteSd = New RFunction + clsPasteSlope = New RFunction clsSummaryOperator = New ROperator clsSummaryGroupBy = New RFunction clsSummarise = New RFunction - clsN = New RFunction + clsNComparison = New RFunction clsCor = New RFunction clsPbias = New RFunction clsRSd = New RFunction @@ -251,15 +279,15 @@ Public Class dlgTimeSeriesPlot clsSignifRmse = New RFunction clsRoundKge = New RFunction - dctSummaries = New Dictionary(Of String, Tuple(Of RFunction, RFunction)) - dctSummaries.Add("n", New Tuple(Of RFunction, RFunction)(clsN, clsPasteN)) - dctSummaries.Add("cor", New Tuple(Of RFunction, RFunction)(clsCor, clsPasteCor)) - dctSummaries.Add("pbias", New Tuple(Of RFunction, RFunction)(clsPbias, clsPastePbias)) - dctSummaries.Add("rsd", New Tuple(Of RFunction, RFunction)(clsRSd, clsPasteRSd)) - dctSummaries.Add("me", New Tuple(Of RFunction, RFunction)(clsMe, clsPasteMe)) - dctSummaries.Add("mae", New Tuple(Of RFunction, RFunction)(clsMae, clsPasteMae)) - dctSummaries.Add("rmse", New Tuple(Of RFunction, RFunction)(clsRmse, clsPasteRmse)) - dctSummaries.Add("kge", New Tuple(Of RFunction, RFunction)(clsKge, clsPasteKge)) + dctComparisonSummaries = New Dictionary(Of String, Tuple(Of RFunction, RFunction)) + dctComparisonSummaries.Add("n", New Tuple(Of RFunction, RFunction)(clsNComparison, clsPasteN)) + dctComparisonSummaries.Add("cor", New Tuple(Of RFunction, RFunction)(clsCor, clsPasteCor)) + dctComparisonSummaries.Add("pbias", New Tuple(Of RFunction, RFunction)(clsPbias, clsPastePbias)) + dctComparisonSummaries.Add("rsd", New Tuple(Of RFunction, RFunction)(clsRSd, clsPasteRSd)) + dctComparisonSummaries.Add("me", New Tuple(Of RFunction, RFunction)(clsMe, clsPasteMe)) + dctComparisonSummaries.Add("mae", New Tuple(Of RFunction, RFunction)(clsMae, clsPasteMae)) + dctComparisonSummaries.Add("rmse", New Tuple(Of RFunction, RFunction)(clsRmse, clsPasteRmse)) + dctComparisonSummaries.Add("kge", New Tuple(Of RFunction, RFunction)(clsKge, clsPasteKge)) clsGgplotOperator = New ROperator clsGgplotFunction = New RFunction @@ -268,9 +296,18 @@ Public Class dlgTimeSeriesPlot clsGeomPoint.Clear() clsGeomHLine.Clear() clsGeomHLineAes.Clear() - clsGeomText = New RFunction - clsGeomTextAes = New RFunction - clsPasteLabel = New RFunction + clsComparisonGeomText = New RFunction + clsComparisonGeomTextAes = New RFunction + clsComparisonPasteLabel = New RFunction + + clsReferenceGeomText = New RFunction + clsReferenceGeomTextAes = New RFunction + clsReferencePasteLabel = New RFunction + clsReferenceFilter = New RFunction + clsEstimatesGeomText = New RFunction + clsEstimatesGeomTextAes = New RFunction + clsEstimatesPasteLabel = New RFunction + clsEstimatesFilter = New RFunction ucrSelectorTimeSeriesPlots.Reset() ucrSelectorTimeSeriesPlots.SetGgplotFunction(clsGgplotOperator) @@ -314,23 +351,33 @@ Public Class dlgTimeSeriesPlot ' Calculate means - clsMeansOperator.SetOperation("%>%") - clsMeansOperator.AddParameter("0", clsROperatorParameter:=clsStackOperator, iPosition:=0) - clsMeansOperator.AddParameter("1", clsRFunctionParameter:=clsMeansGroupBy, iPosition:=1) - clsMeansOperator.AddParameter("2", clsRFunctionParameter:=clsMeansSummarise, iPosition:=2) - clsMeansOperator.bBrackets = False + clsIndividualSummariesOperator.SetOperation("%>%") + clsIndividualSummariesOperator.AddParameter("0", clsROperatorParameter:=clsStackOperator, iPosition:=0) + clsIndividualSummariesOperator.AddParameter("1", clsRFunctionParameter:=clsIndividualSummariesGroupBy, iPosition:=1) + clsIndividualSummariesOperator.AddParameter("2", clsRFunctionParameter:=clsIndividualSummariesSummarise, iPosition:=2) + clsIndividualSummariesOperator.bBrackets = False - clsMeansGroupBy.SetPackageName("dplyr") - clsMeansGroupBy.SetRCommand("group_by") - clsMeansGroupBy.AddParameter("1", strData, iPosition:=1, bIncludeArgumentName:=False) + clsIndividualSummariesGroupBy.SetPackageName("dplyr") + clsIndividualSummariesGroupBy.SetRCommand("group_by") + clsIndividualSummariesGroupBy.AddParameter("1", strData, iPosition:=1, bIncludeArgumentName:=False) - clsMeansSummarise.SetPackageName("dplyr") - clsMeansSummarise.SetRCommand("summarise") - clsMeansSummarise.AddParameter("mean", clsRFunctionParameter:=clsMeanFunction, iPosition:=0) + clsIndividualSummariesSummarise.SetPackageName("dplyr") + clsIndividualSummariesSummarise.SetRCommand("summarise") + clsIndividualSummariesSummarise.AddParameter("mean", clsRFunctionParameter:=clsMean, iPosition:=0) - clsMeanFunction.SetRCommand("mean") - clsMeanFunction.AddParameter("x", strValue, iPosition:=0) - clsMeanFunction.AddParameter("na.rm", "TRUE", iPosition:=1) + clsNIndividual.SetPackageName("dplyr") + clsNIndividual.SetRCommand("n") + + clsMean.SetRCommand("mean") + clsMean.AddParameter("x", strValue, iPosition:=0) + clsMean.AddParameter("na.rm", "TRUE", iPosition:=1) + + clsSd.SetRCommand("sd") + clsSd.AddParameter("x", strValue, iPosition:=0) + clsSd.AddParameter("na.rm", "TRUE", iPosition:=1) + + clsSlope.SetRCommand("mean") + clsSlope.AddParameter("y", strValue, iPosition:=0) ' Calculate summaries @@ -345,8 +392,8 @@ Public Class dlgTimeSeriesPlot clsSummarise.SetPackageName("dplyr") clsSummarise.SetRCommand("summarise") - clsN.SetPackageName("dplyr") - clsN.SetRCommand("n") + clsNComparison.SetPackageName("dplyr") + clsNComparison.SetRCommand("n") clsCor.SetRCommand("cor") clsCor.AddParameter("use", Chr(34) & "na.or.complete" & Chr(34)) @@ -395,7 +442,7 @@ Public Class dlgTimeSeriesPlot clsGeomHLine.SetPackageName("ggplot2") clsGeomHLine.SetRCommand("geom_hline") - clsGeomHLine.AddParameter("data", clsROperatorParameter:=clsMeansOperator, iPosition:=0) + clsGeomHLine.AddParameter("data", clsROperatorParameter:=clsIndividualSummariesOperator, iPosition:=0) clsGeomHLine.AddParameter("mapping", clsRFunctionParameter:=clsGeomHLineAes, iPosition:=1) clsGeomHLineAes.SetPackageName("ggplot2") @@ -403,23 +450,25 @@ Public Class dlgTimeSeriesPlot clsGeomHLineAes.AddParameter("yintercept", "mean", iPosition:=0) clsGeomHLineAes.AddParameter("colour", strData, iPosition:=1) - clsGeomText.SetPackageName("ggplot2") - clsGeomText.SetRCommand("geom_text") - clsGeomText.AddParameter("data", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) - clsGeomText.AddParameter("mapping", clsRFunctionParameter:=clsGeomTextAes, iPosition:=1) - clsGeomText.AddParameter("x", "-Inf", iPosition:=3) - clsGeomText.AddParameter("y", "Inf", iPosition:=4) - clsGeomText.AddParameter("hjust", "0", iPosition:=5) - clsGeomText.AddParameter("vjust", "1", iPosition:=6) - clsGeomText.AddParameter("size", "5", iPosition:=7) - clsGeomText.AddParameter("inherit.aes", "FALSE", iPosition:=10) + ' Comparison summaries - clsGeomTextAes.SetPackageName("ggplot2") - clsGeomTextAes.SetRCommand("aes") - clsGeomTextAes.AddParameter("label", clsRFunctionParameter:=clsPasteLabel, iPosition:=0) + clsComparisonGeomText.SetPackageName("ggplot2") + clsComparisonGeomText.SetRCommand("geom_text") + clsComparisonGeomText.AddParameter("data", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) + clsComparisonGeomText.AddParameter("mapping", clsRFunctionParameter:=clsComparisonGeomTextAes, iPosition:=1) + clsComparisonGeomText.AddParameter("x", "-Inf", iPosition:=3) + clsComparisonGeomText.AddParameter("y", "Inf", iPosition:=4) + clsComparisonGeomText.AddParameter("hjust", "0", iPosition:=5) + clsComparisonGeomText.AddParameter("vjust", "1", iPosition:=6) + clsComparisonGeomText.AddParameter("size", "5", iPosition:=7) + clsComparisonGeomText.AddParameter("inherit.aes", "FALSE", iPosition:=10) - clsPasteLabel.SetRCommand("paste") - clsPasteLabel.AddParameter("sep", Chr(34) & " ; " & Chr(34), iPosition:=8) + clsComparisonGeomTextAes.SetPackageName("ggplot2") + clsComparisonGeomTextAes.SetRCommand("aes") + clsComparisonGeomTextAes.AddParameter("label", clsRFunctionParameter:=clsComparisonPasteLabel, iPosition:=0) + + clsComparisonPasteLabel.SetRCommand("paste") + clsComparisonPasteLabel.AddParameter("sep", Chr(34) & " ; " & Chr(34), iPosition:=8) clsPasteN.SetRCommand("paste") clsPasteN.AddParameter("0", Chr(34) & "n" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) @@ -481,6 +530,82 @@ Public Class dlgTimeSeriesPlot clsRoundKge.AddParameter("x", "kge", iPosition:=0) clsRoundKge.AddParameter("digits", "2", iPosition:=1) + ' Individual summaries + + clsReferenceGeomText.SetPackageName("ggplot2") + clsReferenceGeomText.SetRCommand("geom_text") + clsReferenceGeomText.AddParameter("data", clsRFunctionParameter:=clsReferenceFilter, iPosition:=0) + clsReferenceGeomText.AddParameter("mapping", clsRFunctionParameter:=clsComparisonGeomTextAes, iPosition:=1) + clsReferenceGeomText.AddParameter("x", "-Inf", iPosition:=3) + clsReferenceGeomText.AddParameter("y", "Inf", iPosition:=4) + clsReferenceGeomText.AddParameter("hjust", "0", iPosition:=5) + clsReferenceGeomText.AddParameter("vjust", "1", iPosition:=6) + clsReferenceGeomText.AddParameter("size", "5", iPosition:=7) + clsReferenceGeomText.AddParameter("inherit.aes", "FALSE", iPosition:=10) + + clsReferenceFilter.SetPackageName("dplyr") + clsReferenceFilter.SetRCommand("filter") + clsReferenceFilter.AddParameter(".data", clsROperatorParameter:=clsIndividualSummariesOperator, iPosition:=0) + + clsReferenceGeomTextAes.SetPackageName("ggplot2") + clsReferenceGeomTextAes.SetRCommand("aes") + clsReferenceGeomTextAes.AddParameter("label", clsRFunctionParameter:=clsReferencePasteLabel, iPosition:=0) + + clsReferencePasteLabel.SetRCommand("paste") + clsReferencePasteLabel.AddParameter("sep", Chr(34) & " ; " & Chr(34), iPosition:=8) + + clsPasteNIndividual.SetRCommand("paste") + clsPasteNIndividual.AddParameter("0", Chr(34) & "n" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteNIndividual.AddParameter("1", "n", iPosition:=1, bIncludeArgumentName:=False) + + clsPasteMean.SetRCommand("paste") + clsPasteMean.AddParameter("0", Chr(34) & "mean" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteMean.AddParameter("1", "mean", iPosition:=1, bIncludeArgumentName:=False) + + clsSignifMean.SetRCommand("signif") + clsSignifMean.AddParameter("x", "mean", iPosition:=0) + clsSignifMean.AddParameter("digits", "2", iPosition:=1) + + clsPasteSd.SetRCommand("paste") + clsPasteSd.AddParameter("0", Chr(34) & "sd" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteSd.AddParameter("1", "sd", iPosition:=1, bIncludeArgumentName:=False) + + clsRoundSd.SetRCommand("round") + clsRoundSd.AddParameter("x", "sd", iPosition:=0) + clsRoundSd.AddParameter("digits", "2", iPosition:=1) + + clsPasteSlope.SetRCommand("paste") + clsPasteSlope.AddParameter("0", Chr(34) & "slope" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPasteSlope.AddParameter("1", "slope", iPosition:=1, bIncludeArgumentName:=False) + + clsSignifSlope.SetRCommand("signif") + clsSignifSlope.AddParameter("x", "slope", iPosition:=0) + clsSignifSlope.AddParameter("digits", "2", iPosition:=1) + + clsEstimatesGeomText.SetPackageName("ggplot2") + clsEstimatesGeomText.SetRCommand("geom_text") + clsEstimatesGeomText.AddParameter("data", clsRFunctionParameter:=clsEstimatesFilter, iPosition:=0) + clsEstimatesGeomText.AddParameter("mapping", clsRFunctionParameter:=clsComparisonGeomTextAes, iPosition:=1) + clsEstimatesGeomText.AddParameter("x", "Inf", iPosition:=3) + clsEstimatesGeomText.AddParameter("y", "-Inf", iPosition:=4) + clsEstimatesGeomText.AddParameter("hjust", "1", iPosition:=5) + clsEstimatesGeomText.AddParameter("vjust", "0", iPosition:=6) + clsEstimatesGeomText.AddParameter("size", "5", iPosition:=7) + clsEstimatesGeomText.AddParameter("inherit.aes", "FALSE", iPosition:=10) + + clsEstimatesFilter.SetPackageName("dplyr") + clsEstimatesFilter.SetRCommand("filter") + clsEstimatesFilter.AddParameter(".data", clsROperatorParameter:=clsIndividualSummariesOperator, iPosition:=0) + + clsEstimatesGeomTextAes.SetPackageName("ggplot2") + clsEstimatesGeomTextAes.SetRCommand("aes") + clsEstimatesGeomTextAes.AddParameter("label", clsRFunctionParameter:=clsEstimatesPasteLabel, iPosition:=0) + + clsEstimatesPasteLabel.SetRCommand("paste") + clsEstimatesPasteLabel.AddParameter("sep", Chr(34) & " ; " & Chr(34), iPosition:=8) + + ' Facets + clsFacetFunction.SetPackageName("ggplot2") clsFacetFunction.SetRCommand("facet_wrap") clsFacetFunction.AddParameter("facets", clsROperatorParameter:=clsFacetOperator, iPosition:=0) @@ -524,11 +649,12 @@ Public Class dlgTimeSeriesPlot ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsKge, New RParameter("sim", 1), iAdditionalPairNo:=9) ucrReceiverFacetBy.AddAdditionalCodeParameterPair(clsFacetOperator, New RParameter("1", 1), iAdditionalPairNo:=1) ucrReceiverFacetBy.AddAdditionalCodeParameterPair(clsSummaryGroupBy, New RParameter("0", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) + ucrReceiverTime.AddAdditionalCodeParameterPair(clsIndividualSummariesSummarise, New RParameter("x", 1), iAdditionalPairNo:=1) ucrSelectorTimeSeriesPlots.SetRCode(clsAdjustNAOperator, bReset) ucrReceiverReference.SetRCode(clsIsNaReference, bReset) ucrReceiverEstimates.SetRCode(clsIsNaEstimates, bReset) - ucrReceiverFacetBy.SetRCode(clsMeansGroupBy, bReset) + ucrReceiverFacetBy.SetRCode(clsIndividualSummariesGroupBy, bReset) ucrReceiverTime.SetRCode(clsGgplotAes, bReset) ucrChkNAValues.SetRCode(clsAdjustNAOperator, bReset) ucrChkIncludePoints.SetRCode(clsGgplotOperator, bReset) @@ -558,12 +684,12 @@ Public Class dlgTimeSeriesPlot clsAdjustNAOperator.RemoveAssignTo() End If clsStackOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_stack") - clsMeansOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_mean") - clsSummaryOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_summary") + clsIndividualSummariesOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_individual") + clsSummaryOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_comparison") Else clsAdjustNAOperator.RemoveAssignTo() clsStackOperator.RemoveAssignTo() - clsMeansOperator.RemoveAssignTo() + clsIndividualSummariesOperator.RemoveAssignTo() clsSummaryOperator.RemoveAssignTo() End If End Sub @@ -580,9 +706,11 @@ Public Class dlgTimeSeriesPlot clsAdjustNAMutate.RemoveParameterByName(strEstimates) strEstimates = "" End If + clsEstimatesFilter.RemoveParameterByName("1") Else strEstimates = ucrReceiverEstimates.GetVariableNames(False) clsAdjustNAMutate.AddParameter(strEstimates, clsRFunctionParameter:=clsIfElseEstimates, iPosition:=1) + clsEstimatesFilter.AddParameter("1", strValue & "==" & ucrReceiverEstimates.GetVariableNames(True), iPosition:=1) End If End Sub @@ -594,9 +722,11 @@ Public Class dlgTimeSeriesPlot clsAdjustNAMutate.RemoveParameterByName(strReference) strReference = "" End If + clsReferenceFilter.RemoveParameterByName("1") Else strReference = ucrReceiverReference.GetVariableNames(False) clsAdjustNAMutate.AddParameter(strReference, clsRFunctionParameter:=clsIfElseReference, iPosition:=0) + clsReferenceFilter.AddParameter("1", strValue & "==" & ucrReceiverReference.GetVariableNames(True), iPosition:=1) End If End Sub @@ -626,7 +756,7 @@ Public Class dlgTimeSeriesPlot End Sub Private Sub cmdSummaries_Click(sender As Object, e As EventArgs) Handles cmdSummaries.Click - sdgTimeSeries.SetRCode(clsNewSummarise:=clsSummarise, dctNewSummaries:=dctSummaries, clsNewGgplotOperator:=clsGgplotOperator, clsNewGeomText:=clsGeomText, clsNewPasteLabel:=clsPasteLabel, bReset:=bResetSubdialog) + sdgTimeSeries.SetRCode(clsNewSummarise:=clsSummarise, dctNewSummaries:=dctComparisonSummaries, clsNewGgplotOperator:=clsGgplotOperator, clsNewGeomText:=clsComparisonGeomText, clsNewPasteLabel:=clsComparisonPasteLabel, bReset:=bResetSubdialog) sdgTimeSeries.ShowDialog() bResetSubdialog = False End Sub diff --git a/instat/sdgTimeSeries.Designer.vb b/instat/sdgTimeSeries.Designer.vb index 0264b5efe4a..2e94d32078d 100644 --- a/instat/sdgTimeSeries.Designer.vb +++ b/instat/sdgTimeSeries.Designer.vb @@ -22,7 +22,7 @@ Partial Class sdgTimeSeries 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.grpSummaries = New System.Windows.Forms.GroupBox() + Me.grpComparisonSummaries = New System.Windows.Forms.GroupBox() Me.ucrChkKge = New instat.ucrCheck() Me.ucrChkRmse = New instat.ucrCheck() Me.ucrChkMae = New instat.ucrCheck() @@ -32,31 +32,42 @@ Partial Class sdgTimeSeries Me.ucrChkCor = New instat.ucrCheck() Me.ucrChkN = New instat.ucrCheck() Me.lblSeparator = New System.Windows.Forms.Label() - Me.lblPosition = New System.Windows.Forms.Label() + Me.lblPositionReference = New System.Windows.Forms.Label() Me.lblFontSize = New System.Windows.Forms.Label() - Me.ucrInputPosition = New instat.ucrInputComboBox() + Me.ucrInputPositionReference = New instat.ucrInputComboBox() Me.ucrButtonsSummaries = New instat.ucrButtonsSubdialogue() Me.ucrInputSeparator = New instat.ucrInputTextBox() Me.ucrInputFontSize = New instat.ucrInputTextBox() - Me.grpSummaries.SuspendLayout() + Me.rdoIndividual = New System.Windows.Forms.RadioButton() + Me.rdoComparison = New System.Windows.Forms.RadioButton() + Me.ucrPnlSummaries = New instat.UcrPanel() + Me.ucrInputPositionEstimates = New instat.ucrInputComboBox() + Me.lblPositionEstimates = New System.Windows.Forms.Label() + Me.grpIndividualSummaries = New System.Windows.Forms.GroupBox() + Me.ucrChkTrend = New instat.ucrCheck() + Me.ucrChkSdIndividual = New instat.ucrCheck() + Me.ucrChkMeanIndividual = New instat.ucrCheck() + Me.ucrChkNIndividual = New instat.ucrCheck() + Me.grpComparisonSummaries.SuspendLayout() + Me.grpIndividualSummaries.SuspendLayout() Me.SuspendLayout() ' - 'grpSummaries - ' - Me.grpSummaries.Controls.Add(Me.ucrChkKge) - Me.grpSummaries.Controls.Add(Me.ucrChkRmse) - Me.grpSummaries.Controls.Add(Me.ucrChkMae) - Me.grpSummaries.Controls.Add(Me.ucrChkMe) - Me.grpSummaries.Controls.Add(Me.ucrChkRSd) - Me.grpSummaries.Controls.Add(Me.ucrChkPBias) - Me.grpSummaries.Controls.Add(Me.ucrChkCor) - Me.grpSummaries.Controls.Add(Me.ucrChkN) - Me.grpSummaries.Location = New System.Drawing.Point(11, 13) - Me.grpSummaries.Name = "grpSummaries" - Me.grpSummaries.Size = New System.Drawing.Size(294, 95) - Me.grpSummaries.TabIndex = 0 - Me.grpSummaries.TabStop = False - Me.grpSummaries.Text = "Summaries" + 'grpComparisonSummaries + ' + Me.grpComparisonSummaries.Controls.Add(Me.ucrChkKge) + Me.grpComparisonSummaries.Controls.Add(Me.ucrChkRmse) + Me.grpComparisonSummaries.Controls.Add(Me.ucrChkMae) + Me.grpComparisonSummaries.Controls.Add(Me.ucrChkMe) + Me.grpComparisonSummaries.Controls.Add(Me.ucrChkRSd) + Me.grpComparisonSummaries.Controls.Add(Me.ucrChkPBias) + Me.grpComparisonSummaries.Controls.Add(Me.ucrChkCor) + Me.grpComparisonSummaries.Controls.Add(Me.ucrChkN) + Me.grpComparisonSummaries.Location = New System.Drawing.Point(14, 66) + Me.grpComparisonSummaries.Name = "grpComparisonSummaries" + Me.grpComparisonSummaries.Size = New System.Drawing.Size(294, 95) + Me.grpComparisonSummaries.TabIndex = 0 + Me.grpComparisonSummaries.TabStop = False + Me.grpComparisonSummaries.Text = "Comparison Summaries" ' 'ucrChkKge ' @@ -125,43 +136,43 @@ Partial Class sdgTimeSeries 'lblSeparator ' Me.lblSeparator.AutoSize = True - Me.lblSeparator.Location = New System.Drawing.Point(11, 125) + Me.lblSeparator.Location = New System.Drawing.Point(11, 177) Me.lblSeparator.Name = "lblSeparator" Me.lblSeparator.Size = New System.Drawing.Size(56, 13) Me.lblSeparator.TabIndex = 2 Me.lblSeparator.Text = "Separator:" ' - 'lblPosition + 'lblPositionReference ' - Me.lblPosition.AutoSize = True - Me.lblPosition.Location = New System.Drawing.Point(11, 156) - Me.lblPosition.Name = "lblPosition" - Me.lblPosition.Size = New System.Drawing.Size(47, 13) - Me.lblPosition.TabIndex = 3 - Me.lblPosition.Text = "Position:" + Me.lblPositionReference.AutoSize = True + Me.lblPositionReference.Location = New System.Drawing.Point(11, 237) + Me.lblPositionReference.Name = "lblPositionReference" + Me.lblPositionReference.Size = New System.Drawing.Size(47, 13) + Me.lblPositionReference.TabIndex = 3 + Me.lblPositionReference.Text = "Position:" ' 'lblFontSize ' Me.lblFontSize.AutoSize = True - Me.lblFontSize.Location = New System.Drawing.Point(11, 188) + Me.lblFontSize.Location = New System.Drawing.Point(11, 207) Me.lblFontSize.Name = "lblFontSize" Me.lblFontSize.Size = New System.Drawing.Size(54, 13) Me.lblFontSize.TabIndex = 4 Me.lblFontSize.Text = "Font Size:" ' - 'ucrInputPosition + 'ucrInputPositionReference ' - Me.ucrInputPosition.AddQuotesIfUnrecognised = True - Me.ucrInputPosition.GetSetSelectedIndex = -1 - Me.ucrInputPosition.IsReadOnly = False - Me.ucrInputPosition.Location = New System.Drawing.Point(89, 152) - Me.ucrInputPosition.Name = "ucrInputPosition" - Me.ucrInputPosition.Size = New System.Drawing.Size(100, 21) - Me.ucrInputPosition.TabIndex = 5 + Me.ucrInputPositionReference.AddQuotesIfUnrecognised = True + Me.ucrInputPositionReference.GetSetSelectedIndex = -1 + Me.ucrInputPositionReference.IsReadOnly = False + Me.ucrInputPositionReference.Location = New System.Drawing.Point(124, 233) + Me.ucrInputPositionReference.Name = "ucrInputPositionReference" + Me.ucrInputPositionReference.Size = New System.Drawing.Size(100, 21) + Me.ucrInputPositionReference.TabIndex = 5 ' 'ucrButtonsSummaries ' - Me.ucrButtonsSummaries.Location = New System.Drawing.Point(82, 228) + Me.ucrButtonsSummaries.Location = New System.Drawing.Point(87, 306) Me.ucrButtonsSummaries.Margin = New System.Windows.Forms.Padding(4) Me.ucrButtonsSummaries.Name = "ucrButtonsSummaries" Me.ucrButtonsSummaries.Size = New System.Drawing.Size(150, 31) @@ -172,7 +183,7 @@ Partial Class sdgTimeSeries Me.ucrInputSeparator.AddQuotesIfUnrecognised = True Me.ucrInputSeparator.IsMultiline = False Me.ucrInputSeparator.IsReadOnly = False - Me.ucrInputSeparator.Location = New System.Drawing.Point(89, 121) + Me.ucrInputSeparator.Location = New System.Drawing.Point(124, 173) Me.ucrInputSeparator.Name = "ucrInputSeparator" Me.ucrInputSeparator.Size = New System.Drawing.Size(40, 21) Me.ucrInputSeparator.TabIndex = 8 @@ -182,44 +193,156 @@ Partial Class sdgTimeSeries Me.ucrInputFontSize.AddQuotesIfUnrecognised = True Me.ucrInputFontSize.IsMultiline = False Me.ucrInputFontSize.IsReadOnly = False - Me.ucrInputFontSize.Location = New System.Drawing.Point(89, 184) + Me.ucrInputFontSize.Location = New System.Drawing.Point(124, 203) Me.ucrInputFontSize.Name = "ucrInputFontSize" Me.ucrInputFontSize.Size = New System.Drawing.Size(40, 21) Me.ucrInputFontSize.TabIndex = 9 ' + 'rdoIndividual + ' + Me.rdoIndividual.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoIndividual.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoIndividual.FlatAppearance.BorderSize = 2 + Me.rdoIndividual.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoIndividual.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoIndividual.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoIndividual.Location = New System.Drawing.Point(161, 14) + Me.rdoIndividual.Name = "rdoIndividual" + Me.rdoIndividual.Size = New System.Drawing.Size(110, 27) + Me.rdoIndividual.TabIndex = 12 + Me.rdoIndividual.TabStop = True + Me.rdoIndividual.Text = "Individual" + Me.rdoIndividual.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoIndividual.UseVisualStyleBackColor = True + ' + 'rdoComparison + ' + Me.rdoComparison.Appearance = System.Windows.Forms.Appearance.Button + Me.rdoComparison.FlatAppearance.BorderColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoComparison.FlatAppearance.BorderSize = 2 + Me.rdoComparison.FlatAppearance.CheckedBackColor = System.Drawing.SystemColors.ActiveCaption + Me.rdoComparison.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.rdoComparison.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.rdoComparison.Location = New System.Drawing.Point(53, 14) + Me.rdoComparison.Name = "rdoComparison" + Me.rdoComparison.Size = New System.Drawing.Size(110, 27) + Me.rdoComparison.TabIndex = 11 + Me.rdoComparison.TabStop = True + Me.rdoComparison.Text = "Comparison" + Me.rdoComparison.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.rdoComparison.UseVisualStyleBackColor = True + ' + 'ucrPnlSummaries + ' + Me.ucrPnlSummaries.Location = New System.Drawing.Point(40, 11) + Me.ucrPnlSummaries.Name = "ucrPnlSummaries" + Me.ucrPnlSummaries.Size = New System.Drawing.Size(244, 35) + Me.ucrPnlSummaries.TabIndex = 10 + ' + 'ucrInputPositionEstimates + ' + Me.ucrInputPositionEstimates.AddQuotesIfUnrecognised = True + Me.ucrInputPositionEstimates.GetSetSelectedIndex = -1 + Me.ucrInputPositionEstimates.IsReadOnly = False + Me.ucrInputPositionEstimates.Location = New System.Drawing.Point(124, 263) + Me.ucrInputPositionEstimates.Name = "ucrInputPositionEstimates" + Me.ucrInputPositionEstimates.Size = New System.Drawing.Size(100, 21) + Me.ucrInputPositionEstimates.TabIndex = 14 + ' + 'lblPositionEstimates + ' + Me.lblPositionEstimates.AutoSize = True + Me.lblPositionEstimates.Location = New System.Drawing.Point(11, 267) + Me.lblPositionEstimates.Name = "lblPositionEstimates" + Me.lblPositionEstimates.Size = New System.Drawing.Size(101, 13) + Me.lblPositionEstimates.TabIndex = 13 + Me.lblPositionEstimates.Text = "Position - Estimates:" + ' + 'grpIndividualSummaries + ' + Me.grpIndividualSummaries.Controls.Add(Me.ucrChkTrend) + Me.grpIndividualSummaries.Controls.Add(Me.ucrChkSdIndividual) + Me.grpIndividualSummaries.Controls.Add(Me.ucrChkMeanIndividual) + Me.grpIndividualSummaries.Controls.Add(Me.ucrChkNIndividual) + Me.grpIndividualSummaries.Location = New System.Drawing.Point(14, 66) + Me.grpIndividualSummaries.Name = "grpIndividualSummaries" + Me.grpIndividualSummaries.Size = New System.Drawing.Size(294, 61) + Me.grpIndividualSummaries.TabIndex = 11 + Me.grpIndividualSummaries.TabStop = False + Me.grpIndividualSummaries.Text = "Individual Summaries" + ' + 'ucrChkTrend + ' + Me.ucrChkTrend.Checked = False + Me.ucrChkTrend.Location = New System.Drawing.Point(224, 29) + Me.ucrChkTrend.Name = "ucrChkTrend" + Me.ucrChkTrend.Size = New System.Drawing.Size(60, 20) + Me.ucrChkTrend.TabIndex = 6 + ' + 'ucrChkSdIndividual + ' + Me.ucrChkSdIndividual.Checked = False + Me.ucrChkSdIndividual.Location = New System.Drawing.Point(153, 29) + Me.ucrChkSdIndividual.Name = "ucrChkSdIndividual" + Me.ucrChkSdIndividual.Size = New System.Drawing.Size(60, 20) + Me.ucrChkSdIndividual.TabIndex = 2 + ' + 'ucrChkMeanIndividual + ' + Me.ucrChkMeanIndividual.Checked = False + Me.ucrChkMeanIndividual.Location = New System.Drawing.Point(82, 29) + Me.ucrChkMeanIndividual.Name = "ucrChkMeanIndividual" + Me.ucrChkMeanIndividual.Size = New System.Drawing.Size(60, 20) + Me.ucrChkMeanIndividual.TabIndex = 1 + ' + 'ucrChkNIndividual + ' + Me.ucrChkNIndividual.Checked = False + Me.ucrChkNIndividual.Location = New System.Drawing.Point(11, 29) + Me.ucrChkNIndividual.Name = "ucrChkNIndividual" + Me.ucrChkNIndividual.Size = New System.Drawing.Size(60, 20) + Me.ucrChkNIndividual.TabIndex = 0 + ' 'sdgTimeSeries ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(315, 265) + Me.ClientSize = New System.Drawing.Size(325, 342) + Me.Controls.Add(Me.grpIndividualSummaries) + Me.Controls.Add(Me.ucrInputPositionEstimates) + Me.Controls.Add(Me.lblPositionEstimates) + Me.Controls.Add(Me.rdoIndividual) + Me.Controls.Add(Me.rdoComparison) + Me.Controls.Add(Me.ucrPnlSummaries) Me.Controls.Add(Me.ucrInputFontSize) Me.Controls.Add(Me.ucrInputSeparator) Me.Controls.Add(Me.ucrButtonsSummaries) - Me.Controls.Add(Me.ucrInputPosition) + Me.Controls.Add(Me.ucrInputPositionReference) Me.Controls.Add(Me.lblFontSize) - Me.Controls.Add(Me.lblPosition) + Me.Controls.Add(Me.lblPositionReference) Me.Controls.Add(Me.lblSeparator) - Me.Controls.Add(Me.grpSummaries) + Me.Controls.Add(Me.grpComparisonSummaries) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "sdgTimeSeries" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Summary Annotations" - Me.grpSummaries.ResumeLayout(False) + Me.grpComparisonSummaries.ResumeLayout(False) + Me.grpIndividualSummaries.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents grpSummaries As GroupBox + Friend WithEvents grpComparisonSummaries As GroupBox Friend WithEvents ucrChkPBias As ucrCheck Friend WithEvents ucrChkCor As ucrCheck Friend WithEvents ucrChkN As ucrCheck Friend WithEvents lblSeparator As Label - Friend WithEvents lblPosition As Label + Friend WithEvents lblPositionReference As Label Friend WithEvents lblFontSize As Label - Friend WithEvents ucrInputPosition As ucrInputComboBox + Friend WithEvents ucrInputPositionReference As ucrInputComboBox Friend WithEvents ucrButtonsSummaries As ucrButtonsSubdialogue Friend WithEvents ucrChkKge As ucrCheck Friend WithEvents ucrChkRmse As ucrCheck @@ -228,4 +351,14 @@ Partial Class sdgTimeSeries Friend WithEvents ucrChkRSd As ucrCheck Friend WithEvents ucrInputSeparator As ucrInputTextBox Friend WithEvents ucrInputFontSize As ucrInputTextBox + Friend WithEvents rdoIndividual As RadioButton + Friend WithEvents rdoComparison As RadioButton + Friend WithEvents ucrPnlSummaries As UcrPanel + Friend WithEvents ucrInputPositionEstimates As ucrInputComboBox + Friend WithEvents lblPositionEstimates As Label + Friend WithEvents grpIndividualSummaries As GroupBox + Friend WithEvents ucrChkTrend As ucrCheck + Friend WithEvents ucrChkSdIndividual As ucrCheck + Friend WithEvents ucrChkMeanIndividual As ucrCheck + Friend WithEvents ucrChkNIndividual As ucrCheck End Class diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb index d6fa5ed5510..0f9172ce7ee 100644 --- a/instat/sdgTimeSeries.vb +++ b/instat/sdgTimeSeries.vb @@ -40,6 +40,11 @@ Public Class sdgTimeSeries End Sub Public Sub InitialiseControls() + ucrPnlSummaries.AddRadioButton(rdoComparison) + ucrPnlSummaries.AddRadioButton(rdoIndividual) + + ucrPnlSummaries.AddToLinkedControls(ucrInputPositionEstimates, {rdoComparison}, bNewLinkedAddRemoveParameter:=False, bNewLinkedHideIfParameterMissing:=True) + ucrChkN.SetText("N") ucrChkN.AddParameterPresentCondition(True, "n") ucrChkN.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) @@ -72,16 +77,28 @@ Public Class sdgTimeSeries ucrChkKge.AddParameterPresentCondition(True, "kge") ucrChkKge.AddParameterPresentCondition(False, "kge", bNewIsPositive:=False) - ucrInputPosition.SetItems({"Top Left", "Top Right", "Bottom Left", "Bottom Right"}) - ucrInputPosition.SetDropDownStyleAsNonEditable() - ucrInputPosition.AddParameterValuesCondition(strTopLeft, "x", "-Inf") - ucrInputPosition.AddParameterValuesCondition(strTopLeft, "y", "Inf") - ucrInputPosition.AddParameterValuesCondition(strTopRight, "x", "Inf") - ucrInputPosition.AddParameterValuesCondition(strTopRight, "y", "Inf") - ucrInputPosition.AddParameterValuesCondition(strBottomLeft, "x", "-Inf") - ucrInputPosition.AddParameterValuesCondition(strBottomLeft, "y", "-Inf") - ucrInputPosition.AddParameterValuesCondition(strBottomRight, "x", "Inf") - ucrInputPosition.AddParameterValuesCondition(strBottomRight, "y", "-Inf") + ucrInputPositionReference.SetItems({"Top Left", "Top Right", "Bottom Left", "Bottom Right"}) + ucrInputPositionReference.SetDropDownStyleAsNonEditable() + ucrInputPositionReference.AddParameterValuesCondition(strTopLeft, "x", "-Inf") + ucrInputPositionReference.AddParameterValuesCondition(strTopLeft, "y", "Inf") + ucrInputPositionReference.AddParameterValuesCondition(strTopRight, "x", "Inf") + ucrInputPositionReference.AddParameterValuesCondition(strTopRight, "y", "Inf") + ucrInputPositionReference.AddParameterValuesCondition(strBottomLeft, "x", "-Inf") + ucrInputPositionReference.AddParameterValuesCondition(strBottomLeft, "y", "-Inf") + ucrInputPositionReference.AddParameterValuesCondition(strBottomRight, "x", "Inf") + ucrInputPositionReference.AddParameterValuesCondition(strBottomRight, "y", "-Inf") + + ucrInputPositionEstimates.SetLinkedDisplayControl(lblPositionReference) + ucrInputPositionEstimates.SetItems({"Top Left", "Top Right", "Bottom Left", "Bottom Right"}) + ucrInputPositionEstimates.SetDropDownStyleAsNonEditable() + ucrInputPositionEstimates.AddParameterValuesCondition(strTopLeft, "x", "-Inf") + ucrInputPositionEstimates.AddParameterValuesCondition(strTopLeft, "y", "Inf") + ucrInputPositionEstimates.AddParameterValuesCondition(strTopRight, "x", "Inf") + ucrInputPositionEstimates.AddParameterValuesCondition(strTopRight, "y", "Inf") + ucrInputPositionEstimates.AddParameterValuesCondition(strBottomLeft, "x", "-Inf") + ucrInputPositionEstimates.AddParameterValuesCondition(strBottomLeft, "y", "-Inf") + ucrInputPositionEstimates.AddParameterValuesCondition(strBottomRight, "x", "Inf") + ucrInputPositionEstimates.AddParameterValuesCondition(strBottomRight, "y", "-Inf") ucrInputSeparator.SetParameter(New RParameter("sep", iNewPosition:=8)) @@ -113,7 +130,7 @@ Public Class sdgTimeSeries ucrChkRmse.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) ucrChkKge.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - ucrInputPosition.SetRCode(clsGeomText, bReset, bCloneIfNeeded:=True) + ucrInputPositionReference.SetRCode(clsGeomText, bReset, bCloneIfNeeded:=True) ucrInputSeparator.SetRCode(clsPasteLabel, bReset, bCloneIfNeeded:=True) ucrInputFontSize.SetRCode(clsGeomText, bReset, bCloneIfNeeded:=True) @@ -216,13 +233,13 @@ Public Class sdgTimeSeries End If End Sub - Private Sub ucrInputPosition_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPosition.ControlValueChanged + Private Sub ucrInputPosition_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPositionReference.ControlValueChanged TextPosition() End Sub Private Sub TextPosition() If bRCodeSet Then - Select Case ucrInputPosition.GetText() + Select Case ucrInputPositionReference.GetText() Case strTopLeft clsGeomText.AddParameter("x", "-Inf", iPosition:=3) clsGeomText.AddParameter("y", "Inf", iPosition:=4) @@ -246,4 +263,20 @@ Public Class sdgTimeSeries End Select End If End Sub + + Private Sub ucrPnlSummaries_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSummaries.ControlValueChanged + SummariesDisplay() + End Sub + + Private Sub SummariesDisplay() + If bRCodeSet Then + If rdoComparison.Checked Then + grpComparisonSummaries.Visible = True + grpIndividualSummaries.Visible = False + ElseIf rdoIndividual.Checked Then + grpComparisonSummaries.Visible = False + grpIndividualSummaries.Visible = True + End If + End If + End Sub End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 7d26bbc0f53..9be03a80ee3 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1282,3 +1282,8 @@ summary_sample <- function(x, size, replace = FALSE){ else if(length(x)==1){return(x)} else{sample(x = x, size = size, replace = replace)} } + +slope <- function(y, x) { + x <- as.numeric(x) + lm(y ~ x)$coefficients[2] +} From 507e108d9cd350f22640b855ac6cd591a271fdc0 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 23 Sep 2020 10:26:36 +0100 Subject: [PATCH 164/277] small code improvements from reviewer comments --- instat/dlgTimeSeriesPlot.vb | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index c78bc4940a6..21311475740 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -28,7 +28,7 @@ Public Class dlgTimeSeriesPlot Private strEstimates As String = "" Private strReference As String = "" ' The name of the "names" column when the data is stacked - Private strData As String = "data" + Private strName As String = "data" ' The name of the "values" column when the data is stacked Private strValue As String = "value" @@ -344,7 +344,7 @@ Public Class dlgTimeSeriesPlot clsPivotLonger.SetPackageName("tidyr") clsPivotLonger.SetRCommand("pivot_longer") clsPivotLonger.AddParameter("cols", clsRFunctionParameter:=clsPivotCFunction, iPosition:=1) - clsPivotLonger.AddParameter("names_to", Chr(34) & strData & Chr(34), iPosition:=2) + clsPivotLonger.AddParameter("names_to", Chr(34) & strName & Chr(34), iPosition:=2) clsPivotLonger.AddParameter("values_to", Chr(34) & strValue & Chr(34), iPosition:=8) clsPivotCFunction.SetRCommand("c") @@ -359,7 +359,7 @@ Public Class dlgTimeSeriesPlot clsIndividualSummariesGroupBy.SetPackageName("dplyr") clsIndividualSummariesGroupBy.SetRCommand("group_by") - clsIndividualSummariesGroupBy.AddParameter("1", strData, iPosition:=1, bIncludeArgumentName:=False) + clsIndividualSummariesGroupBy.AddParameter("1", strName, iPosition:=1, bIncludeArgumentName:=False) clsIndividualSummariesSummarise.SetPackageName("dplyr") clsIndividualSummariesSummarise.SetRCommand("summarise") @@ -432,7 +432,7 @@ Public Class dlgTimeSeriesPlot clsGgplotAes.SetPackageName("ggplot2") clsGgplotAes.SetRCommand("aes") clsGgplotAes.AddParameter("y", strValue, iPosition:=1) - clsGgplotAes.AddParameter("colour", strData, iPosition:=2) + clsGgplotAes.AddParameter("colour", strName, iPosition:=2) clsGeomLine.SetPackageName("ggplot2") clsGeomLine.SetRCommand("geom_line") @@ -448,7 +448,7 @@ Public Class dlgTimeSeriesPlot clsGeomHLineAes.SetPackageName("ggplot2") clsGeomHLineAes.SetRCommand("aes") clsGeomHLineAes.AddParameter("yintercept", "mean", iPosition:=0) - clsGeomHLineAes.AddParameter("colour", strData, iPosition:=1) + clsGeomHLineAes.AddParameter("colour", strName, iPosition:=1) ' Comparison summaries @@ -702,10 +702,8 @@ Public Class dlgTimeSeriesPlot ' This ensures clsAdjustNAMutate has the correct parameters. Unlike in most functions, in dplyr::mutate, the parameter name is the selected variable. ' Storing and then removing strEstimates as a parameter ensures dplyr::mutate does not keep old parameters when the selected variable is changed. If ucrReceiverEstimates.IsEmpty Then - If strEstimates <> "" Then - clsAdjustNAMutate.RemoveParameterByName(strEstimates) - strEstimates = "" - End If + clsAdjustNAMutate.RemoveParameterByName(strEstimates) + strEstimates = "" clsEstimatesFilter.RemoveParameterByName("1") Else strEstimates = ucrReceiverEstimates.GetVariableNames(False) @@ -718,10 +716,8 @@ Public Class dlgTimeSeriesPlot ' This ensures clsAdjustNAMutate has the correct parameters. Unlike in most functions, in dplyr::mutate, the parameter name is the selected variable. ' Storing and then removing strReference as a parameter ensures dplyr::mutate does not keep old parameters when the selected variable is changed. If ucrReceiverReference.IsEmpty Then - If strReference <> "" Then - clsAdjustNAMutate.RemoveParameterByName(strReference) - strReference = "" - End If + clsAdjustNAMutate.RemoveParameterByName(strReference) + strReference = "" clsReferenceFilter.RemoveParameterByName("1") Else strReference = ucrReceiverReference.GetVariableNames(False) From 73e2fee1335b7f5fa720bff90ee525794100ff9e Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 23 Sep 2020 15:35:28 +0300 Subject: [PATCH 165/277] reviewer changes --- instat/ucrReorder.vb | 46 +++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 22 deletions(-) diff --git a/instat/ucrReorder.vb b/instat/ucrReorder.vb index 6b83f5ae47e..519d61a65a6 100644 --- a/instat/ucrReorder.vb +++ b/instat/ucrReorder.vb @@ -24,6 +24,16 @@ Public Class ucrReorder Public bIsDataType As Boolean = True Public Event SelectedIndexChanged(sender As Object, e As EventArgs) + ''' + ''' represents the allowed direction values of reordering the contents of the ListView + ''' + Private Enum Direction + Up + Down + Top + Bottom + End Enum + Public Sub setDataType(strType As String) strDataType = strType lstAvailableData.Clear() @@ -44,27 +54,26 @@ Public Class ucrReorder End Sub Private Sub cmdUp_Click(sender As Object, e As EventArgs) Handles cmdUp.Click - ReorderListViewItems("up") + ReorderListViewItems(Direction.Up) End Sub Private Sub cmdDown_click(sender As Object, e As EventArgs) Handles cmdDown.Click - ReorderListViewItems("down") + ReorderListViewItems(Direction.Down) End Sub Private Sub cmdBottom_Click(sender As Object, e As EventArgs) Handles cmdBottom.Click - ReorderListViewItems("bottom") + ReorderListViewItems(Direction.Bottom) End Sub Private Sub cmdTop_Click(sender As Object, e As EventArgs) Handles cmdTop.Click - ReorderListViewItems("top") + ReorderListViewItems(Direction.Top) End Sub ''' ''' reorders the items in the listview based on the direction option given and raises reorder event - ''' opted to use string parameter because the sub is used inside this class only and by 4 events ''' - ''' direction, allowed values; top,up,down,bottom. - Private Sub ReorderListViewItems(strDirection As String) + ''' direction, allowed values; top,up,down,bottom. + Private Sub ReorderListViewItems(enumDirection As Direction) 'if no data selection just exit reorder If lstAvailableData.SelectedItems.Count = 0 Then Exit Sub @@ -83,34 +92,27 @@ Public Class ucrReorder Next 'reorder the items in the list view based on the option given - Select Case strDirection - Case "top" - For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + Select Case enumDirection + Case Direction.Top lstAvailableData.Items.Insert(iStartindex, kvpItem.Value) iStartindex = iStartindex + 1 - Next - Case "up" - For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + Case Direction.Up If kvpItem.Key = 0 Then lstAvailableData.Items.Insert(0, kvpItem.Value) Else lstAvailableData.Items.Insert(kvpItem.Key - 1, kvpItem.Value) End If - Next - Case "down" - For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + Case Direction.Down If kvpItem.Key >= lstAvailableData.Items.Count - 1 Then lstAvailableData.Items.Add(kvpItem.Value) Else lstAvailableData.Items.Insert(kvpItem.Key + 1, kvpItem.Value) End If - Next - Case "bottom" - For Each kvpItem As KeyValuePair(Of Integer, ListViewItem) In dctSelectedItems + Case Direction.Bottom lstAvailableData.Items.Add(kvpItem.Value) - iStartindex = iStartindex + 1 - Next - End Select + End Select + Next 'change focus to the listview lstAvailableData.Select() From 7a49fcfb53c644392752ce3c81dece1e0c1a8ae6 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Wed, 23 Sep 2020 13:40:59 +0000 Subject: [PATCH 166/277] Added a check box for different summary Corrected lm and glm methods Added mean above, mean below and standard deviation --- instat/dlgSeasonalPlot.Designer.vb | 357 ++++++++++++++--------------- instat/dlgSeasonalPlot.vb | 275 +++++++++++++++------- 2 files changed, 376 insertions(+), 256 deletions(-) diff --git a/instat/dlgSeasonalPlot.Designer.vb b/instat/dlgSeasonalPlot.Designer.vb index c65f6561b42..0f5e3070e8c 100644 --- a/instat/dlgSeasonalPlot.Designer.vb +++ b/instat/dlgSeasonalPlot.Designer.vb @@ -22,13 +22,6 @@ Partial Class dlgSeasonalPlot 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.ucrBase = New instat.ucrButtons() - Me.ucrSelectorSeasonalityComparisons = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrReceiverReference = New instat.ucrReceiverSingle() - Me.ucrReceiverStation = New instat.ucrReceiverSingle() - Me.ucrReceiverSeasonality = New instat.ucrReceiverSingle() - Me.ucrReceiverEstimate = New instat.ucrReceiverSingle() - Me.ucrChkRemoveMissing = New instat.ucrCheck() Me.grpValues = New System.Windows.Forms.GroupBox() Me.ucrInputN = New instat.ucrInputTextBox() Me.lblN = New System.Windows.Forms.Label() @@ -37,102 +30,35 @@ Partial Class dlgSeasonalPlot Me.grpSmoothing = New System.Windows.Forms.GroupBox() Me.ucrNudSpan = New instat.ucrNud() Me.lblSpan = New System.Windows.Forms.Label() - Me.lblDf = New System.Windows.Forms.Label() - Me.lblPeriod = New System.Windows.Forms.Label() Me.ucrNudDf = New instat.ucrNud() Me.lblHarmonics = New System.Windows.Forms.Label() - Me.ucrNudPeriod = New instat.ucrNud() + Me.lblDf = New System.Windows.Forms.Label() Me.ucrNudHarmonics = New instat.ucrNud() Me.ucrInputSmoothing = New instat.ucrInputComboBox() - Me.ucrSaveGraph = New instat.ucrSave() - Me.ucrInputEstimateSummary = New instat.ucrInputComboBox() - Me.ucrInputReferenceSummary = New instat.ucrInputComboBox() - Me.ucrInputReferenceThreshold = New instat.ucrInputTextBox() - Me.ucrInputEstimateThreshold = New instat.ucrInputTextBox() + Me.lblPeriod = New System.Windows.Forms.Label() + Me.ucrNudPeriod = New instat.ucrNud() Me.lblRefSummary = New System.Windows.Forms.Label() - Me.lblEstSummary = New System.Windows.Forms.Label() Me.lblSeasonality = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() Me.lblReference = New System.Windows.Forms.Label() Me.lblEstimate = New System.Windows.Forms.Label() + Me.ucrChkOptionalSummary = New instat.ucrCheck() + Me.ucrInputEstimateThreshold = New instat.ucrInputTextBox() + Me.ucrInputReferenceThreshold = New instat.ucrInputTextBox() + Me.ucrInputReferenceSummary = New instat.ucrInputComboBox() + Me.ucrInputEstimateSummary = New instat.ucrInputComboBox() + Me.ucrSaveGraph = New instat.ucrSave() + Me.ucrChkRemoveMissing = New instat.ucrCheck() + Me.ucrReceiverEstimate = New instat.ucrReceiverSingle() + Me.ucrReceiverSeasonality = New instat.ucrReceiverSingle() + Me.ucrReceiverStation = New instat.ucrReceiverSingle() + Me.ucrReceiverReference = New instat.ucrReceiverSingle() + Me.ucrSelectorSeasonalityComparisons = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() Me.grpValues.SuspendLayout() Me.grpSmoothing.SuspendLayout() Me.SuspendLayout() ' - 'ucrBase - ' - Me.ucrBase.Location = New System.Drawing.Point(12, 429) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) - Me.ucrBase.TabIndex = 19 - ' - 'ucrSelectorSeasonalityComparisons - ' - Me.ucrSelectorSeasonalityComparisons.bDropUnusedFilterLevels = False - Me.ucrSelectorSeasonalityComparisons.bShowHiddenColumns = False - Me.ucrSelectorSeasonalityComparisons.bUseCurrentFilter = True - Me.ucrSelectorSeasonalityComparisons.Location = New System.Drawing.Point(12, 28) - Me.ucrSelectorSeasonalityComparisons.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorSeasonalityComparisons.Name = "ucrSelectorSeasonalityComparisons" - Me.ucrSelectorSeasonalityComparisons.Size = New System.Drawing.Size(210, 180) - Me.ucrSelectorSeasonalityComparisons.TabIndex = 0 - ' - 'ucrReceiverReference - ' - Me.ucrReceiverReference.frmParent = Me - Me.ucrReceiverReference.Location = New System.Drawing.Point(266, 36) - Me.ucrReceiverReference.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverReference.Name = "ucrReceiverReference" - Me.ucrReceiverReference.Selector = Nothing - Me.ucrReceiverReference.Size = New System.Drawing.Size(143, 20) - Me.ucrReceiverReference.strNcFilePath = "" - Me.ucrReceiverReference.TabIndex = 2 - Me.ucrReceiverReference.ucrSelector = Nothing - ' - 'ucrReceiverStation - ' - Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(266, 268) - Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverStation.Name = "ucrReceiverStation" - Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(143, 20) - Me.ucrReceiverStation.strNcFilePath = "" - Me.ucrReceiverStation.TabIndex = 14 - Me.ucrReceiverStation.ucrSelector = Nothing - ' - 'ucrReceiverSeasonality - ' - Me.ucrReceiverSeasonality.frmParent = Me - Me.ucrReceiverSeasonality.Location = New System.Drawing.Point(266, 222) - Me.ucrReceiverSeasonality.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverSeasonality.Name = "ucrReceiverSeasonality" - Me.ucrReceiverSeasonality.Selector = Nothing - Me.ucrReceiverSeasonality.Size = New System.Drawing.Size(143, 20) - Me.ucrReceiverSeasonality.strNcFilePath = "" - Me.ucrReceiverSeasonality.TabIndex = 12 - Me.ucrReceiverSeasonality.ucrSelector = Nothing - ' - 'ucrReceiverEstimate - ' - Me.ucrReceiverEstimate.frmParent = Me - Me.ucrReceiverEstimate.Location = New System.Drawing.Point(266, 129) - Me.ucrReceiverEstimate.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverEstimate.Name = "ucrReceiverEstimate" - Me.ucrReceiverEstimate.Selector = Nothing - Me.ucrReceiverEstimate.Size = New System.Drawing.Size(143, 20) - Me.ucrReceiverEstimate.strNcFilePath = "" - Me.ucrReceiverEstimate.TabIndex = 7 - Me.ucrReceiverEstimate.ucrSelector = Nothing - ' - 'ucrChkRemoveMissing - ' - Me.ucrChkRemoveMissing.Checked = False - Me.ucrChkRemoveMissing.Location = New System.Drawing.Point(22, 219) - Me.ucrChkRemoveMissing.Name = "ucrChkRemoveMissing" - Me.ucrChkRemoveMissing.Size = New System.Drawing.Size(197, 20) - Me.ucrChkRemoveMissing.TabIndex = 15 - ' 'grpValues ' Me.grpValues.Controls.Add(Me.ucrInputN) @@ -220,24 +146,6 @@ Partial Class dlgSeasonalPlot Me.lblSpan.TabIndex = 23 Me.lblSpan.Text = "Span:" ' - 'lblDf - ' - Me.lblDf.AutoSize = True - Me.lblDf.Location = New System.Drawing.Point(6, 51) - Me.lblDf.Name = "lblDf" - Me.lblDf.Size = New System.Drawing.Size(103, 13) - Me.lblDf.TabIndex = 24 - Me.lblDf.Text = "Degrees of freedom:" - ' - 'lblPeriod - ' - Me.lblPeriod.AutoSize = True - Me.lblPeriod.Location = New System.Drawing.Point(123, 52) - Me.lblPeriod.Name = "lblPeriod" - Me.lblPeriod.Size = New System.Drawing.Size(40, 13) - Me.lblPeriod.TabIndex = 18 - Me.lblPeriod.Text = "Period:" - ' 'ucrNudDf ' Me.ucrNudDf.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -259,17 +167,14 @@ Partial Class dlgSeasonalPlot Me.lblHarmonics.TabIndex = 19 Me.lblHarmonics.Text = "Harmonics:" ' - 'ucrNudPeriod + 'lblDf ' - Me.ucrNudPeriod.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPeriod.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPeriod.Location = New System.Drawing.Point(166, 49) - Me.ucrNudPeriod.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPeriod.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPeriod.Name = "ucrNudPeriod" - Me.ucrNudPeriod.Size = New System.Drawing.Size(50, 20) - Me.ucrNudPeriod.TabIndex = 2 - Me.ucrNudPeriod.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.lblDf.AutoSize = True + Me.lblDf.Location = New System.Drawing.Point(6, 51) + Me.lblDf.Name = "lblDf" + Me.lblDf.Size = New System.Drawing.Size(103, 13) + Me.lblDf.TabIndex = 24 + Me.lblDf.Text = "Degrees of freedom:" ' 'ucrNudHarmonics ' @@ -293,76 +198,40 @@ Partial Class dlgSeasonalPlot Me.ucrInputSmoothing.Size = New System.Drawing.Size(119, 21) Me.ucrInputSmoothing.TabIndex = 0 ' - 'ucrSaveGraph - ' - Me.ucrSaveGraph.Location = New System.Drawing.Point(12, 400) - Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSaveGraph.Name = "ucrSaveGraph" - Me.ucrSaveGraph.Size = New System.Drawing.Size(255, 29) - Me.ucrSaveGraph.TabIndex = 18 - ' - 'ucrInputEstimateSummary - ' - Me.ucrInputEstimateSummary.AddQuotesIfUnrecognised = True - Me.ucrInputEstimateSummary.GetSetSelectedIndex = -1 - Me.ucrInputEstimateSummary.IsReadOnly = False - Me.ucrInputEstimateSummary.Location = New System.Drawing.Point(266, 175) - Me.ucrInputEstimateSummary.Name = "ucrInputEstimateSummary" - Me.ucrInputEstimateSummary.Size = New System.Drawing.Size(93, 21) - Me.ucrInputEstimateSummary.TabIndex = 9 - ' - 'ucrInputReferenceSummary - ' - Me.ucrInputReferenceSummary.AddQuotesIfUnrecognised = True - Me.ucrInputReferenceSummary.GetSetSelectedIndex = -1 - Me.ucrInputReferenceSummary.IsReadOnly = False - Me.ucrInputReferenceSummary.Location = New System.Drawing.Point(266, 82) - Me.ucrInputReferenceSummary.Name = "ucrInputReferenceSummary" - Me.ucrInputReferenceSummary.Size = New System.Drawing.Size(89, 21) - Me.ucrInputReferenceSummary.TabIndex = 4 - ' - 'ucrInputReferenceThreshold + 'lblPeriod ' - Me.ucrInputReferenceThreshold.AddQuotesIfUnrecognised = True - Me.ucrInputReferenceThreshold.IsMultiline = False - Me.ucrInputReferenceThreshold.IsReadOnly = False - Me.ucrInputReferenceThreshold.Location = New System.Drawing.Point(356, 82) - Me.ucrInputReferenceThreshold.Name = "ucrInputReferenceThreshold" - Me.ucrInputReferenceThreshold.Size = New System.Drawing.Size(53, 21) - Me.ucrInputReferenceThreshold.TabIndex = 5 + Me.lblPeriod.AutoSize = True + Me.lblPeriod.Location = New System.Drawing.Point(123, 52) + Me.lblPeriod.Name = "lblPeriod" + Me.lblPeriod.Size = New System.Drawing.Size(40, 13) + Me.lblPeriod.TabIndex = 18 + Me.lblPeriod.Text = "Period:" ' - 'ucrInputEstimateThreshold + 'ucrNudPeriod ' - Me.ucrInputEstimateThreshold.AddQuotesIfUnrecognised = True - Me.ucrInputEstimateThreshold.IsMultiline = False - Me.ucrInputEstimateThreshold.IsReadOnly = False - Me.ucrInputEstimateThreshold.Location = New System.Drawing.Point(361, 175) - Me.ucrInputEstimateThreshold.Name = "ucrInputEstimateThreshold" - Me.ucrInputEstimateThreshold.Size = New System.Drawing.Size(48, 21) - Me.ucrInputEstimateThreshold.TabIndex = 10 + Me.ucrNudPeriod.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPeriod.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPeriod.Location = New System.Drawing.Point(166, 49) + Me.ucrNudPeriod.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPeriod.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPeriod.Name = "ucrNudPeriod" + Me.ucrNudPeriod.Size = New System.Drawing.Size(50, 20) + Me.ucrNudPeriod.TabIndex = 2 + Me.ucrNudPeriod.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'lblRefSummary ' Me.lblRefSummary.AutoSize = True - Me.lblRefSummary.Location = New System.Drawing.Point(266, 66) + Me.lblRefSummary.Location = New System.Drawing.Point(275, 73) Me.lblRefSummary.Name = "lblRefSummary" Me.lblRefSummary.Size = New System.Drawing.Size(53, 13) Me.lblRefSummary.TabIndex = 3 Me.lblRefSummary.Text = "Summary:" ' - 'lblEstSummary - ' - Me.lblEstSummary.AutoSize = True - Me.lblEstSummary.Location = New System.Drawing.Point(266, 159) - Me.lblEstSummary.Name = "lblEstSummary" - Me.lblEstSummary.Size = New System.Drawing.Size(53, 13) - Me.lblEstSummary.TabIndex = 8 - Me.lblEstSummary.Text = "Summary:" - ' 'lblSeasonality ' Me.lblSeasonality.AutoSize = True - Me.lblSeasonality.Location = New System.Drawing.Point(266, 206) + Me.lblSeasonality.Location = New System.Drawing.Point(275, 227) Me.lblSeasonality.Name = "lblSeasonality" Me.lblSeasonality.Size = New System.Drawing.Size(64, 13) Me.lblSeasonality.TabIndex = 11 @@ -371,7 +240,7 @@ Partial Class dlgSeasonalPlot 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(266, 252) + Me.lblStation.Location = New System.Drawing.Point(275, 273) Me.lblStation.Name = "lblStation" Me.lblStation.Size = New System.Drawing.Size(43, 13) Me.lblStation.TabIndex = 13 @@ -380,7 +249,7 @@ Partial Class dlgSeasonalPlot 'lblReference ' Me.lblReference.AutoSize = True - Me.lblReference.Location = New System.Drawing.Point(266, 20) + Me.lblReference.Location = New System.Drawing.Point(275, 27) Me.lblReference.Name = "lblReference" Me.lblReference.Size = New System.Drawing.Size(60, 13) Me.lblReference.TabIndex = 1 @@ -389,22 +258,152 @@ Partial Class dlgSeasonalPlot 'lblEstimate ' Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(266, 113) + Me.lblEstimate.Location = New System.Drawing.Point(275, 120) Me.lblEstimate.Name = "lblEstimate" Me.lblEstimate.Size = New System.Drawing.Size(50, 13) Me.lblEstimate.TabIndex = 6 Me.lblEstimate.Text = "Estimate:" ' + 'ucrChkOptionalSummary + ' + Me.ucrChkOptionalSummary.Checked = False + Me.ucrChkOptionalSummary.Location = New System.Drawing.Point(274, 169) + Me.ucrChkOptionalSummary.Name = "ucrChkOptionalSummary" + Me.ucrChkOptionalSummary.Size = New System.Drawing.Size(189, 20) + Me.ucrChkOptionalSummary.TabIndex = 8 + ' + 'ucrInputEstimateThreshold + ' + Me.ucrInputEstimateThreshold.AddQuotesIfUnrecognised = True + Me.ucrInputEstimateThreshold.IsMultiline = False + Me.ucrInputEstimateThreshold.IsReadOnly = False + Me.ucrInputEstimateThreshold.Location = New System.Drawing.Point(370, 192) + Me.ucrInputEstimateThreshold.Name = "ucrInputEstimateThreshold" + Me.ucrInputEstimateThreshold.Size = New System.Drawing.Size(48, 21) + Me.ucrInputEstimateThreshold.TabIndex = 10 + ' + 'ucrInputReferenceThreshold + ' + Me.ucrInputReferenceThreshold.AddQuotesIfUnrecognised = True + Me.ucrInputReferenceThreshold.IsMultiline = False + Me.ucrInputReferenceThreshold.IsReadOnly = False + Me.ucrInputReferenceThreshold.Location = New System.Drawing.Point(365, 89) + Me.ucrInputReferenceThreshold.Name = "ucrInputReferenceThreshold" + Me.ucrInputReferenceThreshold.Size = New System.Drawing.Size(53, 21) + Me.ucrInputReferenceThreshold.TabIndex = 5 + ' + 'ucrInputReferenceSummary + ' + Me.ucrInputReferenceSummary.AddQuotesIfUnrecognised = True + Me.ucrInputReferenceSummary.GetSetSelectedIndex = -1 + Me.ucrInputReferenceSummary.IsReadOnly = False + Me.ucrInputReferenceSummary.Location = New System.Drawing.Point(275, 89) + Me.ucrInputReferenceSummary.Name = "ucrInputReferenceSummary" + Me.ucrInputReferenceSummary.Size = New System.Drawing.Size(89, 21) + Me.ucrInputReferenceSummary.TabIndex = 4 + ' + 'ucrInputEstimateSummary + ' + Me.ucrInputEstimateSummary.AddQuotesIfUnrecognised = True + Me.ucrInputEstimateSummary.GetSetSelectedIndex = -1 + Me.ucrInputEstimateSummary.IsReadOnly = False + Me.ucrInputEstimateSummary.Location = New System.Drawing.Point(275, 192) + Me.ucrInputEstimateSummary.Name = "ucrInputEstimateSummary" + Me.ucrInputEstimateSummary.Size = New System.Drawing.Size(93, 21) + Me.ucrInputEstimateSummary.TabIndex = 9 + ' + 'ucrSaveGraph + ' + Me.ucrSaveGraph.Location = New System.Drawing.Point(12, 400) + Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveGraph.Name = "ucrSaveGraph" + Me.ucrSaveGraph.Size = New System.Drawing.Size(255, 29) + Me.ucrSaveGraph.TabIndex = 18 + ' + 'ucrChkRemoveMissing + ' + Me.ucrChkRemoveMissing.Checked = False + Me.ucrChkRemoveMissing.Location = New System.Drawing.Point(22, 219) + Me.ucrChkRemoveMissing.Name = "ucrChkRemoveMissing" + Me.ucrChkRemoveMissing.Size = New System.Drawing.Size(197, 20) + Me.ucrChkRemoveMissing.TabIndex = 15 + ' + 'ucrReceiverEstimate + ' + Me.ucrReceiverEstimate.frmParent = Me + Me.ucrReceiverEstimate.Location = New System.Drawing.Point(275, 136) + Me.ucrReceiverEstimate.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEstimate.Name = "ucrReceiverEstimate" + Me.ucrReceiverEstimate.Selector = Nothing + Me.ucrReceiverEstimate.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverEstimate.strNcFilePath = "" + Me.ucrReceiverEstimate.TabIndex = 7 + Me.ucrReceiverEstimate.ucrSelector = Nothing + ' + 'ucrReceiverSeasonality + ' + Me.ucrReceiverSeasonality.frmParent = Me + Me.ucrReceiverSeasonality.Location = New System.Drawing.Point(275, 243) + Me.ucrReceiverSeasonality.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverSeasonality.Name = "ucrReceiverSeasonality" + Me.ucrReceiverSeasonality.Selector = Nothing + Me.ucrReceiverSeasonality.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverSeasonality.strNcFilePath = "" + Me.ucrReceiverSeasonality.TabIndex = 12 + Me.ucrReceiverSeasonality.ucrSelector = Nothing + ' + 'ucrReceiverStation + ' + Me.ucrReceiverStation.frmParent = Me + Me.ucrReceiverStation.Location = New System.Drawing.Point(275, 289) + Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverStation.Name = "ucrReceiverStation" + Me.ucrReceiverStation.Selector = Nothing + Me.ucrReceiverStation.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverStation.strNcFilePath = "" + Me.ucrReceiverStation.TabIndex = 14 + Me.ucrReceiverStation.ucrSelector = Nothing + ' + 'ucrReceiverReference + ' + Me.ucrReceiverReference.frmParent = Me + Me.ucrReceiverReference.Location = New System.Drawing.Point(275, 43) + Me.ucrReceiverReference.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverReference.Name = "ucrReceiverReference" + Me.ucrReceiverReference.Selector = Nothing + Me.ucrReceiverReference.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverReference.strNcFilePath = "" + Me.ucrReceiverReference.TabIndex = 2 + Me.ucrReceiverReference.ucrSelector = Nothing + ' + 'ucrSelectorSeasonalityComparisons + ' + Me.ucrSelectorSeasonalityComparisons.bDropUnusedFilterLevels = False + Me.ucrSelectorSeasonalityComparisons.bShowHiddenColumns = False + Me.ucrSelectorSeasonalityComparisons.bUseCurrentFilter = True + Me.ucrSelectorSeasonalityComparisons.Location = New System.Drawing.Point(12, 28) + Me.ucrSelectorSeasonalityComparisons.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorSeasonalityComparisons.Name = "ucrSelectorSeasonalityComparisons" + Me.ucrSelectorSeasonalityComparisons.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorSeasonalityComparisons.TabIndex = 0 + ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(12, 429) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 19 + ' 'dlgSeasonalPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(426, 491) + Me.ClientSize = New System.Drawing.Size(466, 491) + Me.Controls.Add(Me.ucrChkOptionalSummary) Me.Controls.Add(Me.lblEstimate) Me.Controls.Add(Me.lblReference) Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.lblSeasonality) - Me.Controls.Add(Me.lblEstSummary) Me.Controls.Add(Me.lblRefSummary) Me.Controls.Add(Me.ucrInputEstimateThreshold) Me.Controls.Add(Me.ucrInputReferenceThreshold) @@ -458,7 +457,6 @@ Partial Class dlgSeasonalPlot Friend WithEvents lblReference As Label Friend WithEvents lblStation As Label Friend WithEvents lblSeasonality As Label - Friend WithEvents lblEstSummary As Label Friend WithEvents lblRefSummary As Label Friend WithEvents lblPeriod As Label Friend WithEvents lblHarmonics As Label @@ -468,4 +466,5 @@ Partial Class dlgSeasonalPlot Friend WithEvents ucrNudDf As ucrNud Friend WithEvents lblDf As Label Friend WithEvents lblSpan As Label + Friend WithEvents ucrChkOptionalSummary As ucrCheck End Class diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index 18a0670bb1d..c2238c35c29 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -20,11 +20,54 @@ Public Class dlgSeasonalPlot Private bFirstLoad As Boolean = True Private bReset As Boolean = True 'summary functions + operators - Private clsPipeOperator, clsAndOperator, clsRefGreaterOperator, clsEstGreaterOperator, clsRefLessOperator, clsEstLessOperator, clsDivideOperator As New ROperator - Private clsFilterFunction, clsRefIsNotNaFunction, clsEstIsNotNaFunction, clsMutateFunction, clsPivotLongerFunction, clsGroupByFunction, clsSummariseFunction, clsMovingMutateFunction, clsMovingFunction, clsNSumFunction, clsPropSumFunction, clsNotIsNaThreshFunction, clsMeanFunction As New RFunction + Private clsPipeOperator As ROperator + Private clsAndOperator As ROperator + Private clsRefGreaterOperator As ROperator + Private clsEst1GreaterOperator As ROperator + Private clsRefLessOperator As ROperator + Private clsEst1LessOperator As ROperator + Private clsDivideOperator As ROperator + Private clsLessOperator As ROperator + Private clsGreaterOperator As ROperator + Private clsEst2GreaterOperator As ROperator + Private clsEst2LessOperator As ROperator + + Private clsMissingFilterFunction As RFunction + Private clsRefIsNotNaFunction As RFunction + Private clsEstIsNotNaFunction As RFunction + Private clsMutateFunction As RFunction + Private clsPivotLongerFunction As RFunction + Private clsGroupByFunction As RFunction + Private clsSummariseFunction As RFunction + Private clsMovingMutateFunction As RFunction + Private clsMovingFunction As RFunction + Private clsNSumFunction As RFunction + Private clsPropSumFunction As RFunction + Private clsNotIsNaThreshFunction As RFunction + Private clsMeanFunction As RFunction + Private clsMeanFilterFunction As RFunction + Private clsStdFunction As RFunction + 'ggplot functions + operators - Private clsPlusOperator, clsFacetWrapTildeOperator, clsPbsSplinesTildeOperator As New ROperator - Private clsGgplotFunction, clsGeomPointFunction, clsGeomLineFunction, clsGeomSmoothFunction, clsGgPlotAesFunction, clsGeomLineAesFunction, clsFacetWrapFunction, clsAsFormulaFunction, clsPasteFunction, clsFourierSeriesFunction, clsListFunction, clsBinomialFunction, clsPbsFunction, clsNsFunction As New RFunction + Private clsPlusOperator As ROperator + Private clsFacetWrapTildeOperator As ROperator + Private clsPbsSplinesTildeOperator As ROperator + + Private clsGgplotFunction As RFunction + Private clsGeomPointFunction As RFunction + Private clsGeomLineFunction As RFunction + Private clsGeomSmoothFunction As RFunction + Private clsGgPlotAesFunction As RFunction + Private clsGeomLineAesFunction As RFunction + Private clsFacetWrapFunction As RFunction + Private clsAsFormulaFunction As RFunction + Private clsPasteFunction As RFunction + Private clsFourierSeriesFunction As RFunction + Private clsListFunction As RFunction + Private clsBinomialFunction As RFunction + Private clsPbsFunction As RFunction + Private clsNsFunction As RFunction + Private clsYlabFunction As RFunction Private Sub dlgSeasonalPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -68,10 +111,10 @@ Public Class dlgSeasonalPlot ucrReceiverStation.SetClimaticType("station") ucrReceiverStation.bAutoFill = True - ucrInputReferenceSummary.SetItems({"Prop Above", "Prop Below", "Mean"}) + ucrInputReferenceSummary.SetItems({"Mean", "Mean Above", "Mean Below", "Prop Above", "Prop Below", "Std.dev"}) ucrInputReferenceSummary.SetDropDownStyleAsNonEditable() - ucrInputEstimateSummary.SetItems({"Prop Above", "Prop Below", "Mean"}) + ucrInputEstimateSummary.SetItems({"Prop Above", "Prop Below"}) ucrInputEstimateSummary.SetDropDownStyleAsNonEditable() ucrInputReferenceThreshold.SetParameter(New RParameter("value", 1)) @@ -90,17 +133,20 @@ Public Class dlgSeasonalPlot ucrChkRemoveMissing.AddParameterPresentCondition(True, "filter") ucrChkRemoveMissing.AddParameterPresentCondition(False, "filter", False) - ucrInputReferenceSummary.AddToLinkedControls(ucrInputReferenceThreshold, {"Prop Above", "Prop Below"}, bNewLinkedHideIfParameterMissing:=True) - ucrInputEstimateSummary.AddToLinkedControls(ucrInputEstimateThreshold, {"Prop Above", "Prop Below"}, bNewLinkedHideIfParameterMissing:=True) + ucrChkOptionalSummary.SetText("Different summary for estimate") + + ucrInputReferenceSummary.AddToLinkedControls(ucrInputReferenceThreshold, {"Prop Above", "Prop Below", "Mean Above", "Mean Below"}, bNewLinkedHideIfParameterMissing:=True) ucrChkMovingAverage.AddToLinkedControls(ucrInputN, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputSmoothing.AddToLinkedControls({ucrNudHarmonics, ucrNudPeriod}, {"Fourier Series"}, bNewLinkedHideIfParameterMissing:=True) ucrInputSmoothing.AddToLinkedControls(ucrNudSpan, {"LOESS"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputSmoothing.AddToLinkedControls(ucrNudDf, {"Periodic Splines", "Natural Splines"}, bNewLinkedHideIfParameterMissing:=True) + ucrChkOptionalSummary.AddToLinkedControls(ucrInputEstimateSummary, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputN.SetLinkedDisplayControl(lblN) ucrNudHarmonics.SetLinkedDisplayControl(lblHarmonics) ucrNudPeriod.SetLinkedDisplayControl(lblPeriod) ucrNudSpan.SetLinkedDisplayControl(lblSpan) ucrNudDf.SetLinkedDisplayControl(lblDf) + ucrInputEstimateSummary.SetLinkedDisplayControl(ucrInputEstimateThreshold) ucrChkPoints.SetText("Points") ucrChkPoints.AddParameterPresentCondition(True, "geom_point") @@ -139,20 +185,23 @@ Public Class dlgSeasonalPlot clsPipeOperator = New ROperator clsAndOperator = New ROperator clsRefGreaterOperator = New ROperator - clsEstGreaterOperator = New ROperator + clsEst1GreaterOperator = New ROperator clsRefLessOperator = New ROperator - clsEstLessOperator = New ROperator + clsEst1LessOperator = New ROperator clsDivideOperator = New ROperator + clsLessOperator = New ROperator + clsGreaterOperator = New ROperator + clsEst2GreaterOperator = New ROperator + clsEst2LessOperator = New ROperator clsPlusOperator = New ROperator clsFacetWrapTildeOperator = New ROperator clsPbsSplinesTildeOperator = New ROperator - clsFilterFunction = New RFunction + clsMissingFilterFunction = New RFunction clsRefIsNotNaFunction = New RFunction clsEstIsNotNaFunction = New RFunction clsMutateFunction = New RFunction - clsMutateFunction = New RFunction clsPivotLongerFunction = New RFunction clsGroupByFunction = New RFunction clsSummariseFunction = New RFunction @@ -162,6 +211,8 @@ Public Class dlgSeasonalPlot clsPropSumFunction = New RFunction clsNotIsNaThreshFunction = New RFunction clsMeanFunction = New RFunction + clsMeanFilterFunction = New RFunction + clsStdFunction = New RFunction clsGgplotFunction = New RFunction clsGeomPointFunction = New RFunction @@ -177,21 +228,22 @@ Public Class dlgSeasonalPlot clsBinomialFunction = New RFunction clsPbsFunction = New RFunction clsNsFunction = New RFunction + clsYlabFunction = New RFunction ucrSelectorSeasonalityComparisons.Reset() ucrReceiverReference.SetMeAsReceiver() - ucrInputEstimateSummary.cboInput.SelectedItem = "Mean" + ucrInputEstimateSummary.cboInput.SelectedItem = "Prop Above" ucrInputReferenceSummary.cboInput.SelectedItem = "Mean" ucrInputSmoothing.cboInput.SelectedItem = "Fourier Series" clsPipeOperator.SetOperation("%>%") - clsPipeOperator.AddParameter("filter", clsRFunctionParameter:=clsFilterFunction, iPosition:=1) + clsPipeOperator.AddParameter("filter", clsRFunctionParameter:=clsMissingFilterFunction, iPosition:=1) clsPipeOperator.AddParameter("mutate", clsRFunctionParameter:=clsMutateFunction, iPosition:=2) clsPipeOperator.AddParameter("pivot_longer", clsRFunctionParameter:=clsPivotLongerFunction, iPosition:=3) - clsPipeOperator.AddParameter("group_by", clsRFunctionParameter:=clsGroupByFunction, iPosition:=4) - clsPipeOperator.AddParameter("summarise", clsRFunctionParameter:=clsSummariseFunction, iPosition:=5) - clsPipeOperator.AddParameter("moving_mutate", clsRFunctionParameter:=clsMovingMutateFunction, iPosition:=6) - clsPipeOperator.AddParameter("ggplot", clsROperatorParameter:=clsPlusOperator, iPosition:=7) + clsPipeOperator.AddParameter("group_by", clsRFunctionParameter:=clsGroupByFunction, iPosition:=5) + clsPipeOperator.AddParameter("summarise", clsRFunctionParameter:=clsSummariseFunction, iPosition:=6) + clsPipeOperator.AddParameter("moving_mutate", clsRFunctionParameter:=clsMovingMutateFunction, iPosition:=7) + clsPipeOperator.AddParameter("ggplot", clsROperatorParameter:=clsPlusOperator, iPosition:=8) clsAndOperator.SetOperation("&") @@ -201,21 +253,21 @@ Public Class dlgSeasonalPlot clsRefGreaterOperator.SetOperation(">") clsRefGreaterOperator.AddParameter("value", 0.85, iPosition:=1) - clsEstGreaterOperator.SetOperation(">") - clsEstGreaterOperator.AddParameter("value", 0.85, iPosition:=1) + clsEst1GreaterOperator.SetOperation(">") + clsEst1GreaterOperator.AddParameter("value", 0.85, iPosition:=1) clsRefLessOperator.SetOperation("<") - clsEstLessOperator.SetOperation("<") + clsEst1LessOperator.SetOperation("<") clsDivideOperator.SetOperation("/") clsDivideOperator.bSpaceAroundOperation = False clsDivideOperator.AddParameter("sum", clsRFunctionParameter:=clsPropSumFunction, iPosition:=0) clsDivideOperator.AddParameter("n", "n", iPosition:=1) - clsFilterFunction.SetPackageName("dplyr") - clsFilterFunction.SetRCommand("filter") - clsFilterFunction.AddParameter("and", clsROperatorParameter:=clsAndOperator, bIncludeArgumentName:=False, iPosition:=0) + clsMissingFilterFunction.SetPackageName("dplyr") + clsMissingFilterFunction.SetRCommand("filter") + clsMissingFilterFunction.AddParameter("and", clsROperatorParameter:=clsAndOperator, bIncludeArgumentName:=False, iPosition:=0) clsRefIsNotNaFunction.SetRCommand("!is.na") @@ -224,8 +276,7 @@ Public Class dlgSeasonalPlot clsMutateFunction.SetPackageName("dplyr") clsMutateFunction.SetRCommand("mutate") clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefGreaterOperator, iPosition:=0) - clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEstGreaterOperator, iPosition:=1) - + clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst1GreaterOperator, iPosition:=1) clsPivotLongerFunction.SetPackageName("tidyr") clsPivotLongerFunction.SetRCommand("pivot_longer") @@ -267,6 +318,23 @@ Public Class dlgSeasonalPlot clsMeanFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) clsMeanFunction.AddParameter("na.rm", "TRUE", iPosition:=1) + clsMeanFilterFunction.SetPackageName("dplyr") + clsMeanFilterFunction.SetRCommand("filter") + + clsLessOperator.SetOperation("<") + clsLessOperator.AddParameter("0", "value", iPosition:=0) + + clsGreaterOperator.SetOperation(">") + clsGreaterOperator.AddParameter("1", "value", iPosition:=0) + + clsEst2GreaterOperator.SetOperation(">") + + clsEst2LessOperator.SetOperation("<") + + clsStdFunction.SetRCommand("sd") + clsStdFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) + clsStdFunction.AddParameter("na.rm", "TRUE", iPosition:=1) + 'ggplot functions + operators clsGgplotFunction.SetPackageName("ggplot2") clsGgplotFunction.SetRCommand("ggplot") @@ -276,6 +344,7 @@ Public Class dlgSeasonalPlot clsPlusOperator.AddParameter("ggplot", clsRFunctionParameter:=clsGgplotFunction, iPosition:=0) clsPlusOperator.AddParameter("geom_line", clsRFunctionParameter:=clsGeomLineFunction, iPosition:=2) clsPlusOperator.AddParameter("geom_smooth", clsRFunctionParameter:=clsGeomSmoothFunction, iPosition:=3) + clsPlusOperator.AddParameter("ylab", clsRFunctionParameter:=clsYlabFunction, iPosition:=4) clsFacetWrapTildeOperator.SetOperation("~") clsFacetWrapTildeOperator.AddParameter("", "", iPosition:=0) @@ -337,6 +406,9 @@ Public Class dlgSeasonalPlot clsNsFunction.AddParameter("x", "x", bIncludeArgumentName:=False, iPosition:=0) clsNsFunction.AddParameter("df", 6, iPosition:=1) + clsYlabFunction.SetPackageName("ggplot2") + clsYlabFunction.SetRCommand("ylab") + clsPipeOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorSeasonalityComparisons.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) End Sub @@ -345,12 +417,18 @@ Public Class dlgSeasonalPlot ucrReceiverReference.AddAdditionalCodeParameterPair(clsRefGreaterOperator, ucrReceiverReference.GetParameter, iAdditionalPairNo:=1) ucrReceiverReference.AddAdditionalCodeParameterPair(clsRefLessOperator, ucrReceiverReference.GetParameter, iAdditionalPairNo:=2) - ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEstGreaterOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=1) - ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEstLessOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=2) + ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEst1GreaterOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=1) + ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEst1LessOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=2) + ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEst2GreaterOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=3) + ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEst2LessOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=4) ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsRefLessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=1) + ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsLessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=2) + ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsGreaterOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=3) + ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsEst2GreaterOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=4) + ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsEst2LessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=5) - ucrInputEstimateThreshold.AddAdditionalCodeParameterPair(clsEstLessOperator, ucrInputEstimateThreshold.GetParameter, iAdditionalPairNo:=1) + ucrInputEstimateThreshold.AddAdditionalCodeParameterPair(clsEst1LessOperator, ucrInputEstimateThreshold.GetParameter, iAdditionalPairNo:=1) ucrReceiverSeasonality.AddAdditionalCodeParameterPair(clsGgPlotAesFunction, New RParameter("x", 0), iAdditionalPairNo:=1) @@ -362,7 +440,7 @@ Public Class dlgSeasonalPlot ucrReceiverEstimate.SetRCode(clsEstIsNotNaFunction, bReset) ucrReceiverReference.SetRCode(clsRefIsNotNaFunction, bReset) ucrInputReferenceThreshold.SetRCode(clsRefGreaterOperator, bReset) - ucrInputEstimateThreshold.SetRCode(clsEstGreaterOperator, bReset) + ucrInputEstimateThreshold.SetRCode(clsEst1GreaterOperator, bReset) ucrReceiverStation.SetRCode(clsGroupByFunction, bReset) ucrReceiverSeasonality.SetRCode(clsGroupByFunction, bReset) ucrInputN.SetRCode(clsMovingFunction, bReset) @@ -374,10 +452,11 @@ Public Class dlgSeasonalPlot ucrNudDf.SetRCode(clsNsFunction, bReset) ucrNudHarmonics.SetRCode(clsFourierSeriesFunction, bReset) ucrNudPeriod.SetRCode(clsFourierSeriesFunction, bReset) + ucrChkOptionalSummary.SetRCode(clsEst1GreaterOperator, bReset) End Sub Private Sub TestOkEnabled() - If ucrReceiverReference.IsEmpty OrElse ucrReceiverEstimate.IsEmpty OrElse ucrReceiverSeasonality.IsEmpty OrElse (ucrChkMovingAverage.Checked AndAlso ucrInputN.IsEmpty) OrElse ((ucrInputReferenceSummary.GetText = "Prop Above" OrElse ucrInputReferenceSummary.GetText = "Prop Below") AndAlso ucrInputReferenceThreshold.IsEmpty) OrElse ((ucrInputEstimateSummary.GetText = "Prop Above" OrElse ucrInputEstimateSummary.GetText = "Prop Below") AndAlso ucrInputEstimateThreshold.IsEmpty) OrElse Not ucrSaveGraph.IsComplete OrElse (ucrInputSmoothing.GetText = "Fourier Series" AndAlso (ucrNudHarmonics.GetText = "" OrElse ucrNudPeriod.GetText = "")) OrElse (ucrInputSmoothing.GetText = "LOESS" AndAlso ucrNudSpan.GetText = "") OrElse ((ucrInputSmoothing.GetText = "Periodic Splines" OrElse ucrInputSmoothing.GetText = "Natural Splines") AndAlso ucrNudDf.GetText = "") Then + If ucrReceiverReference.IsEmpty OrElse ucrReceiverEstimate.IsEmpty OrElse ucrReceiverSeasonality.IsEmpty OrElse (ucrChkMovingAverage.Checked AndAlso ucrInputN.IsEmpty) OrElse ((ucrInputReferenceSummary.GetText = "Prop Above" OrElse ucrInputReferenceSummary.GetText = "Prop Below") AndAlso ucrInputReferenceThreshold.IsEmpty) OrElse (ucrChkOptionalSummary.Checked AndAlso (ucrInputEstimateSummary.GetText = "Prop Above" OrElse ucrInputEstimateSummary.GetText = "Prop Below") AndAlso ucrInputEstimateThreshold.IsEmpty) OrElse Not ucrSaveGraph.IsComplete OrElse (ucrInputSmoothing.GetText = "Fourier Series" AndAlso (ucrNudHarmonics.GetText = "" OrElse ucrNudPeriod.GetText = "")) OrElse (ucrInputSmoothing.GetText = "LOESS" AndAlso ucrNudSpan.GetText = "") OrElse ((ucrInputSmoothing.GetText = "Periodic Splines" OrElse ucrInputSmoothing.GetText = "Natural Splines") AndAlso ucrNudDf.GetText = "") Then ucrBase.OKEnabled(False) Else ucrBase.OKEnabled(True) @@ -390,34 +469,107 @@ Public Class dlgSeasonalPlot TestOkEnabled() End Sub - Private Sub ucrInputReferenceSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimate.ControlValueChanged + Private Sub UpdateSummaryParameters() Select Case ucrInputReferenceSummary.GetText Case "Prop Above" + clsPipeOperator.RemoveParameterByName("filter2") clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefGreaterOperator, iPosition:=0) + clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst2GreaterOperator, iPosition:=1) + clsSummariseFunction.AddParameter("calc_summary", clsROperatorParameter:=clsDivideOperator, iPosition:=3) Case "Prop Below" + clsPipeOperator.RemoveParameterByName("filter2") clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefLessOperator, iPosition:=0) + clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst2LessOperator, iPosition:=1) + clsSummariseFunction.AddParameter("calc_summary", clsROperatorParameter:=clsDivideOperator, iPosition:=3) Case "Mean" + clsPipeOperator.RemoveParameterByName("filter2") clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) + clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) + clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + Case "Mean Above" + clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) + clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) + clsMeanFilterFunction.AddParameter("operator", clsROperatorParameter:=clsGreaterOperator, bIncludeArgumentName:=False, iPosition:=0) + clsPipeOperator.AddParameter("filter2", clsRFunctionParameter:=clsMeanFilterFunction, iPosition:=4) clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + Case "Mean Below" + clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) + clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) + clsMeanFilterFunction.AddParameter("operator", clsROperatorParameter:=clsLessOperator, bIncludeArgumentName:=False, iPosition:=0) + clsPipeOperator.AddParameter("filter2", clsRFunctionParameter:=clsMeanFilterFunction, iPosition:=4) + clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + Case "Std.dev" + clsPipeOperator.RemoveParameterByName("filter2") + clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) + clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) + clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsStdFunction, iPosition:=3) End Select - End Sub - Private Sub ucrInputEstimateSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputEstimateSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimate.ControlValueChanged - Select Case ucrInputEstimateSummary.GetText - Case "Prop Above" - clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEstGreaterOperator, iPosition:=1) - Case "Prop Below" - clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEstLessOperator, iPosition:=1) - Case "Mean" - clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) - clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + Private Sub ucrInputReferenceSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimate.ControlValueChanged, ucrInputSmoothing.ControlValueChanged + UpdateSummaryParameters() + Select Case ucrInputSmoothing.GetText + Case "Fourier Series" + clsGeomSmoothFunction.AddParameter("formula", clsRFunctionParameter:=clsAsFormulaFunction, iPosition:=1) + Case "Periodic Splines" + clsPbsSplinesTildeOperator.AddParameter("pbs", clsRFunctionParameter:=clsPbsFunction, iPosition:=1) + clsPbsSplinesTildeOperator.RemoveParameterByName("ns") + clsPbsSplinesTildeOperator.RemoveParameterByName("x") + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + Case "Natural Splines" + clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") + clsPbsSplinesTildeOperator.RemoveParameterByName("x") + clsPbsSplinesTildeOperator.AddParameter("ns", clsRFunctionParameter:=clsNsFunction, iPosition:=1) + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + Case "LOESS" + clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") + clsPbsSplinesTildeOperator.RemoveParameterByName("ns") + clsPbsSplinesTildeOperator.AddParameter("x", "x", iPosition:=1) + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + End Select + + If ucrInputSmoothing.GetText = "LOESS" Then + clsGeomSmoothFunction.AddParameter("method", Chr(34) & "loess" & Chr(34), iPosition:=0) + clsGeomSmoothFunction.RemoveParameterByName("method.args") + Else + Select Case ucrInputReferenceSummary.GetText + Case "Prop Above", "Prop Below" + clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) + clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) + clsYlabFunction.AddParameter("label", "Prop") + Case "Mean", "Mean Above", "Mean Below", "Std.dev" + clsGeomSmoothFunction.AddParameter("method", Chr(34) & "lm" & Chr(34), iPosition:=0) + clsGeomSmoothFunction.RemoveParameterByName("method.args") + clsYlabFunction.AddParameter("label", "Std.dev") + End Select + End If + + Select Case ucrInputReferenceSummary.GetText + Case "Prop Above", "Prop Below" + clsYlabFunction.AddParameter("label", Chr(34) & "Prop" & Chr(34)) + Case "Mean", "Mean Above", "Mean Below" + clsYlabFunction.AddParameter("label", Chr(34) & "Mean" & Chr(34)) + Case "Std.dev" + clsYlabFunction.AddParameter("label", Chr(34) & "Std.dev" & Chr(34)) End Select End Sub + Private Sub ucrInputEstimateSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputEstimateSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimate.ControlValueChanged, ucrChkOptionalSummary.ControlValueChanged + If ucrChkOptionalSummary.Checked Then + Select Case ucrInputEstimateSummary.GetText + Case "Prop Above" + clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst1GreaterOperator, iPosition:=1) + Case "Prop Below" + clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst1LessOperator, iPosition:=1) + End Select + Else + UpdateSummaryParameters() + End If + End Sub + Private Sub ucrChkRemoveMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkRemoveMissing.ControlValueChanged If ucrChkRemoveMissing.Checked Then - clsPipeOperator.AddParameter("filter", clsRFunctionParameter:=clsFilterFunction, iPosition:=1) + clsPipeOperator.AddParameter("filter", clsRFunctionParameter:=clsMissingFilterFunction, iPosition:=1) Else clsPipeOperator.RemoveParameterByName("filter") End If @@ -425,7 +577,7 @@ Public Class dlgSeasonalPlot Private Sub ucrChkMovingAverage_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMovingAverage.ControlValueChanged If ucrChkMovingAverage.Checked Then - clsPipeOperator.AddParameter("moving_mutate", clsRFunctionParameter:=clsMovingMutateFunction, iPosition:=6) + clsPipeOperator.AddParameter("moving_mutate", clsRFunctionParameter:=clsMovingMutateFunction, iPosition:=7) clsPlusOperator.AddParameter("geom_line", clsRFunctionParameter:=clsGeomLineFunction, iPosition:=2) clsGeomLineAesFunction.AddParameter("y", "moving", iPosition:=0) Else @@ -443,46 +595,15 @@ Public Class dlgSeasonalPlot End If End Sub - Private Sub ucrInputSmoothing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputSmoothing.ControlValueChanged - Select Case ucrInputSmoothing.GetText - Case "Fourier Series" - clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) - clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) - clsGeomSmoothFunction.AddParameter("formula", clsRFunctionParameter:=clsAsFormulaFunction, iPosition:=1) - Case "Periodic Splines" - clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) - clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) - clsPbsSplinesTildeOperator.AddParameter("pbs", clsRFunctionParameter:=clsPbsFunction, iPosition:=1) - clsPbsSplinesTildeOperator.RemoveParameterByName("ns") - clsPbsSplinesTildeOperator.RemoveParameterByName("x") - clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) - Case "Natural Splines" - clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) - clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) - clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") - clsPbsSplinesTildeOperator.RemoveParameterByName("x") - clsPbsSplinesTildeOperator.AddParameter("ns", clsRFunctionParameter:=clsNsFunction, iPosition:=1) - clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) - Case "LOESS" - clsGeomSmoothFunction.AddParameter("method", Chr(34) & "loess" & Chr(34), iPosition:=0) - clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") - clsPbsSplinesTildeOperator.RemoveParameterByName("ns") - clsPbsSplinesTildeOperator.AddParameter("x", "x", iPosition:=1) - clsGeomSmoothFunction.RemoveParameterByName("method.args") - clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) - End Select - - End Sub - Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged If Not ucrReceiverStation.IsEmpty Then - clsPlusOperator.AddParameter("facet_wrap", clsRFunctionParameter:=clsFacetWrapFunction, iPosition:=4) + clsPlusOperator.AddParameter("facet_wrap", clsRFunctionParameter:=clsFacetWrapFunction, iPosition:=5) Else clsPlusOperator.RemoveParameterByName("facet_wrap") End If End Sub - Private Sub ucrReceiverReference_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReference.ControlContentsChanged, ucrReceiverEstimate.ControlContentsChanged, ucrReceiverSeasonality.ControlContentsChanged, ucrChkMovingAverage.ControlContentsChanged, ucrInputN.ControlContentsChanged, ucrInputReferenceSummary.ControlContentsChanged, ucrInputReferenceThreshold.ControlContentsChanged, ucrInputEstimateSummary.ControlContentsChanged, ucrInputEstimateThreshold.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrInputSmoothing.ControlContentsChanged, ucrNudHarmonics.ControlContentsChanged, ucrNudPeriod.ControlContentsChanged, ucrNudSpan.ControlContentsChanged, ucrNudDf.ControlContentsChanged + Private Sub ucrReceiverReference_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReference.ControlContentsChanged, ucrReceiverEstimate.ControlContentsChanged, ucrReceiverSeasonality.ControlContentsChanged, ucrChkMovingAverage.ControlContentsChanged, ucrInputN.ControlContentsChanged, ucrInputReferenceSummary.ControlContentsChanged, ucrInputReferenceThreshold.ControlContentsChanged, ucrInputEstimateSummary.ControlContentsChanged, ucrInputEstimateThreshold.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrInputSmoothing.ControlContentsChanged, ucrNudHarmonics.ControlContentsChanged, ucrNudPeriod.ControlContentsChanged, ucrNudSpan.ControlContentsChanged, ucrNudDf.ControlContentsChanged, ucrChkOptionalSummary.ControlContentsChanged TestOkEnabled() End Sub End Class From bf493ac1143845f0cb98efde8ed19f343ef7ee91 Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Wed, 23 Sep 2020 16:40:00 +0000 Subject: [PATCH 167/277] Added a line to correct an error involving periodic splines --- instat/dlgSeasonalPlot.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index c2238c35c29..0e7753ffab4 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -399,6 +399,7 @@ Public Class dlgSeasonalPlot clsPbsFunction.SetPackageName("pbs") clsPbsFunction.SetRCommand("pbs") + clsPbsFunction.AddParameter("x", "x", bIncludeArgumentName:=False, iPosition:=0) clsPbsFunction.AddParameter("df", 6, iPosition:=1) clsNsFunction.SetPackageName("splines") From 5517808dfddeedb733a321f1ecf733ebf96d25c4 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 23 Sep 2020 20:22:50 +0100 Subject: [PATCH 168/277] added option for individual summaries --- instat/dlgTimeSeriesPlot.Designer.vb | 30 ++- instat/dlgTimeSeriesPlot.vb | 138 ++++++++----- instat/sdgTimeSeries.Designer.vb | 18 +- instat/sdgTimeSeries.vb | 282 ++++++++++++++++++++------- 4 files changed, 337 insertions(+), 131 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb index c5292021c55..dabdb098651 100644 --- a/instat/dlgTimeSeriesPlot.Designer.vb +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -37,6 +37,8 @@ Partial Class dlgTimeSeriesPlot Me.ucrReceiverReference = New instat.ucrReceiverSingle() Me.ucrSelectorTimeSeriesPlots = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.ucrChkIncludeLineOfBestFit = New instat.ucrCheck() + Me.ucrChkWithSE = New instat.ucrCheck() Me.SuspendLayout() ' 'lblReferenceValues @@ -77,7 +79,7 @@ Partial Class dlgTimeSeriesPlot ' 'cmdSummaries ' - Me.cmdSummaries.Location = New System.Drawing.Point(9, 345) + Me.cmdSummaries.Location = New System.Drawing.Point(286, 354) Me.cmdSummaries.Name = "cmdSummaries" Me.cmdSummaries.Size = New System.Drawing.Size(120, 23) Me.cmdSummaries.TabIndex = 12 @@ -95,7 +97,7 @@ Partial Class dlgTimeSeriesPlot 'ucrChkIncludePoints ' Me.ucrChkIncludePoints.Checked = False - Me.ucrChkIncludePoints.Location = New System.Drawing.Point(10, 279) + Me.ucrChkIncludePoints.Location = New System.Drawing.Point(10, 253) Me.ucrChkIncludePoints.Name = "ucrChkIncludePoints" Me.ucrChkIncludePoints.Size = New System.Drawing.Size(147, 20) Me.ucrChkIncludePoints.TabIndex = 10 @@ -103,7 +105,7 @@ Partial Class dlgTimeSeriesPlot 'ucrChkIncludeMeanLines ' Me.ucrChkIncludeMeanLines.Checked = False - Me.ucrChkIncludeMeanLines.Location = New System.Drawing.Point(10, 316) + Me.ucrChkIncludeMeanLines.Location = New System.Drawing.Point(10, 290) Me.ucrChkIncludeMeanLines.Name = "ucrChkIncludeMeanLines" Me.ucrChkIncludeMeanLines.Size = New System.Drawing.Size(147, 20) Me.ucrChkIncludeMeanLines.TabIndex = 11 @@ -111,7 +113,7 @@ Partial Class dlgTimeSeriesPlot 'ucrChkNAValues ' Me.ucrChkNAValues.Checked = False - Me.ucrChkNAValues.Location = New System.Drawing.Point(10, 242) + Me.ucrChkNAValues.Location = New System.Drawing.Point(10, 216) Me.ucrChkNAValues.Name = "ucrChkNAValues" Me.ucrChkNAValues.Size = New System.Drawing.Size(272, 20) Me.ucrChkNAValues.TabIndex = 9 @@ -182,11 +184,29 @@ Partial Class dlgTimeSeriesPlot Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 14 ' + 'ucrChkIncludeLineOfBestFit + ' + Me.ucrChkIncludeLineOfBestFit.Checked = False + Me.ucrChkIncludeLineOfBestFit.Location = New System.Drawing.Point(10, 327) + Me.ucrChkIncludeLineOfBestFit.Name = "ucrChkIncludeLineOfBestFit" + Me.ucrChkIncludeLineOfBestFit.Size = New System.Drawing.Size(147, 20) + Me.ucrChkIncludeLineOfBestFit.TabIndex = 16 + ' + 'ucrChkWithSE + ' + Me.ucrChkWithSE.Checked = False + Me.ucrChkWithSE.Location = New System.Drawing.Point(163, 327) + Me.ucrChkWithSE.Name = "ucrChkWithSE" + Me.ucrChkWithSE.Size = New System.Drawing.Size(135, 20) + Me.ucrChkWithSE.TabIndex = 17 + ' 'dlgTimeSeriesPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(422, 482) + Me.Controls.Add(Me.ucrChkWithSE) + Me.Controls.Add(Me.ucrChkIncludeLineOfBestFit) Me.Controls.Add(Me.ucrSavePlot) Me.Controls.Add(Me.cmdSummaries) Me.Controls.Add(Me.ucrChkIncludePoints) @@ -228,4 +248,6 @@ Partial Class dlgTimeSeriesPlot Friend WithEvents lblEstimates As Label Friend WithEvents ucrReceiverEstimates As ucrReceiverSingle Friend WithEvents ucrSavePlot As ucrSave + Friend WithEvents ucrChkIncludeLineOfBestFit As ucrCheck + Friend WithEvents ucrChkWithSE As ucrCheck End Class diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 21311475740..e0af8262e5d 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -74,7 +74,6 @@ Public Class dlgTimeSeriesPlot Private clsRoundSd As RFunction Private clsSignifSlope As RFunction - ' Calculate Comparison Summaries ' These functions construct the R code below if annotated comparison summaries are added. ' df_comparison <- df %>% @@ -83,9 +82,9 @@ Public Class dlgTimeSeriesPlot ' cor = cor(estimate, gauge, use = "na.or.complete"), ' me = hydroGOF : Me(estimate, gauge), ' mae = hydroGOF:mae(estimate, gauge)) - Private clsSummaryOperator As ROperator - Private clsSummaryGroupBy As RFunction - Private clsSummarise As RFunction + Private clsComparisonSummariesOperator As ROperator + Private clsComparisonSummariesGroupBy As RFunction + Private clsComparisonSummariesSummarise As RFunction Private clsNComparison As RFunction Private clsCor As RFunction Private clsMe As RFunction @@ -110,10 +109,14 @@ Public Class dlgTimeSeriesPlot Private clsRoundRSd As RFunction Private clsRoundKge As RFunction - ' A dictionary of the summary functions above. The key is the summary name in lower case e.g. "bias" - ' The value is a tuple of two RFunctions. Item1 is the summary function. Item2 is the paste function containing the summary. + ' A dictionary of the comparison/individual summary functions above. + ' The key is the summary name in lower case e.g. "bias" + ' The value is a tuple of two RFunctions. + ' Item1 is the summary function. + ' Item2 is the paste function containing the summary. ' This dictionary is created to avoid passing all the RFunctions to the sub dialog individually. Private dctComparisonSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) + Private dctIndividualSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) ' ggplot functions Private clsGgplotOperator As ROperator @@ -128,6 +131,8 @@ Public Class dlgTimeSeriesPlot Private clsComparisonGeomText As RFunction Private clsComparisonGeomTextAes As RFunction Private clsComparisonPasteLabel As RFunction + Private clsGeomSmoothParameter As RParameter + Private clsGeomSmooth As RFunction Private clsReferenceGeomText As RFunction Private clsReferenceGeomTextAes As RFunction @@ -152,8 +157,11 @@ Public Class dlgTimeSeriesPlot Private strGeomLineParameterName As String = "geom_line" Private strGeomPointParameterName As String = "geom_point" Private strGeomHLineParameterName As String = "geom_hline" - Private strGeomTextParameterName As String = "geom_text" - Private strGeomParameterNames() As String = {strGeomLineParameterName, strGeomPointParameterName, strGeomHLineParameterName, strGeomTextParameterName} + Private strGeomTextReferenceParameterName As String = "reference_geom_text" + Private strGeomTextEstimatesParameterName As String = "estimates_geom_text" + Private strGeomTextComparisonParameterName As String = "comparison_geom_text" + Private strGeomSmoothParameterName As String = "geom_smooth" + Private strGeomParameterNames() As String = {strGeomLineParameterName, strGeomPointParameterName, strGeomHLineParameterName, strGeomTextReferenceParameterName, strGeomTextEstimatesParameterName, strGeomTextComparisonParameterName} Private Sub dlgTimeSeriesPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -221,6 +229,17 @@ Public Class dlgTimeSeriesPlot ucrChkIncludeMeanLines.SetText("Include Mean Lines") ucrChkIncludeMeanLines.SetParameter(clsGeomHLineParameter, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + clsGeomSmooth = New RFunction + clsGeomSmoothParameter = New RParameter(strGeomSmoothParameterName, clsGeomSmooth, iNewPosition:=4) + ucrChkIncludeLineOfBestFit.SetText("Include Line of Best Fit") + ucrChkIncludeLineOfBestFit.SetParameter(clsGeomSmoothParameter, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) + ucrChkIncludeLineOfBestFit.AddToLinkedControls(ucrChkWithSE, {True}, bNewLinkedHideIfParameterMissing:=True) + + ucrChkWithSE.SetText("With Standard Error") + ucrChkWithSE.SetParameter(New RParameter("se", 1)) + ucrChkWithSE.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkWithSE.SetRDefault("TRUE") + ucrSavePlot.SetPrefix("line") ucrSavePlot.SetIsComboBox() ucrSavePlot.SetCheckBoxText("Save Graph") @@ -251,10 +270,13 @@ Public Class dlgTimeSeriesPlot clsPasteMean = New RFunction clsPasteSd = New RFunction clsPasteSlope = New RFunction + clsSignifMean = New RFunction + clsRoundSd = New RFunction + clsSignifSlope = New RFunction - clsSummaryOperator = New ROperator - clsSummaryGroupBy = New RFunction - clsSummarise = New RFunction + clsComparisonSummariesOperator = New ROperator + clsComparisonSummariesGroupBy = New RFunction + clsComparisonSummariesSummarise = New RFunction clsNComparison = New RFunction clsCor = New RFunction clsPbias = New RFunction @@ -279,16 +301,6 @@ Public Class dlgTimeSeriesPlot clsSignifRmse = New RFunction clsRoundKge = New RFunction - dctComparisonSummaries = New Dictionary(Of String, Tuple(Of RFunction, RFunction)) - dctComparisonSummaries.Add("n", New Tuple(Of RFunction, RFunction)(clsNComparison, clsPasteN)) - dctComparisonSummaries.Add("cor", New Tuple(Of RFunction, RFunction)(clsCor, clsPasteCor)) - dctComparisonSummaries.Add("pbias", New Tuple(Of RFunction, RFunction)(clsPbias, clsPastePbias)) - dctComparisonSummaries.Add("rsd", New Tuple(Of RFunction, RFunction)(clsRSd, clsPasteRSd)) - dctComparisonSummaries.Add("me", New Tuple(Of RFunction, RFunction)(clsMe, clsPasteMe)) - dctComparisonSummaries.Add("mae", New Tuple(Of RFunction, RFunction)(clsMae, clsPasteMae)) - dctComparisonSummaries.Add("rmse", New Tuple(Of RFunction, RFunction)(clsRmse, clsPasteRmse)) - dctComparisonSummaries.Add("kge", New Tuple(Of RFunction, RFunction)(clsKge, clsPasteKge)) - clsGgplotOperator = New ROperator clsGgplotFunction = New RFunction clsGgplotAes = New RFunction @@ -296,6 +308,7 @@ Public Class dlgTimeSeriesPlot clsGeomPoint.Clear() clsGeomHLine.Clear() clsGeomHLineAes.Clear() + clsGeomSmooth.Clear() clsComparisonGeomText = New RFunction clsComparisonGeomTextAes = New RFunction clsComparisonPasteLabel = New RFunction @@ -309,6 +322,22 @@ Public Class dlgTimeSeriesPlot clsEstimatesPasteLabel = New RFunction clsEstimatesFilter = New RFunction + dctComparisonSummaries = New Dictionary(Of String, Tuple(Of RFunction, RFunction)) + dctComparisonSummaries.Add("n", New Tuple(Of RFunction, RFunction)(clsNComparison, clsPasteN)) + dctComparisonSummaries.Add("cor", New Tuple(Of RFunction, RFunction)(clsCor, clsPasteCor)) + dctComparisonSummaries.Add("pbias", New Tuple(Of RFunction, RFunction)(clsPbias, clsPastePbias)) + dctComparisonSummaries.Add("rsd", New Tuple(Of RFunction, RFunction)(clsRSd, clsPasteRSd)) + dctComparisonSummaries.Add("me", New Tuple(Of RFunction, RFunction)(clsMe, clsPasteMe)) + dctComparisonSummaries.Add("mae", New Tuple(Of RFunction, RFunction)(clsMae, clsPasteMae)) + dctComparisonSummaries.Add("rmse", New Tuple(Of RFunction, RFunction)(clsRmse, clsPasteRmse)) + dctComparisonSummaries.Add("kge", New Tuple(Of RFunction, RFunction)(clsKge, clsPasteKge)) + + dctIndividualSummaries = New Dictionary(Of String, Tuple(Of RFunction, RFunction)) + dctIndividualSummaries.Add("n", New Tuple(Of RFunction, RFunction)(clsNIndividual, clsPasteNIndividual)) + dctIndividualSummaries.Add("mean", New Tuple(Of RFunction, RFunction)(clsMean, clsPasteMean)) + dctIndividualSummaries.Add("sd", New Tuple(Of RFunction, RFunction)(clsSd, clsPasteSd)) + dctIndividualSummaries.Add("slope", New Tuple(Of RFunction, RFunction)(clsSlope, clsPasteSlope)) + ucrSelectorTimeSeriesPlots.Reset() ucrSelectorTimeSeriesPlots.SetGgplotFunction(clsGgplotOperator) ucrSavePlot.Reset() @@ -349,7 +378,7 @@ Public Class dlgTimeSeriesPlot clsPivotCFunction.SetRCommand("c") - ' Calculate means + ' Calculate individual summaries clsIndividualSummariesOperator.SetOperation("%>%") clsIndividualSummariesOperator.AddParameter("0", clsROperatorParameter:=clsStackOperator, iPosition:=0) @@ -376,21 +405,21 @@ Public Class dlgTimeSeriesPlot clsSd.AddParameter("x", strValue, iPosition:=0) clsSd.AddParameter("na.rm", "TRUE", iPosition:=1) - clsSlope.SetRCommand("mean") + clsSlope.SetRCommand("slope") clsSlope.AddParameter("y", strValue, iPosition:=0) - ' Calculate summaries + ' Calculate comparison summaries - clsSummaryOperator.SetOperation("%>%") - clsSummaryOperator.AddParameter("0", clsROperatorParameter:=clsAdjustNAOperator, iPosition:=0) - clsSummaryOperator.AddParameter("2", clsRFunctionParameter:=clsSummarise, iPosition:=2) - clsSummaryOperator.bBrackets = False + clsComparisonSummariesOperator.SetOperation("%>%") + clsComparisonSummariesOperator.AddParameter("0", clsROperatorParameter:=clsAdjustNAOperator, iPosition:=0) + clsComparisonSummariesOperator.AddParameter("2", clsRFunctionParameter:=clsComparisonSummariesSummarise, iPosition:=2) + clsComparisonSummariesOperator.bBrackets = False - clsSummaryGroupBy.SetPackageName("dplyr") - clsSummaryGroupBy.SetRCommand("group_by") + clsComparisonSummariesGroupBy.SetPackageName("dplyr") + clsComparisonSummariesGroupBy.SetRCommand("group_by") - clsSummarise.SetPackageName("dplyr") - clsSummarise.SetRCommand("summarise") + clsComparisonSummariesSummarise.SetPackageName("dplyr") + clsComparisonSummariesSummarise.SetRCommand("summarise") clsNComparison.SetPackageName("dplyr") clsNComparison.SetRCommand("n") @@ -422,7 +451,6 @@ Public Class dlgTimeSeriesPlot clsGgplotOperator.AddParameter("ggplot", clsRFunctionParameter:=clsGgplotFunction, iPosition:=0) clsGgplotOperator.AddParameter(strGeomLineParameterName, clsRFunctionParameter:=clsGeomLine, iPosition:=1) clsGgplotOperator.AddParameter(clsGeomPointParameter) - clsGgplotOperator.AddParameter(strGeomHLineParameterName, clsRFunctionParameter:=clsGeomHLine, iPosition:=3) clsGgplotFunction.SetPackageName("ggplot2") clsGgplotFunction.SetRCommand("ggplot") @@ -450,11 +478,17 @@ Public Class dlgTimeSeriesPlot clsGeomHLineAes.AddParameter("yintercept", "mean", iPosition:=0) clsGeomHLineAes.AddParameter("colour", strName, iPosition:=1) + clsGeomSmooth.SetPackageName("ggplot2") + clsGeomSmooth.SetRCommand("geom_smooth") + clsGeomSmooth.AddParameter("data", clsROperatorParameter:=clsStackOperator, iPosition:=0) + clsGeomSmooth.AddParameter("method", Chr(34) & "lm" & Chr(34), iPosition:=5) + clsGeomSmooth.AddParameter("se", "FALSE", iPosition:=7) + ' Comparison summaries clsComparisonGeomText.SetPackageName("ggplot2") clsComparisonGeomText.SetRCommand("geom_text") - clsComparisonGeomText.AddParameter("data", clsROperatorParameter:=clsSummaryOperator, iPosition:=0) + clsComparisonGeomText.AddParameter("data", clsROperatorParameter:=clsComparisonSummariesOperator, iPosition:=0) clsComparisonGeomText.AddParameter("mapping", clsRFunctionParameter:=clsComparisonGeomTextAes, iPosition:=1) clsComparisonGeomText.AddParameter("x", "-Inf", iPosition:=3) clsComparisonGeomText.AddParameter("y", "Inf", iPosition:=4) @@ -535,7 +569,7 @@ Public Class dlgTimeSeriesPlot clsReferenceGeomText.SetPackageName("ggplot2") clsReferenceGeomText.SetRCommand("geom_text") clsReferenceGeomText.AddParameter("data", clsRFunctionParameter:=clsReferenceFilter, iPosition:=0) - clsReferenceGeomText.AddParameter("mapping", clsRFunctionParameter:=clsComparisonGeomTextAes, iPosition:=1) + clsReferenceGeomText.AddParameter("mapping", clsRFunctionParameter:=clsReferenceGeomTextAes, iPosition:=1) clsReferenceGeomText.AddParameter("x", "-Inf", iPosition:=3) clsReferenceGeomText.AddParameter("y", "Inf", iPosition:=4) clsReferenceGeomText.AddParameter("hjust", "0", iPosition:=5) @@ -560,15 +594,15 @@ Public Class dlgTimeSeriesPlot clsPasteMean.SetRCommand("paste") clsPasteMean.AddParameter("0", Chr(34) & "mean" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) - clsPasteMean.AddParameter("1", "mean", iPosition:=1, bIncludeArgumentName:=False) + clsPasteMean.AddParameter("1", clsRFunctionParameter:=clsSignifMean, iPosition:=1, bIncludeArgumentName:=False) clsSignifMean.SetRCommand("signif") clsSignifMean.AddParameter("x", "mean", iPosition:=0) - clsSignifMean.AddParameter("digits", "2", iPosition:=1) + clsSignifMean.AddParameter("digits", "3", iPosition:=1) clsPasteSd.SetRCommand("paste") clsPasteSd.AddParameter("0", Chr(34) & "sd" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) - clsPasteSd.AddParameter("1", "sd", iPosition:=1, bIncludeArgumentName:=False) + clsPasteSd.AddParameter("1", clsRFunctionParameter:=clsRoundSd, iPosition:=1, bIncludeArgumentName:=False) clsRoundSd.SetRCommand("round") clsRoundSd.AddParameter("x", "sd", iPosition:=0) @@ -576,7 +610,7 @@ Public Class dlgTimeSeriesPlot clsPasteSlope.SetRCommand("paste") clsPasteSlope.AddParameter("0", Chr(34) & "slope" & Chr(34), iPosition:=0, bIncludeArgumentName:=False) - clsPasteSlope.AddParameter("1", "slope", iPosition:=1, bIncludeArgumentName:=False) + clsPasteSlope.AddParameter("1", clsRFunctionParameter:=clsSignifSlope, iPosition:=1, bIncludeArgumentName:=False) clsSignifSlope.SetRCommand("signif") clsSignifSlope.AddParameter("x", "slope", iPosition:=0) @@ -585,7 +619,7 @@ Public Class dlgTimeSeriesPlot clsEstimatesGeomText.SetPackageName("ggplot2") clsEstimatesGeomText.SetRCommand("geom_text") clsEstimatesGeomText.AddParameter("data", clsRFunctionParameter:=clsEstimatesFilter, iPosition:=0) - clsEstimatesGeomText.AddParameter("mapping", clsRFunctionParameter:=clsComparisonGeomTextAes, iPosition:=1) + clsEstimatesGeomText.AddParameter("mapping", clsRFunctionParameter:=clsEstimatesGeomTextAes, iPosition:=1) clsEstimatesGeomText.AddParameter("x", "Inf", iPosition:=3) clsEstimatesGeomText.AddParameter("y", "-Inf", iPosition:=4) clsEstimatesGeomText.AddParameter("hjust", "1", iPosition:=5) @@ -648,8 +682,8 @@ Public Class dlgTimeSeriesPlot ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsRSd, New RParameter("sim", 1), iAdditionalPairNo:=8) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsKge, New RParameter("sim", 1), iAdditionalPairNo:=9) ucrReceiverFacetBy.AddAdditionalCodeParameterPair(clsFacetOperator, New RParameter("1", 1), iAdditionalPairNo:=1) - ucrReceiverFacetBy.AddAdditionalCodeParameterPair(clsSummaryGroupBy, New RParameter("0", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) - ucrReceiverTime.AddAdditionalCodeParameterPair(clsIndividualSummariesSummarise, New RParameter("x", 1), iAdditionalPairNo:=1) + ucrReceiverFacetBy.AddAdditionalCodeParameterPair(clsComparisonSummariesGroupBy, New RParameter("0", 0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=2) + ucrReceiverTime.AddAdditionalCodeParameterPair(clsSlope, New RParameter("x", 1), iAdditionalPairNo:=1) ucrSelectorTimeSeriesPlots.SetRCode(clsAdjustNAOperator, bReset) ucrReceiverReference.SetRCode(clsIsNaReference, bReset) @@ -659,6 +693,8 @@ Public Class dlgTimeSeriesPlot ucrChkNAValues.SetRCode(clsAdjustNAOperator, bReset) ucrChkIncludePoints.SetRCode(clsGgplotOperator, bReset) ucrChkIncludeMeanLines.SetRCode(clsGgplotOperator, bReset) + ucrChkIncludeLineOfBestFit.SetRCode(clsGgplotOperator, bReset) + ucrChkWithSE.SetRCode(clsGeomSmooth, bReset) ucrSavePlot.SetRCode(clsGgplotOperator, bReset) SetDataFrameAssignTo() @@ -685,12 +721,12 @@ Public Class dlgTimeSeriesPlot End If clsStackOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_stack") clsIndividualSummariesOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_individual") - clsSummaryOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_comparison") + clsComparisonSummariesOperator.SetAssignTo(ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text & "_comparison") Else clsAdjustNAOperator.RemoveAssignTo() clsStackOperator.RemoveAssignTo() clsIndividualSummariesOperator.RemoveAssignTo() - clsSummaryOperator.RemoveAssignTo() + clsComparisonSummariesOperator.RemoveAssignTo() End If End Sub @@ -705,10 +741,12 @@ Public Class dlgTimeSeriesPlot clsAdjustNAMutate.RemoveParameterByName(strEstimates) strEstimates = "" clsEstimatesFilter.RemoveParameterByName("1") + clsEstimatesPasteLabel.RemoveParameterByName("0") Else strEstimates = ucrReceiverEstimates.GetVariableNames(False) clsAdjustNAMutate.AddParameter(strEstimates, clsRFunctionParameter:=clsIfElseEstimates, iPosition:=1) - clsEstimatesFilter.AddParameter("1", strValue & "==" & ucrReceiverEstimates.GetVariableNames(True), iPosition:=1) + clsEstimatesFilter.AddParameter("1", strName & "==" & ucrReceiverEstimates.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) + clsEstimatesPasteLabel.AddParameter("0", Chr(34) & strEstimates & Chr(34), iPosition:=0, bIncludeArgumentName:=False) End If End Sub @@ -719,10 +757,12 @@ Public Class dlgTimeSeriesPlot clsAdjustNAMutate.RemoveParameterByName(strReference) strReference = "" clsReferenceFilter.RemoveParameterByName("1") + clsReferencePasteLabel.RemoveParameterByName("0") Else strReference = ucrReceiverReference.GetVariableNames(False) clsAdjustNAMutate.AddParameter(strReference, clsRFunctionParameter:=clsIfElseReference, iPosition:=0) - clsReferenceFilter.AddParameter("1", strValue & "==" & ucrReceiverReference.GetVariableNames(True), iPosition:=1) + clsReferenceFilter.AddParameter("1", strName & "==" & ucrReceiverReference.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) + clsReferencePasteLabel.AddParameter("0", Chr(34) & strReference & Chr(34), iPosition:=0, bIncludeArgumentName:=False) End If End Sub @@ -745,14 +785,14 @@ Public Class dlgTimeSeriesPlot clsGgplotOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetFunction, iPosition:=30) End If If ucrReceiverFacetBy.IsEmpty Then - clsSummaryOperator.RemoveParameterByName("1") + clsComparisonSummariesOperator.RemoveParameterByName("1") Else - clsSummaryOperator.AddParameter("1", clsRFunctionParameter:=clsSummaryGroupBy, iPosition:=1) + clsComparisonSummariesOperator.AddParameter("1", clsRFunctionParameter:=clsComparisonSummariesGroupBy, iPosition:=1) End If End Sub Private Sub cmdSummaries_Click(sender As Object, e As EventArgs) Handles cmdSummaries.Click - sdgTimeSeries.SetRCode(clsNewSummarise:=clsSummarise, dctNewSummaries:=dctComparisonSummaries, clsNewGgplotOperator:=clsGgplotOperator, clsNewGeomText:=clsComparisonGeomText, clsNewPasteLabel:=clsComparisonPasteLabel, bReset:=bResetSubdialog) + sdgTimeSeries.SetRCode(clsNewComparisonSummariesSummarise:=clsComparisonSummariesSummarise, dctNewComparisonSummaries:=dctComparisonSummaries, clsNewIndividualSummariesSummarise:=clsIndividualSummariesSummarise, dctNewIndividualSummaries:=dctIndividualSummaries, clsNewGgplotOperator:=clsGgplotOperator, clsNewComparisonGeomText:=clsComparisonGeomText, clsNewReferenceGeomText:=clsReferenceGeomText, clsNewEstimatesGeomText:=clsEstimatesGeomText, clsNewComparisonPasteLabel:=clsComparisonPasteLabel, clsNewReferencePasteLabel:=clsReferencePasteLabel, clsNewEstimatesPasteLabel:=clsEstimatesPasteLabel, bReset:=bResetSubdialog) sdgTimeSeries.ShowDialog() bResetSubdialog = False End Sub diff --git a/instat/sdgTimeSeries.Designer.vb b/instat/sdgTimeSeries.Designer.vb index 2e94d32078d..c9a6060349f 100644 --- a/instat/sdgTimeSeries.Designer.vb +++ b/instat/sdgTimeSeries.Designer.vb @@ -44,7 +44,7 @@ Partial Class sdgTimeSeries Me.ucrInputPositionEstimates = New instat.ucrInputComboBox() Me.lblPositionEstimates = New System.Windows.Forms.Label() Me.grpIndividualSummaries = New System.Windows.Forms.GroupBox() - Me.ucrChkTrend = New instat.ucrCheck() + Me.ucrChkSlopeIndividual = New instat.ucrCheck() Me.ucrChkSdIndividual = New instat.ucrCheck() Me.ucrChkMeanIndividual = New instat.ucrCheck() Me.ucrChkNIndividual = New instat.ucrCheck() @@ -260,7 +260,7 @@ Partial Class sdgTimeSeries ' 'grpIndividualSummaries ' - Me.grpIndividualSummaries.Controls.Add(Me.ucrChkTrend) + Me.grpIndividualSummaries.Controls.Add(Me.ucrChkSlopeIndividual) Me.grpIndividualSummaries.Controls.Add(Me.ucrChkSdIndividual) Me.grpIndividualSummaries.Controls.Add(Me.ucrChkMeanIndividual) Me.grpIndividualSummaries.Controls.Add(Me.ucrChkNIndividual) @@ -271,13 +271,13 @@ Partial Class sdgTimeSeries Me.grpIndividualSummaries.TabStop = False Me.grpIndividualSummaries.Text = "Individual Summaries" ' - 'ucrChkTrend + 'ucrChkSlopeIndividual ' - Me.ucrChkTrend.Checked = False - Me.ucrChkTrend.Location = New System.Drawing.Point(224, 29) - Me.ucrChkTrend.Name = "ucrChkTrend" - Me.ucrChkTrend.Size = New System.Drawing.Size(60, 20) - Me.ucrChkTrend.TabIndex = 6 + Me.ucrChkSlopeIndividual.Checked = False + Me.ucrChkSlopeIndividual.Location = New System.Drawing.Point(224, 29) + Me.ucrChkSlopeIndividual.Name = "ucrChkSlopeIndividual" + Me.ucrChkSlopeIndividual.Size = New System.Drawing.Size(60, 20) + Me.ucrChkSlopeIndividual.TabIndex = 6 ' 'ucrChkSdIndividual ' @@ -357,7 +357,7 @@ Partial Class sdgTimeSeries Friend WithEvents ucrInputPositionEstimates As ucrInputComboBox Friend WithEvents lblPositionEstimates As Label Friend WithEvents grpIndividualSummaries As GroupBox - Friend WithEvents ucrChkTrend As ucrCheck + Friend WithEvents ucrChkSlopeIndividual As ucrCheck Friend WithEvents ucrChkSdIndividual As ucrCheck Friend WithEvents ucrChkMeanIndividual As ucrCheck Friend WithEvents ucrChkNIndividual As ucrCheck diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb index 0f9172ce7ee..90bb6d21454 100644 --- a/instat/sdgTimeSeries.vb +++ b/instat/sdgTimeSeries.vb @@ -20,20 +20,35 @@ Public Class sdgTimeSeries Private bRCodeSet As Boolean = False Private bControlsInitialised As Boolean = False - Private strGeomTextParameterName As String = "geom_text" + Private strGeomTextReferenceParameterName As String = "reference_geom_text" + Private strGeomTextEstimatesParameterName As String = "estimates_geom_text" + Private strGeomTextComparisonParameterName As String = "comparison_geom_text" Private strTopLeft As String = "Top Left" Private strTopRight As String = "Top Right" Private strBottomLeft As String = "Bottom Left" Private strBottomRight As String = "Bottom Right" - Private clsSummarise As RFunction + Private clsComparisonSummariesSummarise As RFunction + Private clsIndividualSummariesSummarise As RFunction Private clsGgplotOperator As ROperator - Private clsGeomText As RFunction - Private clsPasteLabel As RFunction - - Private dctSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) + Private clsComparisonGeomText As RFunction + Private clsReferenceGeomText As RFunction + Private clsEstimatesGeomText As RFunction + + Private clsComparisonPasteLabel As RFunction + Private clsReferencePasteLabel As RFunction + Private clsEstimatesPasteLabel As RFunction + + ' A dictionary of the comparison/individual summary functions above. + ' The key is the summary name in lower case e.g. "bias" + ' The value is a tuple of two RFunctions. + ' Item1 is the summary function. + ' Item2 is the paste function containing the summary. + ' This dictionary is created to avoid passing all the RFunctions to the sub dialog individually. + Private dctComparisonSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) + Private dctIndividualSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) Private Sub sdgTimeSeries_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -43,7 +58,30 @@ Public Class sdgTimeSeries ucrPnlSummaries.AddRadioButton(rdoComparison) ucrPnlSummaries.AddRadioButton(rdoIndividual) - ucrPnlSummaries.AddToLinkedControls(ucrInputPositionEstimates, {rdoComparison}, bNewLinkedAddRemoveParameter:=False, bNewLinkedHideIfParameterMissing:=True) + ucrPnlSummaries.AddParameterPresentCondition(rdoIndividual, strGeomTextReferenceParameterName) + ucrPnlSummaries.AddParameterPresentCondition(rdoComparison, strGeomTextReferenceParameterName, bNewIsPositive:=False) + + ucrPnlSummaries.AddToLinkedControls(ucrInputPositionEstimates, {rdoIndividual}, bNewLinkedAddRemoveParameter:=False, bNewLinkedHideIfParameterMissing:=True) + + ' Individual summaries + + ucrChkNIndividual.SetText("N") + ucrChkNIndividual.AddParameterPresentCondition(True, "n") + ucrChkNIndividual.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) + + ucrChkMeanIndividual.SetText("Mean") + ucrChkMeanIndividual.AddParameterPresentCondition(True, "n") + ucrChkMeanIndividual.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) + + ucrChkSdIndividual.SetText("Sd") + ucrChkSdIndividual.AddParameterPresentCondition(True, "n") + ucrChkSdIndividual.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) + + ucrChkSlopeIndividual.SetText("Slope") + ucrChkSlopeIndividual.AddParameterPresentCondition(True, "n") + ucrChkSlopeIndividual.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) + + ' Comparison summaries ucrChkN.SetText("N") ucrChkN.AddParameterPresentCondition(True, "n") @@ -88,7 +126,7 @@ Public Class sdgTimeSeries ucrInputPositionReference.AddParameterValuesCondition(strBottomRight, "x", "Inf") ucrInputPositionReference.AddParameterValuesCondition(strBottomRight, "y", "-Inf") - ucrInputPositionEstimates.SetLinkedDisplayControl(lblPositionReference) + ucrInputPositionEstimates.SetLinkedDisplayControl(lblPositionEstimates) ucrInputPositionEstimates.SetItems({"Top Left", "Top Right", "Bottom Left", "Bottom Right"}) ucrInputPositionEstimates.SetDropDownStyleAsNonEditable() ucrInputPositionEstimates.AddParameterValuesCondition(strTopLeft, "x", "-Inf") @@ -106,140 +144,242 @@ Public Class sdgTimeSeries ucrInputFontSize.SetValidationTypeAsNumeric() ucrInputFontSize.AddQuotesIfUnrecognised = False + bControlsInitialised = True End Sub - Public Sub SetRCode(clsNewSummarise As RFunction, dctNewSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)), clsNewGgplotOperator As ROperator, clsNewGeomText As RFunction, clsNewPasteLabel As RFunction, Optional bReset As Boolean = False) + Public Sub SetRCode(clsNewComparisonSummariesSummarise As RFunction, dctNewComparisonSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)), clsNewIndividualSummariesSummarise As RFunction, dctNewIndividualSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)), clsNewGgplotOperator As ROperator, clsNewComparisonGeomText As RFunction, clsNewReferenceGeomText As RFunction, clsNewEstimatesGeomText As RFunction, clsNewComparisonPasteLabel As RFunction, clsNewReferencePasteLabel As RFunction, clsNewEstimatesPasteLabel As RFunction, Optional bReset As Boolean = False) bRCodeSet = False If Not bControlsInitialised Then InitialiseControls() End If - clsSummarise = clsNewSummarise - dctSummaries = dctNewSummaries + clsComparisonSummariesSummarise = clsNewComparisonSummariesSummarise + dctComparisonSummaries = dctNewComparisonSummaries + clsIndividualSummariesSummarise = clsNewIndividualSummariesSummarise + dctIndividualSummaries = dctNewIndividualSummaries + clsGgplotOperator = clsNewGgplotOperator - clsGeomText = clsNewGeomText - clsPasteLabel = clsNewPasteLabel - - ucrChkN.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - ucrChkCor.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - ucrChkPBias.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - ucrChkRSd.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - ucrChkMe.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - ucrChkMae.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - ucrChkRmse.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - ucrChkKge.SetRCode(clsSummarise, bReset, bCloneIfNeeded:=True) - - ucrInputPositionReference.SetRCode(clsGeomText, bReset, bCloneIfNeeded:=True) - ucrInputSeparator.SetRCode(clsPasteLabel, bReset, bCloneIfNeeded:=True) - ucrInputFontSize.SetRCode(clsGeomText, bReset, bCloneIfNeeded:=True) + clsComparisonGeomText = clsNewComparisonGeomText + clsReferenceGeomText = clsNewReferenceGeomText + clsEstimatesGeomText = clsNewEstimatesGeomText + + clsComparisonPasteLabel = clsNewComparisonPasteLabel + clsReferencePasteLabel = clsNewReferencePasteLabel + clsEstimatesPasteLabel = clsNewEstimatesPasteLabel + + ucrInputSeparator.AddAdditionalCodeParameterPair(clsReferencePasteLabel, New RParameter("sep", iNewPosition:=8), iAdditionalPairNo:=1) + ucrInputSeparator.AddAdditionalCodeParameterPair(clsEstimatesPasteLabel, New RParameter("sep", iNewPosition:=8), iAdditionalPairNo:=2) + + ucrInputFontSize.AddAdditionalCodeParameterPair(clsReferenceGeomText, New RParameter("size", iNewPosition:=8), iAdditionalPairNo:=1) + ucrInputFontSize.AddAdditionalCodeParameterPair(clsEstimatesGeomText, New RParameter("size", iNewPosition:=8), iAdditionalPairNo:=2) + + ucrPnlSummaries.SetRCode(clsGgplotOperator, bReset, bCloneIfNeeded:=True) + + ucrChkN.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkCor.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkPBias.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkRSd.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkMe.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkMae.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkRmse.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkKge.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) + + ucrChkNIndividual.SetRCode(clsIndividualSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkMeanIndividual.SetRCode(clsIndividualSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkSdIndividual.SetRCode(clsIndividualSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkSlopeIndividual.SetRCode(clsIndividualSummariesSummarise, bReset, bCloneIfNeeded:=True) + + ucrInputPositionReference.SetRCode(clsComparisonGeomText, bReset, bCloneIfNeeded:=True) + ucrInputPositionEstimates.SetRCode(clsEstimatesGeomText, bReset, bCloneIfNeeded:=True) + + ucrInputSeparator.SetRCode(clsComparisonPasteLabel, bReset, bCloneIfNeeded:=True) + ucrInputFontSize.SetRCode(clsComparisonGeomText, bReset, bCloneIfNeeded:=True) bRCodeSet = True - CheckBoxesCheck() - TextPosition() + ComparisonCheckBoxesCheck() + IndividualCheckBoxesCheck() + TextPosition(clsComparisonGeomText, ucrInputPositionReference.GetText()) + TextPosition(clsReferenceGeomText, ucrInputPositionReference.GetText()) + TextPosition(clsEstimatesGeomText, ucrInputPositionEstimates.GetText()) + SummariesDisplay() + End Sub + + Private Sub ucrChkIndividual_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkNIndividual.ControlValueChanged, ucrChkMeanIndividual.ControlValueChanged, ucrChkSdIndividual.ControlValueChanged, ucrChkSlopeIndividual.ControlValueChanged + IndividualCheckBoxesCheck() + End Sub + + Private Sub IndividualCheckBoxesCheck() + If bRCodeSet Then + If rdoComparison.Checked OrElse (Not ucrChkNIndividual.Checked AndAlso Not ucrChkMeanIndividual.Checked AndAlso Not ucrChkSdIndividual.Checked AndAlso Not ucrChkSlopeIndividual.Checked) Then + clsGgplotOperator.RemoveParameterByName(strGeomTextReferenceParameterName) + clsGgplotOperator.RemoveParameterByName(strGeomTextEstimatesParameterName) + Else + clsGgplotOperator.AddParameter(strGeomTextReferenceParameterName, clsRFunctionParameter:=clsReferenceGeomText, iPosition:=4) + clsGgplotOperator.AddParameter(strGeomTextEstimatesParameterName, clsRFunctionParameter:=clsEstimatesGeomText, iPosition:=5) + End If + End If End Sub - Private Sub ucrChk_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkN.ControlValueChanged, ucrChkCor.ControlValueChanged, ucrChkPBias.ControlValueChanged, ucrChkRSd.ControlValueChanged, ucrChkMe.ControlValueChanged, ucrChkMae.ControlValueChanged, ucrChkRmse.ControlValueChanged, ucrChkKge.ControlValueChanged - CheckBoxesCheck() + Private Sub ucrChkComparison_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkN.ControlValueChanged, ucrChkCor.ControlValueChanged, ucrChkPBias.ControlValueChanged, ucrChkRSd.ControlValueChanged, ucrChkMe.ControlValueChanged, ucrChkMae.ControlValueChanged, ucrChkRmse.ControlValueChanged, ucrChkKge.ControlValueChanged + ComparisonCheckBoxesCheck() End Sub - Private Sub CheckBoxesCheck() + Private Sub ComparisonCheckBoxesCheck() If bRCodeSet Then - If Not ucrChkN.Checked AndAlso Not ucrChkCor.Checked AndAlso Not ucrChkPBias.Checked AndAlso Not ucrChkRSd.Checked AndAlso Not ucrChkMe.Checked AndAlso Not ucrChkMae.Checked AndAlso Not ucrChkRmse.Checked AndAlso Not ucrChkKge.Checked Then - clsGgplotOperator.RemoveParameterByName(strGeomTextParameterName) + If rdoIndividual.Checked OrElse (Not ucrChkN.Checked AndAlso Not ucrChkCor.Checked AndAlso Not ucrChkPBias.Checked AndAlso Not ucrChkRSd.Checked AndAlso Not ucrChkMe.Checked AndAlso Not ucrChkMae.Checked AndAlso Not ucrChkRmse.Checked AndAlso Not ucrChkKge.Checked) Then + clsGgplotOperator.RemoveParameterByName(strGeomTextComparisonParameterName) Else - clsGgplotOperator.AddParameter(strGeomTextParameterName, clsRFunctionParameter:=clsGeomText, iPosition:=4) + clsGgplotOperator.AddParameter(strGeomTextComparisonParameterName, clsRFunctionParameter:=clsComparisonGeomText, iPosition:=4) End If End If End Sub Private Sub ucrChkN_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkN.ControlValueChanged If ucrChkN.Checked Then - clsSummarise.AddParameter("n", clsRFunctionParameter:=dctSummaries("n").Item1, iPosition:=0) - clsPasteLabel.AddParameter("n", clsRFunctionParameter:=dctSummaries("n").Item2, iPosition:=0) + clsComparisonSummariesSummarise.AddParameter("n", clsRFunctionParameter:=dctComparisonSummaries("n").Item1, iPosition:=0) + clsComparisonPasteLabel.AddParameter("n", clsRFunctionParameter:=dctComparisonSummaries("n").Item2, iPosition:=0) Else - clsSummarise.RemoveParameterByName("n") - clsPasteLabel.RemoveParameterByName("n") + clsComparisonSummariesSummarise.RemoveParameterByName("n") + clsComparisonPasteLabel.RemoveParameterByName("n") End If End Sub Private Sub ucrChkCor_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkCor.ControlValueChanged If ucrChkCor.Checked Then - clsSummarise.AddParameter("cor", clsRFunctionParameter:=dctSummaries("cor").Item1, iPosition:=1) - clsPasteLabel.AddParameter("cor", clsRFunctionParameter:=dctSummaries("cor").Item2, iPosition:=1) + clsComparisonSummariesSummarise.AddParameter("cor", clsRFunctionParameter:=dctComparisonSummaries("cor").Item1, iPosition:=1) + clsComparisonPasteLabel.AddParameter("cor", clsRFunctionParameter:=dctComparisonSummaries("cor").Item2, iPosition:=1) Else - clsSummarise.RemoveParameterByName("cor") - clsPasteLabel.RemoveParameterByName("cor") + clsComparisonSummariesSummarise.RemoveParameterByName("cor") + clsComparisonPasteLabel.RemoveParameterByName("cor") End If End Sub Private Sub ucrChkPBias_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPBias.ControlValueChanged If ucrChkPBias.Checked Then - clsSummarise.AddParameter("pbias", clsRFunctionParameter:=dctSummaries("pbias").Item1, iPosition:=2) - clsPasteLabel.AddParameter("pbias", clsRFunctionParameter:=dctSummaries("pbias").Item2, iPosition:=2) + clsComparisonSummariesSummarise.AddParameter("pbias", clsRFunctionParameter:=dctComparisonSummaries("pbias").Item1, iPosition:=2) + clsComparisonPasteLabel.AddParameter("pbias", clsRFunctionParameter:=dctComparisonSummaries("pbias").Item2, iPosition:=2) Else - clsSummarise.RemoveParameterByName("pbias") - clsPasteLabel.RemoveParameterByName("pbias") + clsComparisonSummariesSummarise.RemoveParameterByName("pbias") + clsComparisonPasteLabel.RemoveParameterByName("pbias") End If End Sub Private Sub ucrChkRSd_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkRSd.ControlValueChanged If ucrChkRSd.Checked Then - clsSummarise.AddParameter("rsd", clsRFunctionParameter:=dctSummaries("rsd").Item1, iPosition:=3) - clsPasteLabel.AddParameter("rsd", clsRFunctionParameter:=dctSummaries("rsd").Item2, iPosition:=3) + clsComparisonSummariesSummarise.AddParameter("rsd", clsRFunctionParameter:=dctComparisonSummaries("rsd").Item1, iPosition:=3) + clsComparisonPasteLabel.AddParameter("rsd", clsRFunctionParameter:=dctComparisonSummaries("rsd").Item2, iPosition:=3) Else - clsSummarise.RemoveParameterByName("rsd") - clsPasteLabel.RemoveParameterByName("rsd") + clsComparisonSummariesSummarise.RemoveParameterByName("rsd") + clsComparisonPasteLabel.RemoveParameterByName("rsd") End If End Sub Private Sub ucrChkMe_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMe.ControlValueChanged If ucrChkMe.Checked Then - clsSummarise.AddParameter("me", clsRFunctionParameter:=dctSummaries("me").Item1, iPosition:=4) - clsPasteLabel.AddParameter("me", clsRFunctionParameter:=dctSummaries("me").Item2, iPosition:=4) + clsComparisonSummariesSummarise.AddParameter("me", clsRFunctionParameter:=dctComparisonSummaries("me").Item1, iPosition:=4) + clsComparisonPasteLabel.AddParameter("me", clsRFunctionParameter:=dctComparisonSummaries("me").Item2, iPosition:=4) Else - clsSummarise.RemoveParameterByName("me") - clsPasteLabel.RemoveParameterByName("me") + clsComparisonSummariesSummarise.RemoveParameterByName("me") + clsComparisonPasteLabel.RemoveParameterByName("me") End If End Sub Private Sub ucrChkMae_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMae.ControlValueChanged If ucrChkMae.Checked Then - clsSummarise.AddParameter("mae", clsRFunctionParameter:=dctSummaries("mae").Item1, iPosition:=5) - clsPasteLabel.AddParameter("mae", clsRFunctionParameter:=dctSummaries("mae").Item2, iPosition:=5) + clsComparisonSummariesSummarise.AddParameter("mae", clsRFunctionParameter:=dctComparisonSummaries("mae").Item1, iPosition:=5) + clsComparisonPasteLabel.AddParameter("mae", clsRFunctionParameter:=dctComparisonSummaries("mae").Item2, iPosition:=5) Else - clsSummarise.RemoveParameterByName("mae") - clsPasteLabel.RemoveParameterByName("mae") + clsComparisonSummariesSummarise.RemoveParameterByName("mae") + clsComparisonPasteLabel.RemoveParameterByName("mae") End If End Sub Private Sub ucrChkRmse_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkRmse.ControlValueChanged If ucrChkRmse.Checked Then - clsSummarise.AddParameter("rmse", clsRFunctionParameter:=dctSummaries("rmse").Item1, iPosition:=6) - clsPasteLabel.AddParameter("rmse", clsRFunctionParameter:=dctSummaries("rmse").Item2, iPosition:=6) + clsComparisonSummariesSummarise.AddParameter("rmse", clsRFunctionParameter:=dctComparisonSummaries("rmse").Item1, iPosition:=6) + clsComparisonPasteLabel.AddParameter("rmse", clsRFunctionParameter:=dctComparisonSummaries("rmse").Item2, iPosition:=6) Else - clsSummarise.RemoveParameterByName("rmse") - clsPasteLabel.RemoveParameterByName("rmse") + clsComparisonSummariesSummarise.RemoveParameterByName("rmse") + clsComparisonPasteLabel.RemoveParameterByName("rmse") End If End Sub Private Sub ucrChkKge_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkKge.ControlValueChanged If ucrChkKge.Checked Then - clsSummarise.AddParameter("kge", clsRFunctionParameter:=dctSummaries("kge").Item1, iPosition:=7) - clsPasteLabel.AddParameter("kge", clsRFunctionParameter:=dctSummaries("kge").Item2, iPosition:=7) + clsComparisonSummariesSummarise.AddParameter("kge", clsRFunctionParameter:=dctComparisonSummaries("kge").Item1, iPosition:=7) + clsComparisonPasteLabel.AddParameter("kge", clsRFunctionParameter:=dctComparisonSummaries("kge").Item2, iPosition:=7) + Else + clsComparisonSummariesSummarise.RemoveParameterByName("kge") + clsComparisonPasteLabel.RemoveParameterByName("kge") + End If + End Sub + + Private Sub ucrChkNIndividual_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkNIndividual.ControlValueChanged + If ucrChkNIndividual.Checked Then + clsIndividualSummariesSummarise.AddParameter("n", clsRFunctionParameter:=dctIndividualSummaries("n").Item1, iPosition:=0) + clsReferencePasteLabel.AddParameter("n", clsRFunctionParameter:=dctIndividualSummaries("n").Item2, iPosition:=1) + clsEstimatesPasteLabel.AddParameter("n", clsRFunctionParameter:=dctIndividualSummaries("n").Item2, iPosition:=1) + Else + clsIndividualSummariesSummarise.RemoveParameterByName("n") + clsReferencePasteLabel.RemoveParameterByName("n") + clsEstimatesPasteLabel.RemoveParameterByName("n") + End If + End Sub + + Private Sub ucrChkMeanIndividual_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkMeanIndividual.ControlValueChanged + If ucrChkMeanIndividual.Checked Then + clsIndividualSummariesSummarise.AddParameter("mean", clsRFunctionParameter:=dctIndividualSummaries("mean").Item1, iPosition:=1) + clsReferencePasteLabel.AddParameter("mean", clsRFunctionParameter:=dctIndividualSummaries("mean").Item2, iPosition:=2) + clsEstimatesPasteLabel.AddParameter("mean", clsRFunctionParameter:=dctIndividualSummaries("mean").Item2, iPosition:=2) + Else + clsIndividualSummariesSummarise.RemoveParameterByName("mean") + clsReferencePasteLabel.RemoveParameterByName("mean") + clsEstimatesPasteLabel.RemoveParameterByName("mean") + End If + End Sub + + Private Sub ucrChkSdIndividual_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSdIndividual.ControlValueChanged + If ucrChkSdIndividual.Checked Then + clsIndividualSummariesSummarise.AddParameter("sd", clsRFunctionParameter:=dctIndividualSummaries("sd").Item1, iPosition:=2) + clsReferencePasteLabel.AddParameter("sd", clsRFunctionParameter:=dctIndividualSummaries("sd").Item2, iPosition:=3) + clsEstimatesPasteLabel.AddParameter("sd", clsRFunctionParameter:=dctIndividualSummaries("sd").Item2, iPosition:=3) Else - clsSummarise.RemoveParameterByName("kge") - clsPasteLabel.RemoveParameterByName("kge") + clsIndividualSummariesSummarise.RemoveParameterByName("sd") + clsReferencePasteLabel.RemoveParameterByName("sd") + clsEstimatesPasteLabel.RemoveParameterByName("sd") + End If + End Sub + + Private Sub ucrChkSlopeIndividual_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSlopeIndividual.ControlValueChanged + If ucrChkSlopeIndividual.Checked Then + clsIndividualSummariesSummarise.AddParameter("slope", clsRFunctionParameter:=dctIndividualSummaries("slope").Item1, iPosition:=3) + clsReferencePasteLabel.AddParameter("slope", clsRFunctionParameter:=dctIndividualSummaries("slope").Item2, iPosition:=4) + clsEstimatesPasteLabel.AddParameter("slope", clsRFunctionParameter:=dctIndividualSummaries("slope").Item2, iPosition:=4) + Else + clsIndividualSummariesSummarise.RemoveParameterByName("slope") + clsReferencePasteLabel.RemoveParameterByName("slope") + clsEstimatesPasteLabel.RemoveParameterByName("slope") End If End Sub Private Sub ucrInputPosition_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPositionReference.ControlValueChanged - TextPosition() + TextPosition(clsComparisonGeomText, ucrInputPositionReference.GetText()) + TextPosition(clsReferenceGeomText, ucrInputPositionReference.GetText()) + End Sub + + Private Sub ucrInputPositionEstimates_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPositionEstimates.ControlValueChanged + TextPosition(clsEstimatesGeomText, ucrInputPositionEstimates.GetText()) End Sub - Private Sub TextPosition() + ''' + ''' Sets the x, y, hjust and vjust parameter values in clsGeomText based on the position given in strPosition. + ''' + ''' The RFunction reprsenting the geom_text function to be updated. + ''' The position of the text for clsGeomText, usually coming from a textbox. Must be one of the four recognised positions. + Private Sub TextPosition(clsGeomText As RFunction, strPosition As String) If bRCodeSet Then - Select Case ucrInputPositionReference.GetText() + Select Case strPosition Case strTopLeft clsGeomText.AddParameter("x", "-Inf", iPosition:=3) clsGeomText.AddParameter("y", "Inf", iPosition:=4) @@ -273,10 +413,14 @@ Public Class sdgTimeSeries If rdoComparison.Checked Then grpComparisonSummaries.Visible = True grpIndividualSummaries.Visible = False + lblPositionReference.Text = "Position" ElseIf rdoIndividual.Checked Then grpComparisonSummaries.Visible = False grpIndividualSummaries.Visible = True + lblPositionReference.Text = "Position - Reference" End If + IndividualCheckBoxesCheck() + ComparisonCheckBoxesCheck() End If End Sub End Class \ No newline at end of file From 1c53fedab39edfefe3a0bba6934b03c36c88ef2f Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 24 Sep 2020 12:29:43 +0100 Subject: [PATCH 169/277] added colons and fixed setting R code of subdialog individual check boxes --- instat/dlgTimeSeriesPlot.Designer.vb | 54 ++++++++++++++-------------- instat/sdgTimeSeries.vb | 24 ++++++------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.Designer.vb b/instat/dlgTimeSeriesPlot.Designer.vb index dabdb098651..34fc5313fa0 100644 --- a/instat/dlgTimeSeriesPlot.Designer.vb +++ b/instat/dlgTimeSeriesPlot.Designer.vb @@ -27,18 +27,18 @@ Partial Class dlgTimeSeriesPlot Me.lblTime = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() Me.cmdSummaries = New System.Windows.Forms.Button() - Me.ucrSavePlot = New instat.ucrSave() Me.ucrChkIncludePoints = New instat.ucrCheck() Me.ucrChkIncludeMeanLines = New instat.ucrCheck() Me.ucrChkNAValues = New instat.ucrCheck() + Me.ucrChkIncludeLineOfBestFit = New instat.ucrCheck() + Me.ucrChkWithSE = New instat.ucrCheck() + Me.ucrSavePlot = New instat.ucrSave() Me.ucrReceiverFacetBy = New instat.ucrReceiverSingle() Me.ucrReceiverTime = New instat.ucrReceiverSingle() Me.ucrReceiverEstimates = New instat.ucrReceiverSingle() Me.ucrReceiverReference = New instat.ucrReceiverSingle() Me.ucrSelectorTimeSeriesPlots = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrChkIncludeLineOfBestFit = New instat.ucrCheck() - Me.ucrChkWithSE = New instat.ucrCheck() Me.SuspendLayout() ' 'lblReferenceValues @@ -86,14 +86,6 @@ Partial Class dlgTimeSeriesPlot Me.cmdSummaries.Text = "Summary Annotations" Me.cmdSummaries.UseVisualStyleBackColor = True ' - 'ucrSavePlot - ' - Me.ucrSavePlot.Location = New System.Drawing.Point(10, 385) - Me.ucrSavePlot.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSavePlot.Name = "ucrSavePlot" - Me.ucrSavePlot.Size = New System.Drawing.Size(403, 34) - Me.ucrSavePlot.TabIndex = 15 - ' 'ucrChkIncludePoints ' Me.ucrChkIncludePoints.Checked = False @@ -118,6 +110,30 @@ Partial Class dlgTimeSeriesPlot Me.ucrChkNAValues.Size = New System.Drawing.Size(272, 20) Me.ucrChkNAValues.TabIndex = 9 ' + 'ucrChkIncludeLineOfBestFit + ' + Me.ucrChkIncludeLineOfBestFit.Checked = False + Me.ucrChkIncludeLineOfBestFit.Location = New System.Drawing.Point(10, 327) + Me.ucrChkIncludeLineOfBestFit.Name = "ucrChkIncludeLineOfBestFit" + Me.ucrChkIncludeLineOfBestFit.Size = New System.Drawing.Size(147, 20) + Me.ucrChkIncludeLineOfBestFit.TabIndex = 16 + ' + 'ucrChkWithSE + ' + Me.ucrChkWithSE.Checked = False + Me.ucrChkWithSE.Location = New System.Drawing.Point(163, 327) + Me.ucrChkWithSE.Name = "ucrChkWithSE" + Me.ucrChkWithSE.Size = New System.Drawing.Size(135, 20) + Me.ucrChkWithSE.TabIndex = 17 + ' + 'ucrSavePlot + ' + Me.ucrSavePlot.Location = New System.Drawing.Point(10, 385) + Me.ucrSavePlot.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSavePlot.Name = "ucrSavePlot" + Me.ucrSavePlot.Size = New System.Drawing.Size(272, 34) + Me.ucrSavePlot.TabIndex = 15 + ' 'ucrReceiverFacetBy ' Me.ucrReceiverFacetBy.frmParent = Me @@ -184,22 +200,6 @@ Partial Class dlgTimeSeriesPlot Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 14 ' - 'ucrChkIncludeLineOfBestFit - ' - Me.ucrChkIncludeLineOfBestFit.Checked = False - Me.ucrChkIncludeLineOfBestFit.Location = New System.Drawing.Point(10, 327) - Me.ucrChkIncludeLineOfBestFit.Name = "ucrChkIncludeLineOfBestFit" - Me.ucrChkIncludeLineOfBestFit.Size = New System.Drawing.Size(147, 20) - Me.ucrChkIncludeLineOfBestFit.TabIndex = 16 - ' - 'ucrChkWithSE - ' - Me.ucrChkWithSE.Checked = False - Me.ucrChkWithSE.Location = New System.Drawing.Point(163, 327) - Me.ucrChkWithSE.Name = "ucrChkWithSE" - Me.ucrChkWithSE.Size = New System.Drawing.Size(135, 20) - Me.ucrChkWithSE.TabIndex = 17 - ' 'dlgTimeSeriesPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb index 90bb6d21454..a6b7f4d0805 100644 --- a/instat/sdgTimeSeries.vb +++ b/instat/sdgTimeSeries.vb @@ -70,16 +70,16 @@ Public Class sdgTimeSeries ucrChkNIndividual.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) ucrChkMeanIndividual.SetText("Mean") - ucrChkMeanIndividual.AddParameterPresentCondition(True, "n") - ucrChkMeanIndividual.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) + ucrChkMeanIndividual.AddParameterPresentCondition(True, "mean") + ucrChkMeanIndividual.AddParameterPresentCondition(False, "mean", bNewIsPositive:=False) ucrChkSdIndividual.SetText("Sd") - ucrChkSdIndividual.AddParameterPresentCondition(True, "n") - ucrChkSdIndividual.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) + ucrChkSdIndividual.AddParameterPresentCondition(True, "sd") + ucrChkSdIndividual.AddParameterPresentCondition(False, "sd", bNewIsPositive:=False) ucrChkSlopeIndividual.SetText("Slope") - ucrChkSlopeIndividual.AddParameterPresentCondition(True, "n") - ucrChkSlopeIndividual.AddParameterPresentCondition(False, "n", bNewIsPositive:=False) + ucrChkSlopeIndividual.AddParameterPresentCondition(True, "slope") + ucrChkSlopeIndividual.AddParameterPresentCondition(False, "slope", bNewIsPositive:=False) ' Comparison summaries @@ -185,10 +185,10 @@ Public Class sdgTimeSeries ucrChkRmse.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) ucrChkKge.SetRCode(clsComparisonSummariesSummarise, bReset, bCloneIfNeeded:=True) - ucrChkNIndividual.SetRCode(clsIndividualSummariesSummarise, bReset, bCloneIfNeeded:=True) - ucrChkMeanIndividual.SetRCode(clsIndividualSummariesSummarise, bReset, bCloneIfNeeded:=True) - ucrChkSdIndividual.SetRCode(clsIndividualSummariesSummarise, bReset, bCloneIfNeeded:=True) - ucrChkSlopeIndividual.SetRCode(clsIndividualSummariesSummarise, bReset, bCloneIfNeeded:=True) + ucrChkNIndividual.SetRCode(clsReferencePasteLabel, bReset, bCloneIfNeeded:=True) + ucrChkMeanIndividual.SetRCode(clsReferencePasteLabel, bReset, bCloneIfNeeded:=True) + ucrChkSdIndividual.SetRCode(clsReferencePasteLabel, bReset, bCloneIfNeeded:=True) + ucrChkSlopeIndividual.SetRCode(clsReferencePasteLabel, bReset, bCloneIfNeeded:=True) ucrInputPositionReference.SetRCode(clsComparisonGeomText, bReset, bCloneIfNeeded:=True) ucrInputPositionEstimates.SetRCode(clsEstimatesGeomText, bReset, bCloneIfNeeded:=True) @@ -413,11 +413,11 @@ Public Class sdgTimeSeries If rdoComparison.Checked Then grpComparisonSummaries.Visible = True grpIndividualSummaries.Visible = False - lblPositionReference.Text = "Position" + lblPositionReference.Text = "Position:" ElseIf rdoIndividual.Checked Then grpComparisonSummaries.Visible = False grpIndividualSummaries.Visible = True - lblPositionReference.Text = "Position - Reference" + lblPositionReference.Text = "Position - Reference:" End If IndividualCheckBoxesCheck() ComparisonCheckBoxesCheck() From 7c2163719fed731fcbdcec0271f58393c080dc72 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 24 Sep 2020 12:51:23 +0100 Subject: [PATCH 170/277] included time receiver in testOK --- instat/dlgTimeSeriesPlot.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index e0af8262e5d..c1aacf404c7 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -701,7 +701,7 @@ Public Class dlgTimeSeriesPlot End Sub Private Sub TestOkEnabled() - If Not ucrReceiverEstimates.IsEmpty And Not ucrReceiverReference.IsEmpty AndAlso ucrSavePlot.IsComplete Then + If Not ucrReceiverEstimates.IsEmpty And Not ucrReceiverReference.IsEmpty And Not ucrReceiverTime.IsEmpty AndAlso ucrSavePlot.IsComplete Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -772,7 +772,7 @@ Public Class dlgTimeSeriesPlot TestOkEnabled() End Sub - Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlContentsChanged, ucrReceiverReference.ControlContentsChanged, ucrSavePlot.ControlContentsChanged + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlContentsChanged, ucrReceiverReference.ControlContentsChanged, ucrReceiverTime.ControlContentsChanged, ucrSavePlot.ControlContentsChanged TestOkEnabled() End Sub From 87e1bb704195eab52144dbc1e91f25866872b6b3 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 24 Sep 2020 14:27:29 +0100 Subject: [PATCH 171/277] fixed bug if size value is empty --- instat/dlgTimeSeriesPlot.vb | 6 +++--- instat/sdgTimeSeries.vb | 16 +++++++++++++++- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index c1aacf404c7..6254f0bd1dc 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -114,7 +114,7 @@ Public Class dlgTimeSeriesPlot ' The value is a tuple of two RFunctions. ' Item1 is the summary function. ' Item2 is the paste function containing the summary. - ' This dictionary is created to avoid passing all the RFunctions to the sub dialog individually. + ' These dictionary are created to avoid passing all the RFunctions to the sub dialog individually. Private dctComparisonSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) Private dctIndividualSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) @@ -735,7 +735,7 @@ Public Class dlgTimeSeriesPlot End Sub Private Sub ucrReceiverEstimates_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverEstimates.ControlValueChanged - ' This ensures clsAdjustNAMutate has the correct parameters. Unlike in most functions, in dplyr::mutate, the parameter name is the selected variable. + ' This ensures clsAdjustNAMutate has the correct parameters. Unlike in most functions, in our use of dplyr::mutate in this case, the parameter name is the selected variable. ' Storing and then removing strEstimates as a parameter ensures dplyr::mutate does not keep old parameters when the selected variable is changed. If ucrReceiverEstimates.IsEmpty Then clsAdjustNAMutate.RemoveParameterByName(strEstimates) @@ -751,7 +751,7 @@ Public Class dlgTimeSeriesPlot End Sub Private Sub ucrReceiverReference_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReference.ControlValueChanged - ' This ensures clsAdjustNAMutate has the correct parameters. Unlike in most functions, in dplyr::mutate, the parameter name is the selected variable. + ' This ensures clsAdjustNAMutate has the correct parameters. Unlike in most functions, in our use of dplyr::mutate in this case, the parameter name is the selected variable. ' Storing and then removing strReference as a parameter ensures dplyr::mutate does not keep old parameters when the selected variable is changed. If ucrReceiverReference.IsEmpty Then clsAdjustNAMutate.RemoveParameterByName(strReference) diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb index a6b7f4d0805..7cd78aa9c7c 100644 --- a/instat/sdgTimeSeries.vb +++ b/instat/sdgTimeSeries.vb @@ -14,6 +14,7 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . +Imports System.ComponentModel Imports instat.Translations Public Class sdgTimeSeries @@ -46,7 +47,7 @@ Public Class sdgTimeSeries ' The value is a tuple of two RFunctions. ' Item1 is the summary function. ' Item2 is the paste function containing the summary. - ' This dictionary is created to avoid passing all the RFunctions to the sub dialog individually. + ' These dictionary are created to avoid passing all the RFunctions to the sub dialog individually. Private dctComparisonSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) Private dctIndividualSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) @@ -58,6 +59,8 @@ Public Class sdgTimeSeries ucrPnlSummaries.AddRadioButton(rdoComparison) ucrPnlSummaries.AddRadioButton(rdoIndividual) + ' Setting the conditions in this way ensures that at least one radio button is always selected as there may be no geom_text present. + ' This set up also ensures rdoComparison is selected by default before any selection has been made. ucrPnlSummaries.AddParameterPresentCondition(rdoIndividual, strGeomTextReferenceParameterName) ucrPnlSummaries.AddParameterPresentCondition(rdoComparison, strGeomTextReferenceParameterName, bNewIsPositive:=False) @@ -364,6 +367,7 @@ Public Class sdgTimeSeries End Sub Private Sub ucrInputPosition_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputPositionReference.ControlValueChanged + ' ucrInputPositionReference defines the position for both clsComparisonGeomText and clsReferenceGeomText hence two calls here. TextPosition(clsComparisonGeomText, ucrInputPositionReference.GetText()) TextPosition(clsReferenceGeomText, ucrInputPositionReference.GetText()) End Sub @@ -408,6 +412,9 @@ Public Class sdgTimeSeries SummariesDisplay() End Sub + ''' + ''' Show and hide the groups boxes and adjust a label's text based on radio button selection. + ''' Private Sub SummariesDisplay() If bRCodeSet Then If rdoComparison.Checked Then @@ -423,4 +430,11 @@ Public Class sdgTimeSeries ComparisonCheckBoxesCheck() End If End Sub + + ' In case font size is left empty, set to default value, otherwise geom_text will include 'size=' and give an error. + Private Sub sdgTimeSeries_Closing(sender As Object, e As CancelEventArgs) Handles Me.Closing + If ucrInputFontSize.GetText() = "" Then + ucrInputFontSize.SetName("5") + End If + End Sub End Class \ No newline at end of file From 28b1b4817a6d29b59dc05c02089bac3c81766192 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 24 Sep 2020 19:10:19 +0100 Subject: [PATCH 172/277] fixed typo --- instat/dlgTimeSeriesPlot.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 6254f0bd1dc..9580b9a5198 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -231,7 +231,7 @@ Public Class dlgTimeSeriesPlot clsGeomSmooth = New RFunction clsGeomSmoothParameter = New RParameter(strGeomSmoothParameterName, clsGeomSmooth, iNewPosition:=4) - ucrChkIncludeLineOfBestFit.SetText("Include Line of Best Fit") + ucrChkIncludeLineOfBestFit.SetText("Include Lines of Best Fit") ucrChkIncludeLineOfBestFit.SetParameter(clsGeomSmoothParameter, bNewChangeParameterValue:=False, bNewAddRemoveParameter:=True) ucrChkIncludeLineOfBestFit.AddToLinkedControls(ucrChkWithSE, {True}, bNewLinkedHideIfParameterMissing:=True) From 4185cc4ae5c5fabd6ede51d8b467477c06e41fa6 Mon Sep 17 00:00:00 2001 From: ivanluv Date: Fri, 25 Sep 2020 17:16:26 +0300 Subject: [PATCH 173/277] Adding "fixed " option for scale and allowing non conditin values for colour combobox --- instat/dlgDisplayDailyData.vb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 98b2608c8da..6e3e5bb3c9a 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -106,12 +106,14 @@ Public Class dlgDisplayDailyData ucrInputGraphRugColur.SetParameter(New RParameter("colour", 1)) - dctGRugColour.Add("Blue", Chr(34) & "blue" & Chr(34)) dctGRugColour.Add("Red", Chr(34) & "red" & Chr(34)) + dctGRugColour.Add("Black", Chr(34) & "black" & Chr(34)) + dctGRugColour.Add("Blue", Chr(34) & "blue" & Chr(34)) dctGRugColour.Add("Yellow", Chr(34) & "yellow" & Chr(34)) dctGRugColour.Add("Green", Chr(34) & "green" & Chr(34)) dctGRugColour.Add("Violet", Chr(34) & "violet" & Chr(34)) ucrInputGraphRugColur.SetItems(dctGRugColour) + ucrInputGraphRugColur.bAllowNonConditionValues = True ucrInputBarColour.SetParameter(New RParameter("bar_colour", 7)) @@ -129,6 +131,7 @@ Public Class dlgDisplayDailyData dctRugColour.Add("Green", Chr(34) & "green" & Chr(34)) dctRugColour.Add("Violet", Chr(34) & "violet" & Chr(34)) ucrInputRugColour.SetItems(dctRugColour) + ucrInputRugColour.bAllowNonConditionValues = True ucrChkSum.SetParameter(New RParameter("sum", 0), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "sum" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkSum.SetText("Sum") @@ -162,6 +165,7 @@ Public Class dlgDisplayDailyData dctScale.Add("Free_y", Chr(34) & "free_y" & Chr(34)) dctScale.Add("Free_x", Chr(34) & "free_x" & Chr(34)) dctScale.Add("Free", Chr(34) & "free" & Chr(34)) + dctScale.Add("Fixed", Chr(34) & "fixed" & Chr(34)) ucrInputScale.SetItems(dctScale) ucrInputScale.SetDropDownStyleAsNonEditable() From 3a6e848712c3cf444e2c51172f1f641c1ec44452 Mon Sep 17 00:00:00 2001 From: N-thony Date: Sun, 27 Sep 2020 23:27:43 +0200 Subject: [PATCH 174/277] Making change in the codes and design. --- instat/dlgInventoryPlot.designer.vb | 251 ++++-- instat/dlgInventoryPlot.resx | 824 ++++++++++++------ instat/dlgInventoryPlot.vb | 118 ++- .../InstatObject/R/stand_alone_functions.R | 64 +- 4 files changed, 847 insertions(+), 410 deletions(-) diff --git a/instat/dlgInventoryPlot.designer.vb b/instat/dlgInventoryPlot.designer.vb index 4f36566f4b7..9a0108b0499 100644 --- a/instat/dlgInventoryPlot.designer.vb +++ b/instat/dlgInventoryPlot.designer.vb @@ -42,36 +42,47 @@ Partial Class dlgInventoryPlot Me.lblDate = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() Me.lblElement = New System.Windows.Forms.Label() - Me.pnlDetails = New System.Windows.Forms.Panel() Me.rdoMissing = New System.Windows.Forms.RadioButton() Me.rdoGraph = New System.Windows.Forms.RadioButton() Me.cmdInventoryPlotOptions = New System.Windows.Forms.Button() Me.cmdOptions = New System.Windows.Forms.Button() Me.rdoElementOrder = New System.Windows.Forms.RadioButton() Me.rdoDateOrder = New System.Windows.Forms.RadioButton() - Me.pnlSummary = New System.Windows.Forms.Panel() - Me.pnlOmit = New System.Windows.Forms.Panel() + Me.grpOptions = New System.Windows.Forms.GroupBox() Me.ucrChkOmitStart = New instat.ucrCheck() Me.ucrChkOmitEnd = New instat.ucrCheck() - Me.ucrChkSummary = New instat.ucrCheck() Me.ucrChkDetails = New instat.ucrCheck() Me.ucrPnlOrder = New instat.UcrPanel() - Me.ucrSaveDetails = New instat.ucrSave() + Me.ucrChkSummary = New instat.ucrCheck() + Me.grpDetailsOptions = New System.Windows.Forms.GroupBox() Me.ucrChkMinute = New instat.ucrCheck() + Me.ucrSaveDetails = New instat.ucrSave() Me.ucrChkSecond = New instat.ucrCheck() - Me.ucrChkYear = New instat.ucrCheck() Me.ucrChkMonth = New instat.ucrCheck() - Me.ucrChkDay = New instat.ucrCheck() Me.ucrChkHour = New instat.ucrCheck() - Me.ucrPnls = New instat.UcrPanel() + Me.ucrChkYear = New instat.ucrCheck() + Me.ucrChkDay = New instat.ucrCheck() + Me.lblGraphTitle = New System.Windows.Forms.Label() + Me.grpPlotType = New System.Windows.Forms.GroupBox() + Me.rdoyear_doy_plot = New System.Windows.Forms.RadioButton() + Me.rdoDatePlot = New System.Windows.Forms.RadioButton() + Me.ucrPnlPlotType = New instat.UcrPanel() + Me.lblFacetBy = New System.Windows.Forms.Label() + Me.ucrChkDisplayRainDays = New instat.ucrCheck() + Me.ucrInputFacetBy = New instat.ucrInputComboBox() + Me.ucrInputTitle = New instat.ucrInputTextBox() + Me.ucrChkShowNonMissing = New instat.ucrCheck() + Me.ucrSaveGraph = New instat.ucrSave() + Me.ucrChkFlipCoordinates = New instat.ucrCheck() + Me.ucrPnlOptions = New instat.UcrPanel() Me.ucrReceiverDate = New instat.ucrReceiverSingle() Me.ucrReceiverElements = New instat.ucrReceiverMultiple() Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.ucrInventoryPlotSelector = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.pnlDetails.SuspendLayout() - Me.pnlSummary.SuspendLayout() - Me.pnlOmit.SuspendLayout() + Me.grpOptions.SuspendLayout() + Me.grpDetailsOptions.SuspendLayout() + Me.grpPlotType.SuspendLayout() Me.SuspendLayout() ' 'lblDate @@ -89,18 +100,6 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.lblElement, "lblElement") Me.lblElement.Name = "lblElement" ' - 'pnlDetails - ' - Me.pnlDetails.Controls.Add(Me.ucrSaveDetails) - Me.pnlDetails.Controls.Add(Me.ucrChkMinute) - Me.pnlDetails.Controls.Add(Me.ucrChkSecond) - Me.pnlDetails.Controls.Add(Me.ucrChkYear) - Me.pnlDetails.Controls.Add(Me.ucrChkMonth) - Me.pnlDetails.Controls.Add(Me.ucrChkDay) - Me.pnlDetails.Controls.Add(Me.ucrChkHour) - resources.ApplyResources(Me.pnlDetails, "pnlDetails") - Me.pnlDetails.Name = "pnlDetails" - ' 'rdoMissing ' resources.ApplyResources(Me.rdoMissing, "rdoMissing") @@ -145,23 +144,18 @@ Partial Class dlgInventoryPlot Me.rdoDateOrder.TabStop = True Me.rdoDateOrder.UseVisualStyleBackColor = True ' - 'pnlSummary + 'grpOptions ' - Me.pnlSummary.Controls.Add(Me.pnlOmit) - Me.pnlSummary.Controls.Add(Me.ucrChkSummary) - Me.pnlSummary.Controls.Add(Me.rdoElementOrder) - Me.pnlSummary.Controls.Add(Me.ucrChkDetails) - Me.pnlSummary.Controls.Add(Me.rdoDateOrder) - Me.pnlSummary.Controls.Add(Me.ucrPnlOrder) - resources.ApplyResources(Me.pnlSummary, "pnlSummary") - Me.pnlSummary.Name = "pnlSummary" - ' - 'pnlOmit - ' - Me.pnlOmit.Controls.Add(Me.ucrChkOmitStart) - Me.pnlOmit.Controls.Add(Me.ucrChkOmitEnd) - resources.ApplyResources(Me.pnlOmit, "pnlOmit") - Me.pnlOmit.Name = "pnlOmit" + Me.grpOptions.Controls.Add(Me.ucrChkOmitStart) + Me.grpOptions.Controls.Add(Me.rdoElementOrder) + Me.grpOptions.Controls.Add(Me.ucrChkOmitEnd) + Me.grpOptions.Controls.Add(Me.rdoDateOrder) + Me.grpOptions.Controls.Add(Me.ucrChkDetails) + Me.grpOptions.Controls.Add(Me.ucrPnlOrder) + Me.grpOptions.Controls.Add(Me.ucrChkSummary) + resources.ApplyResources(Me.grpOptions, "grpOptions") + Me.grpOptions.Name = "grpOptions" + Me.grpOptions.TabStop = False ' 'ucrChkOmitStart ' @@ -175,12 +169,6 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrChkOmitEnd, "ucrChkOmitEnd") Me.ucrChkOmitEnd.Name = "ucrChkOmitEnd" ' - 'ucrChkSummary - ' - Me.ucrChkSummary.Checked = False - resources.ApplyResources(Me.ucrChkSummary, "ucrChkSummary") - Me.ucrChkSummary.Name = "ucrChkSummary" - ' 'ucrChkDetails ' Me.ucrChkDetails.Checked = False @@ -192,10 +180,24 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrPnlOrder, "ucrPnlOrder") Me.ucrPnlOrder.Name = "ucrPnlOrder" ' - 'ucrSaveDetails + 'ucrChkSummary ' - resources.ApplyResources(Me.ucrSaveDetails, "ucrSaveDetails") - Me.ucrSaveDetails.Name = "ucrSaveDetails" + Me.ucrChkSummary.Checked = False + resources.ApplyResources(Me.ucrChkSummary, "ucrChkSummary") + Me.ucrChkSummary.Name = "ucrChkSummary" + ' + 'grpDetailsOptions + ' + Me.grpDetailsOptions.Controls.Add(Me.ucrChkMinute) + Me.grpDetailsOptions.Controls.Add(Me.ucrSaveDetails) + Me.grpDetailsOptions.Controls.Add(Me.ucrChkSecond) + Me.grpDetailsOptions.Controls.Add(Me.ucrChkMonth) + Me.grpDetailsOptions.Controls.Add(Me.ucrChkHour) + Me.grpDetailsOptions.Controls.Add(Me.ucrChkYear) + Me.grpDetailsOptions.Controls.Add(Me.ucrChkDay) + resources.ApplyResources(Me.grpDetailsOptions, "grpDetailsOptions") + Me.grpDetailsOptions.Name = "grpDetailsOptions" + Me.grpDetailsOptions.TabStop = False ' 'ucrChkMinute ' @@ -203,40 +205,122 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrChkMinute, "ucrChkMinute") Me.ucrChkMinute.Name = "ucrChkMinute" ' + 'ucrSaveDetails + ' + resources.ApplyResources(Me.ucrSaveDetails, "ucrSaveDetails") + Me.ucrSaveDetails.Name = "ucrSaveDetails" + ' 'ucrChkSecond ' Me.ucrChkSecond.Checked = False resources.ApplyResources(Me.ucrChkSecond, "ucrChkSecond") Me.ucrChkSecond.Name = "ucrChkSecond" ' - 'ucrChkYear - ' - Me.ucrChkYear.Checked = False - resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") - Me.ucrChkYear.Name = "ucrChkYear" - ' 'ucrChkMonth ' Me.ucrChkMonth.Checked = False resources.ApplyResources(Me.ucrChkMonth, "ucrChkMonth") Me.ucrChkMonth.Name = "ucrChkMonth" ' + 'ucrChkHour + ' + Me.ucrChkHour.Checked = False + resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") + Me.ucrChkHour.Name = "ucrChkHour" + ' + 'ucrChkYear + ' + Me.ucrChkYear.Checked = False + resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") + Me.ucrChkYear.Name = "ucrChkYear" + ' 'ucrChkDay ' Me.ucrChkDay.Checked = False resources.ApplyResources(Me.ucrChkDay, "ucrChkDay") Me.ucrChkDay.Name = "ucrChkDay" ' - 'ucrChkHour + 'lblGraphTitle ' - Me.ucrChkHour.Checked = False - resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") - Me.ucrChkHour.Name = "ucrChkHour" + resources.ApplyResources(Me.lblGraphTitle, "lblGraphTitle") + Me.lblGraphTitle.Name = "lblGraphTitle" + ' + 'grpPlotType + ' + Me.grpPlotType.Controls.Add(Me.rdoyear_doy_plot) + Me.grpPlotType.Controls.Add(Me.rdoDatePlot) + Me.grpPlotType.Controls.Add(Me.ucrPnlPlotType) + resources.ApplyResources(Me.grpPlotType, "grpPlotType") + Me.grpPlotType.Name = "grpPlotType" + Me.grpPlotType.TabStop = False + ' + 'rdoyear_doy_plot + ' + resources.ApplyResources(Me.rdoyear_doy_plot, "rdoyear_doy_plot") + Me.rdoyear_doy_plot.Name = "rdoyear_doy_plot" + Me.rdoyear_doy_plot.TabStop = True + Me.rdoyear_doy_plot.UseVisualStyleBackColor = True + ' + 'rdoDatePlot ' - 'ucrPnls + resources.ApplyResources(Me.rdoDatePlot, "rdoDatePlot") + Me.rdoDatePlot.Name = "rdoDatePlot" + Me.rdoDatePlot.TabStop = True + Me.rdoDatePlot.UseVisualStyleBackColor = True ' - resources.ApplyResources(Me.ucrPnls, "ucrPnls") - Me.ucrPnls.Name = "ucrPnls" + 'ucrPnlPlotType + ' + resources.ApplyResources(Me.ucrPnlPlotType, "ucrPnlPlotType") + Me.ucrPnlPlotType.Name = "ucrPnlPlotType" + ' + 'lblFacetBy + ' + resources.ApplyResources(Me.lblFacetBy, "lblFacetBy") + Me.lblFacetBy.Name = "lblFacetBy" + ' + 'ucrChkDisplayRainDays + ' + Me.ucrChkDisplayRainDays.Checked = False + resources.ApplyResources(Me.ucrChkDisplayRainDays, "ucrChkDisplayRainDays") + Me.ucrChkDisplayRainDays.Name = "ucrChkDisplayRainDays" + ' + 'ucrInputFacetBy + ' + Me.ucrInputFacetBy.AddQuotesIfUnrecognised = True + Me.ucrInputFacetBy.GetSetSelectedIndex = -1 + Me.ucrInputFacetBy.IsReadOnly = False + resources.ApplyResources(Me.ucrInputFacetBy, "ucrInputFacetBy") + Me.ucrInputFacetBy.Name = "ucrInputFacetBy" + ' + 'ucrInputTitle + ' + Me.ucrInputTitle.AddQuotesIfUnrecognised = True + Me.ucrInputTitle.IsMultiline = False + Me.ucrInputTitle.IsReadOnly = False + resources.ApplyResources(Me.ucrInputTitle, "ucrInputTitle") + Me.ucrInputTitle.Name = "ucrInputTitle" + ' + 'ucrChkShowNonMissing + ' + Me.ucrChkShowNonMissing.Checked = False + resources.ApplyResources(Me.ucrChkShowNonMissing, "ucrChkShowNonMissing") + Me.ucrChkShowNonMissing.Name = "ucrChkShowNonMissing" + ' + 'ucrSaveGraph + ' + resources.ApplyResources(Me.ucrSaveGraph, "ucrSaveGraph") + Me.ucrSaveGraph.Name = "ucrSaveGraph" + ' + 'ucrChkFlipCoordinates + ' + Me.ucrChkFlipCoordinates.Checked = False + resources.ApplyResources(Me.ucrChkFlipCoordinates, "ucrChkFlipCoordinates") + Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" + ' + 'ucrPnlOptions + ' + resources.ApplyResources(Me.ucrPnlOptions, "ucrPnlOptions") + Me.ucrPnlOptions.Name = "ucrPnlOptions" ' 'ucrReceiverDate ' @@ -282,13 +366,22 @@ Partial Class dlgInventoryPlot ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.lblGraphTitle) + Me.Controls.Add(Me.ucrChkDisplayRainDays) + Me.Controls.Add(Me.grpPlotType) + Me.Controls.Add(Me.lblFacetBy) + Me.Controls.Add(Me.ucrInputFacetBy) + Me.Controls.Add(Me.ucrInputTitle) + Me.Controls.Add(Me.ucrChkShowNonMissing) + Me.Controls.Add(Me.ucrSaveGraph) + Me.Controls.Add(Me.ucrChkFlipCoordinates) + Me.Controls.Add(Me.grpDetailsOptions) + Me.Controls.Add(Me.grpOptions) Me.Controls.Add(Me.cmdInventoryPlotOptions) Me.Controls.Add(Me.cmdOptions) Me.Controls.Add(Me.rdoGraph) Me.Controls.Add(Me.rdoMissing) - Me.Controls.Add(Me.pnlSummary) - Me.Controls.Add(Me.pnlDetails) - Me.Controls.Add(Me.ucrPnls) + Me.Controls.Add(Me.ucrPnlOptions) Me.Controls.Add(Me.lblElement) Me.Controls.Add(Me.ucrReceiverDate) Me.Controls.Add(Me.lblDate) @@ -302,10 +395,11 @@ Partial Class dlgInventoryPlot Me.MinimizeBox = False Me.Name = "dlgInventoryPlot" Me.Tag = "Inventory_Plot" - Me.pnlDetails.ResumeLayout(False) - Me.pnlSummary.ResumeLayout(False) - Me.pnlSummary.PerformLayout() - Me.pnlOmit.ResumeLayout(False) + Me.grpOptions.ResumeLayout(False) + Me.grpOptions.PerformLayout() + Me.grpDetailsOptions.ResumeLayout(False) + Me.grpPlotType.ResumeLayout(False) + Me.grpPlotType.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() @@ -318,8 +412,7 @@ Partial Class dlgInventoryPlot Friend WithEvents ucrReceiverStation As ucrReceiverSingle Friend WithEvents ucrReceiverDate As ucrReceiverSingle Friend WithEvents lblElement As Label - Friend WithEvents ucrPnls As UcrPanel - Friend WithEvents pnlDetails As Panel + Friend WithEvents ucrPnlOptions As UcrPanel Friend WithEvents ucrChkMinute As ucrCheck Friend WithEvents ucrChkSecond As ucrCheck Friend WithEvents ucrChkYear As ucrCheck @@ -336,8 +429,20 @@ Partial Class dlgInventoryPlot Friend WithEvents ucrPnlOrder As UcrPanel Friend WithEvents ucrChkDetails As ucrCheck Friend WithEvents ucrChkSummary As ucrCheck - Friend WithEvents pnlSummary As Panel - Friend WithEvents ucrChkOmitEnd As ucrCheck + Friend WithEvents grpOptions As GroupBox + Friend WithEvents grpDetailsOptions As GroupBox + Friend WithEvents lblGraphTitle As Label + Friend WithEvents ucrChkDisplayRainDays As ucrCheck + Friend WithEvents grpPlotType As GroupBox + Friend WithEvents rdoyear_doy_plot As RadioButton + Friend WithEvents rdoDatePlot As RadioButton + Friend WithEvents ucrPnlPlotType As UcrPanel + Friend WithEvents lblFacetBy As Label + Friend WithEvents ucrInputFacetBy As ucrInputComboBox + Friend WithEvents ucrInputTitle As ucrInputTextBox + Friend WithEvents ucrChkShowNonMissing As ucrCheck + Friend WithEvents ucrSaveGraph As ucrSave + Friend WithEvents ucrChkFlipCoordinates As ucrCheck Friend WithEvents ucrChkOmitStart As ucrCheck - Friend WithEvents pnlOmit As Panel + Friend WithEvents ucrChkOmitEnd As ucrCheck End Class diff --git a/instat/dlgInventoryPlot.resx b/instat/dlgInventoryPlot.resx index dd93637b3e7..091cf70917a 100644 --- a/instat/dlgInventoryPlot.resx +++ b/instat/dlgInventoryPlot.resx @@ -148,7 +148,7 @@ $this - 9 + 18 True @@ -178,7 +178,7 @@ $this - 11 + 20 True @@ -208,188 +208,8 @@ $this - 7 - - - 7, 76 - - - 4, 5, 4, 5 - - - 262, 23 - - - 20 - - - ucrSaveDetails - - - instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlDetails - - - 0 - - - False - - - 248, 29 - - - 100, 20 - - - 18 - - - ucrChkMinute - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlDetails - - - 1 - - - False - - - 248, 53 - - - 100, 20 - - - 19 - - - ucrChkSecond - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlDetails - - - 2 - - - 126, 5 - - - 100, 20 - - - 14 - - - ucrChkYear - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlDetails - - - 3 - - - 126, 29 - - - 100, 20 - - - 15 - - - ucrChkMonth - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlDetails - - - 4 - - - 126, 55 - - - 100, 20 - - 16 - - ucrChkDay - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlDetails - - - 5 - - - False - - - 248, 5 - - - 100, 20 - - - 17 - - - ucrChkHour - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - pnlDetails - - - 6 - - - 2, 321 - - - 402, 100 - - - 22 - - - pnlDetails - - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 5 - Button @@ -424,7 +244,7 @@ $this - 3 + 14 Button @@ -463,7 +283,7 @@ $this - 2 + 13 False @@ -493,7 +313,7 @@ $this - 0 + 11 False @@ -523,7 +343,7 @@ $this - 1 + 12 True @@ -532,7 +352,7 @@ NoControl - 245, 29 + 248, 38 92, 17 @@ -550,10 +370,10 @@ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - pnlSummary + grpOptions - 2 + 1 True @@ -562,7 +382,7 @@ NoControl - 123, 29 + 125, 38 77, 17 @@ -580,16 +400,16 @@ System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - pnlSummary + grpOptions - 4 + 3 - 3, 7 + 126, 16 - 100, 20 + 100, 15 39 @@ -601,16 +421,16 @@ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - pnlOmit + grpOptions 0 - 125, 7 + 248, 16 - 100, 20 + 89, 15 10 @@ -622,37 +442,58 @@ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - pnlOmit + grpOptions - 1 + 2 - - 120, 1 + + 6, 38 - - 250, 28 + + 100, 17 - - 39 + + 11 - - pnlOmit + + ucrChkDetails - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - pnlSummary + + grpOptions - - 0 + + 4 + + + 124, 36 + + + 217, 20 + + + 38 + + + ucrPnlOrder + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpOptions + + + 5 - 7, 3 + 6, 16 - 100, 20 + 100, 17 16 @@ -664,94 +505,535 @@ instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - pnlSummary + grpOptions + 6 + + + 10, 254 + + + 381, 60 + + + 52 + + + Summary Options + + + grpOptions + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 10 + + + False + + + 248, 36 + + + 100, 17 + + + 18 + + + ucrChkMinute + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDetailsOptions + + + 0 + + + 6, 86 + + + 4, 5, 4, 5 + + + 262, 21 + + + 20 + + + ucrSaveDetails + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDetailsOptions + + 1 - - 7, 29 + + False - - 100, 20 + + 248, 62 - - 11 + + 100, 17 - - ucrChkDetails + + 19 - + + ucrChkSecond + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - pnlSummary + + grpDetailsOptions - + + 2 + + + 126, 36 + + + 100, 17 + + + 15 + + + ucrChkMonth + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDetailsOptions + + 3 - - 114, 25 + + False - - 242, 20 + + 248, 12 - - 38 + + 100, 17 - - ucrPnlOrder + + 17 - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + ucrChkHour - - pnlSummary + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + + grpDetailsOptions + + + 4 + + + 126, 12 + + + 100, 17 + + + 14 + + + ucrChkYear + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDetailsOptions + + 5 - - 4, 270 + + 126, 62 + + + 100, 17 - - 376, 50 + + 16 - - 21 + + ucrChkDay + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDetailsOptions + + + 6 + + + 10, 316 + + + 381, 114 + + + 53 + + + Details Options + + + grpDetailsOptions + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 9 + + + True + + + NoControl + + + 14, 384 + + + 62, 13 + + + 62 + + + Graph Title: + + + lblGraphTitle + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + + + True + + + NoControl + + + 92, 21 + + + 100, 17 + + + 2 - - pnlSummary + + Year - DOY Plot - - System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + rdoyear_doy_plot - + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpPlotType + + + 0 + + + True + + + NoControl + + + 15, 21 + + + 69, 17 + + + 1 + + + Date Plot + + + rdoDatePlot + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpPlotType + + + 1 + + + 6, 13 + + + 189, 33 + + + 0 + + + ucrPnlPlotType + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpPlotType + + + 2 + + + 10, 269 + + + 201, 53 + + + 57 + + + Plot Type + + + grpPlotType + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + + + True + + + NoControl + + + 215, 292 + + + 52, 13 + + + 54 + + + Facet By: + + + lblFacetBy + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + + + 14, 354 + + + 151, 20 + + + 61 + + + ucrChkDisplayRainDays + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + + + 274, 288 + + + 137, 21 + + + 55 + + + ucrInputFacetBy + + + instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + $this - + 4 - - 76, 3 + + 87, 381 + + + 204, 21 + + + 59 + + + ucrInputTitle + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 5 + + + 171, 328 + + + 151, 20 + + + 56 + + + False + + + ucrChkShowNonMissing + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 6 + + + 14, 407 + + + 4, 5, 4, 5 + + + 255, 24 - - 277, 35 + + 60 - + + ucrSaveGraph + + + instat.ucrSave, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 7 + + + 14, 328 + + + 151, 20 + + + 58 + + + ucrChkFlipCoordinates + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 8 + + + 76, 1 + + + 278, 35 + + 23 - - ucrPnls + + ucrPnlOptions - + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + $this - - 6 + + 15 True @@ -760,7 +1042,7 @@ 6, 13 - 423, 475 + 423, 489 263, 96 @@ -784,7 +1066,7 @@ $this - 10 + 19 263, 215 @@ -808,7 +1090,7 @@ $this - 12 + 21 10, 32 @@ -832,10 +1114,10 @@ $this - 13 + 22 - 7, 421 + 7, 435 410, 53 @@ -853,7 +1135,7 @@ $this - 14 + 23 CenterScreen @@ -889,6 +1171,6 @@ $this - 8 + 17 \ No newline at end of file diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index c1e4d3c389e..af3735678c2 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -21,14 +21,15 @@ Public Class dlgInventoryPlot Private clsDefaultRFunction As New RFunction Private clsClimaticMissing As New RFunction Private clsClimaticDetails As New RFunction + Private clsCurrInvFunction As New RFunction Private iPnlSummaryY As Integer Private iPnlDetailsY As Integer Private Sub dlgInventoryPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then - iPnlSummaryY = pnlSummary.Location.Y - iPnlDetailsY = pnlDetails.Location.Y + iPnlSummaryY = grpOptions.Location.Y + iPnlDetailsY = grpDetailsOptions.Location.Y InitialiseDialog() bFirstLoad = False End If @@ -72,11 +73,12 @@ Public Class dlgInventoryPlot ucrChkSummary.AddFunctionNamesCondition(True, "climatic_missing") ucrChkSummary.SetText("Summary") + 'ucrChkSummary.SetRDefault("TRUE") + ucrChkDetails.AddRSyntaxContainsFunctionNamesCondition(True, {"climatic_details"}) ucrChkDetails.SetText("Details") - 'ucrChkDetails.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - 'ucrChkDetails.SetRDefault("FALSE") + ucrChkDetails.SetRDefault("FALSE") ucrChkOmitStart.SetParameter(New RParameter("start", 4)) ucrChkOmitStart.SetText("Omit Start") @@ -108,7 +110,7 @@ Public Class dlgInventoryPlot ucrSaveDetails.SetSaveTypeAsDataFrame() ucrSaveDetails.SetDataFrameSelector(ucrInventoryPlotSelector.ucrAvailableDataFrames) ucrSaveDetails.SetIsComboBox() - 'ucrSaveDetails.SetAssignToIfUncheckedValue("last_table") + 'ucrSaveDetails.SetAssignToIfUncheckedValue("last_details") ' ucrChkHour.SetParameter(New RParameter("", 13)) ucrChkHour.SetText("Hour") @@ -127,31 +129,61 @@ Public Class dlgInventoryPlot ucrPnlOrder.AddRadioButton(rdoElementOrder, "FALSE") ucrPnlOrder.SetRDefault("FALSE") - ucrPnls.AddRadioButton(rdoMissing) - ucrPnls.AddRadioButton(rdoGraph) - 'ucrPnls.AddFunctionNamesCondition(rdoMissing, "climatic_missing") - ucrPnls.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") - ucrPnls.AddToLinkedControls(ucrChkSummary, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnls.AddToLinkedControls(ucrChkDetails, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkFlipCoordinates.SetParameter(New RParameter("coord_flip", 4)) + ucrChkFlipCoordinates.SetText("Flip Coordinates") + ucrChkFlipCoordinates.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkFlipCoordinates.SetRDefault("FALSE") + + ucrInputTitle.SetParameter(New RParameter("graph_title", 9)) + ucrInputTitle.SetRDefault("Inventory Plot") + + ucrChkDisplayRainDays.SetParameter(New RParameter("display_rain_days", 11), bNewChangeParameterValue:=True) + ucrChkDisplayRainDays.SetText("Display Rain Days") + ucrChkDisplayRainDays.SetRDefault("FALSE") + + ucrChkShowNonMissing.SetText("Show Non Missing") + ucrChkShowNonMissing.Enabled = False ' this currently has no parameter associated with it + + ucrPnlPlotType.SetParameter(New RParameter("year_doy_plot", 6)) + ucrPnlPlotType.AddRadioButton(rdoyear_doy_plot, "TRUE") + ucrPnlPlotType.AddRadioButton(rdoDatePlot, "FALSE") + ucrPnlPlotType.SetRDefault("FALSE") + + ucrSaveGraph.SetPrefix("Inventory") + ucrSaveGraph.SetSaveTypeAsGraph() + ucrSaveGraph.SetDataFrameSelector(ucrInventoryPlotSelector.ucrAvailableDataFrames) + ucrSaveGraph.SetCheckBoxText("Save Graph") + ucrSaveGraph.SetIsComboBox() + ucrSaveGraph.SetAssignToIfUncheckedValue("last_graph") + + ucrPnlOptions.AddRadioButton(rdoMissing) + ucrPnlOptions.AddRadioButton(rdoGraph) + ucrPnlOptions.AddFunctionNamesCondition(rdoMissing, "climatic_missing") + ucrPnlOptions.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") + ucrPnlOptions.AddToLinkedControls({ucrChkDisplayRainDays, ucrChkFlipCoordinates, ucrChkShowNonMissing, ucrPnlPlotType, ucrSaveGraph, ucrInputTitle, ucrInputFacetBy}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrChkSummary, ucrChkDetails}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrPnlOrder}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkSummary.AddToLinkedControls({ucrChkOmitStart}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkDay.SetLinkedDisplayControl(pnlDetails) + ucrChkSummary.AddToLinkedControls({ucrChkOmitStart, ucrChkOmitEnd}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDay.SetLinkedDisplayControl(grpDetailsOptions) ucrChkSummary.SetLinkedDisplayControl(ucrPnlOrder) - ucrChkSummary.SetLinkedDisplayControl(pnlSummary) - ucrChkOmitStart.SetLinkedDisplayControl(pnlOmit) + ucrChkSummary.SetLinkedDisplayControl(grpOptions) ucrPnlOrder.SetLinkedDisplayControl(rdoDateOrder) ucrPnlOrder.SetLinkedDisplayControl(rdoElementOrder) - - + ucrPnlPlotType.SetLinkedDisplayControl(grpPlotType) + ucrInputTitle.SetLinkedDisplayControl(lblGraphTitle) + ucrInputFacetBy.SetLinkedDisplayControl(lblFacetBy) Dim dctFacetByPairs As New Dictionary(Of String, String) - + ucrInputFacetBy.SetParameter(New RParameter("facet_by", 8)) dctFacetByPairs.Add("Default", "NULL") dctFacetByPairs.Add("Elements", Chr(34) & "elements" & Chr(34)) dctFacetByPairs.Add("Stations", Chr(34) & "stations" & Chr(34)) dctFacetByPairs.Add("Stations-Elements", Chr(34) & "stations-elements" & Chr(34)) dctFacetByPairs.Add("Elements-Stations", Chr(34) & "elements-stations" & Chr(34)) + ucrInputFacetBy.SetItems(dctFacetByPairs) + ucrInputFacetBy.SetRDefault("NULL") + ucrInputFacetBy.SetDropDownStyleAsNonEditable() @@ -164,13 +196,17 @@ Public Class dlgInventoryPlot ucrInventoryPlotSelector.Reset() ucrReceiverElements.SetMeAsReceiver() + ucrSaveGraph.Reset() + ucrSaveDetails.Reset() + + clsCurrInvFunction = clsDefaultRFunction clsDefaultRFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") clsDefaultRFunction.AddParameter("coord_flip", "FALSE") clsDefaultRFunction.AddParameter("year_doy_plot", "FALSE") clsDefaultRFunction.AddParameter("facet_by", "NULL") clsDefaultRFunction.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") - 'clsClimaticDetails.SetAssignTo("last_table", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempTable:="last_table") + 'clsClimaticDetails.SetAssignTo("", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strDataFrameNames:="") clsClimaticMissing.SetRCommand("climatic_missing") clsClimaticDetails.SetRCommand("climatic_details") clsClimaticDetails.iCallType = 2 @@ -181,20 +217,27 @@ Public Class dlgInventoryPlot End Sub Private Sub SetRCodeForControls(bReset As Boolean) - ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("data", ucrInventoryPlotSelector.ucrAvailableDataFrames.clsCurrDataFrame), iAdditionalPairNo:=1) - ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("date"), iAdditionalPairNo:=1) - ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("elements"), iAdditionalPairNo:=1) - ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("stations"), iAdditionalPairNo:=1) + ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("data", 0), iAdditionalPairNo:=1) + ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("date", 1), iAdditionalPairNo:=1) + ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("elements", 2), iAdditionalPairNo:=1) + ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("stations", 3), iAdditionalPairNo:=1) - ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("data", ucrInventoryPlotSelector.ucrAvailableDataFrames.clsCurrDataFrame), iAdditionalPairNo:=2) - ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("date"), iAdditionalPairNo:=2) - ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("elements"), iAdditionalPairNo:=2) - ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("stations"), iAdditionalPairNo:=2) + ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("data", 0), iAdditionalPairNo:=2) + ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("date", 1), iAdditionalPairNo:=2) + ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("elements", 2), iAdditionalPairNo:=2) + ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("stations", 3), iAdditionalPairNo:=2) ucrInventoryPlotSelector.SetRCode(clsDefaultRFunction, bReset) ucrReceiverDate.SetRCode(clsDefaultRFunction, bReset) ucrReceiverStation.SetRCode(clsDefaultRFunction, bReset) ucrReceiverElements.SetRCode(clsDefaultRFunction, bReset) + ucrChkFlipCoordinates.SetRCode(clsDefaultRFunction, bReset) + ucrInputTitle.SetRCode(clsDefaultRFunction, bReset) + ucrChkDisplayRainDays.SetRCode(clsDefaultRFunction, bReset) + ucrChkShowNonMissing.SetRCode(clsDefaultRFunction, bReset) + ucrPnlPlotType.SetRCode(clsDefaultRFunction, bReset) + ucrInputFacetBy.SetRCode(clsDefaultRFunction, bReset) + ucrSaveGraph.SetRCode(clsDefaultRFunction, bReset) ucrChkSummary.SetRCode(clsClimaticMissing, bReset) ucrChkDetails.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkYear.SetRCode(clsClimaticDetails, bReset) @@ -204,7 +247,7 @@ Public Class dlgInventoryPlot ucrChkOmitStart.SetRCode(clsClimaticMissing, bReset) ucrChkOmitEnd.SetRCode(clsClimaticMissing, bReset) ucrPnlOrder.SetRCode(clsClimaticDetails, bReset) - ucrPnls.SetRCode(clsDefaultRFunction, bReset) + ucrPnlOptions.SetRCode(clsCurrInvFunction, bReset) End Sub Private Sub TestOkEnabled() @@ -237,28 +280,35 @@ Public Class dlgInventoryPlot End If End Sub - Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnls.ControlValueChanged + Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoMissing.Checked Then ChangeFunction() - pnlSummary.Location = New Point(pnlSummary.Location.X, iPnlSummaryY / 1.09) - pnlDetails.Location = New Point(pnlDetails.Location.X, iPnlDetailsY / 1.08) + grpOptions.Location = New Point(grpOptions.Location.X, iPnlSummaryY / 1.05) + grpDetailsOptions.Location = New Point(grpDetailsOptions.Location.X, iPnlDetailsY / 1.04) cmdInventoryPlotOptions.Visible = False cmdOptions.Visible = False - ucrChkDetails.Checked = False - ucrChkSummary.Checked = True + clsCurrInvFunction = clsClimaticMissing Else + ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) ucrBase.clsRsyntax.iCallType = 3 cmdInventoryPlotOptions.Visible = True cmdOptions.Visible = True + clsCurrInvFunction = clsDefaultRFunction End If End Sub - Private Sub ucrPnls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnls.ControlContentsChanged + Private Sub ucrPnls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlContentsChanged If rdoGraph.Checked Then ucrReceiverDate.SetParameterIsString() + ucrInventoryPlotSelector.SetParameterIsString() + ucrReceiverStation.SetParameterIsString() + ucrReceiverStation.bWithQuotes = True Else ucrReceiverDate.SetParameterIsRFunction() + ucrReceiverStation.SetParameterIsString() + ucrReceiverStation.bWithQuotes = False + ucrInventoryPlotSelector.SetParameterIsrfunction() End If End Sub diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 8ac468dc02b..414b858dcda 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1333,8 +1333,8 @@ climatic_missing <- function(data, date, elements = ..., stations, # number and percentage missing summary.data <- data.frame(data.stack %>% - dplyr::group_by({{stations}}, Element) %>% - dplyr::filter(({{date}}) >= start & ({{date}}) <= end) %>% + dplyr::group_by({{ stations }}, Element) %>% + dplyr::filter(({{ date }}) >= start & ({{ date }}) <= end) %>% dplyr::summarise(From = dplyr::first(start), To = dplyr::last(end), Missing = sum(is.na(value)), @@ -1342,12 +1342,12 @@ climatic_missing <- function(data, date, elements = ..., stations, # complete years complete.years <- data.stack %>% - dplyr::group_by({{stations}}) %>% - dplyr::filter(({{date}}) >= start & ({{date}}) <= end) %>% - dplyr::group_by(lubridate::year({{date}}), {{stations}}, Element) %>% + dplyr::group_by({{ stations }}) %>% + dplyr::filter(({{ date }}) >= start & ({{ date }}) <= end) %>% + dplyr::group_by(lubridate::year({{ date }}), {{ stations }}, Element) %>% dplyr::summarise(count = sum(is.na(value))) complete.years <- complete.years %>% - dplyr::group_by({{stations}}, Element) %>% + dplyr::group_by({{ stations }}, Element) %>% dplyr::summarise(Complete.Years = sum(count == 0)) @@ -1390,29 +1390,29 @@ climatic_details <- function(data, date, elements = ..., stations, data.stack <- data %>% tidyr::pivot_longer(cols = c({{ elements }}), names_to = "Element", - values_to = "value") + values_to = "Value") # sort start/end times - if (day != TRUE & month != TRUE & year != TRUE){ - warning('At least one of day, month, year need to be selected') - } + if (!any(day, month, year)){ + warning('At least one of day, month, year need to be selected') + } if (day){ i = i + 1 detail.table.day = data.stack %>% - dplyr::group_by({{stations}}, Element) %>% - dplyr::mutate(element.na = data.table::rleid(value)) %>% - dplyr::filter(is.na(value)) %>% - dplyr::group_by(element.na, {{stations}}, Element) %>% - dplyr::summarise(From = dplyr::first({{date}}), - To = dplyr::last({{date}}), - Count = n()) %>% + dplyr::group_by({{ stations }}, Element) %>% + dplyr::mutate(element.na = data.table::rleid(Value)) %>% + dplyr::filter(is.na(Value)) %>% + dplyr::group_by(element.na, {{ stations }}, Element) %>% + dplyr::summarise(From = dplyr::first({{ date }}), + To = dplyr::last({{ date }}), + Count = dplyr::n()) %>% mutate(Level = "Day") if (order){ detail.table.day <- detail.table.day %>% dplyr::arrange(From) - } else { + } else { detail.table.day <- detail.table.day %>% dplyr::arrange(Element) } @@ -1424,21 +1424,21 @@ climatic_details <- function(data, date, elements = ..., stations, if (month){ i = i + 1 detail.table.month <- data.stack %>% - dplyr::mutate(Date.ym = zoo::as.yearmon({{date}})) %>% - dplyr::group_by(Date.ym, {{stations}}, Element) + dplyr::mutate(Date.ym = zoo::as.yearmon({{ date }})) %>% + dplyr::group_by(Date.ym, {{ stations }}, Element) detail.table.month <- detail.table.month %>% dplyr::summarise(no = n(), - na = sum(is.na(value)), - From = dplyr::first({{date}}), - To = dplyr::last({{date}})) %>% + na = sum(is.na(Value)), + From = dplyr::first({{ date }}), + To = dplyr::last({{ date }})) %>% dplyr::mutate(is.complete = ifelse(no == na, 1, 0)) # 0 if all are missing detail.table.month <- detail.table.month %>% - dplyr::group_by({{stations}}, Element) %>% + dplyr::group_by({{ stations }}, Element) %>% dplyr::mutate(element.na = data.table::rleid(is.complete)) %>% dplyr::filter(is.complete == 1) %>% - dplyr::group_by(element.na, {{stations}}, Element) %>% + dplyr::group_by(element.na, {{ stations }}, Element) %>% dplyr::summarise(From = dplyr::first(From), To = dplyr::last(To), Count = n()) %>% @@ -1457,21 +1457,21 @@ climatic_details <- function(data, date, elements = ..., stations, if (year) { i = i + 1 detail.table.year <- data.stack %>% - dplyr::mutate(Date.y = lubridate::year({{date}})) %>% - dplyr::group_by(Date.y, {{stations}}, Element) + dplyr::mutate(Date.y = lubridate::year({{ date }})) %>% + dplyr::group_by(Date.y, {{ stations }}, Element) detail.table.year <- detail.table.year %>% dplyr::summarise(no = n(), - na = sum(is.na(value)), - From = dplyr::first({{date}}), - To = dplyr::last({{date}})) %>% + na = sum(is.na(Value)), + From = dplyr::first({{ date }}), + To = dplyr::last({{ date }})) %>% dplyr::mutate(is.complete = ifelse(no == na, 1, 0)) # 0 if all are missing detail.table.year <- detail.table.year %>% - dplyr::group_by({{stations}}, Element) %>% + dplyr::group_by({{ stations }}, Element) %>% dplyr::mutate(element.na = data.table::rleid(is.complete)) %>% dplyr::filter(is.complete == 1) %>% - dplyr::group_by(element.na, {{stations}}, Element) %>% + dplyr::group_by(element.na, {{ stations }}, Element) %>% dplyr::summarise(From = dplyr::first(From), To = dplyr::last(To), Count = n()) %>% From c9cdae76b8a73101acf5b7eb972c11d4788125ed Mon Sep 17 00:00:00 2001 From: ivanluv Date: Mon, 28 Sep 2020 12:14:26 +0300 Subject: [PATCH 175/277] Changing comments --- instat/dlgDisplayDailyData.vb | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/instat/dlgDisplayDailyData.vb b/instat/dlgDisplayDailyData.vb index 6e3e5bb3c9a..58374ceb19d 100644 --- a/instat/dlgDisplayDailyData.vb +++ b/instat/dlgDisplayDailyData.vb @@ -500,14 +500,23 @@ Public Class dlgDisplayDailyData End Sub '''-------------------------------------------------------------------------------------------- ''' - ''' If the station receiver is not empty and the multiple element receiver has more one element the - ''' facet combobox text is set to "Station-Element " and "Element - station" - '''If the station receiver is not empty and the multiple element receiver has no or one element the facet combobox - ''' text is set to "Station" - ''' If the station receiver is empty and the multiple element receiver has more than one element the facet combobox - ''' text is set to "Element" - ''' If the station receiver is empty and the multiple element receiver has no element the facet combobox - ''' text is set to "No Facets" + ''' Sets the facet combobox text: + ''' + ''' + ''' If the station receiver is not empty and the multiple element receiver has more + ''' one element then sets the facet combobox text to "Station-Element " and + ''' "Element - station" + ''' + ''' If the station receiver is not empty and the multiple element receiver has + ''' less than 2 elements then sets the facet combobox text to "Station" + ''' + ''' If the station receiver is empty and the multiple element receiver has 2 or + ''' more elements then sets the facet combobox text to "Element" + ''' + ''' If the station receiver is empty and the multiple element receiver has no + ''' elements then sets the facet combobox text to "No Facets" + ''' + ''' ''' '''-------------------------------------------------------------------------------------------- Private Sub SetFacetItems() From 78ef4b4b1d3e7a24d225b800b42e9a30dd820685 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Mon, 28 Sep 2020 13:46:19 +0300 Subject: [PATCH 176/277] dlgCalculator height changes --- instat/dlgCalculator.resx | 9 +++---- instat/dlgCalculator.vb | 49 +++++++++++++-------------------------- 2 files changed, 19 insertions(+), 39 deletions(-) diff --git a/instat/dlgCalculator.resx b/instat/dlgCalculator.resx index 20cb163f830..7b793cb9243 100644 --- a/instat/dlgCalculator.resx +++ b/instat/dlgCalculator.resx @@ -119,7 +119,7 @@ - 1, 372 + 10, 359 @@ -145,7 +145,7 @@ 0 - 12, 5 + 10, 5 4, 4, 4, 4 @@ -175,10 +175,7 @@ 6, 13 - 517, 429 - - - NoControl + 507, 421 2, 3, 2, 3 diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index c27eff966f6..d5834248374 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -15,24 +15,21 @@ ' along with this program. If not, see . Imports instat.Translations -Imports RDotNet Public Class dlgCalculator Dim clsAttach As New RFunction Dim clsDetach As New RFunction Public bFirstLoad As Boolean = True Public iHelpCalcID As Integer + + 'holds the original width of the form Private iBasicWidth As Integer - Private iBaseY As Integer - Private iBaseHeight As Integer Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) If bFirstLoad Then InitialiseDialog() iBasicWidth = Me.Width - iBaseHeight = Me.Height - iBaseY = ucrBase.Location.Y SetDefaults() bFirstLoad = False Else @@ -121,47 +118,33 @@ Public Class dlgCalculator Private Sub CalculationsOptions() Select Case ucrCalc.ucrInputCalOptions.GetText Case "Maths" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.38, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.38 Case "Logical and Symbols" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.4 Case "Summary" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.43, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.43 Case "Strings (Character Columns)" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.47, iBaseHeight * 1.13) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY * 1.13) + Me.Width = iBasicWidth * 1.47 Case "Factor" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.4, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.4 Case "Probability" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.5, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.5 Case "Dates" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.3, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.3 Case "Transform" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.35, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.35 Case "Circular" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.36, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.36 Case "Wakefield" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.7, iBaseHeight * 1.18) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY * 1.18) + Me.Width = iBasicWidth * 1.7 Case "Modifier" - Me.Size = New Size(iBasicWidth * 1.39, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.39 Case "Symbols" - Me.Size = New Size(iBasicWidth * 2.56, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 2.56 Case "hydroGOF" - Me.Size = New System.Drawing.Size(iBasicWidth * 1.27, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth * 1.27 Case Else - Me.Size = New System.Drawing.Size(iBasicWidth, iBaseHeight) - ucrBase.Location = New Point(ucrBase.Location.X, iBaseY) + Me.Width = iBasicWidth End Select End Sub From ef42661888e81d52757519b428e01bba9a263556 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Mon, 28 Sep 2020 12:09:55 +0100 Subject: [PATCH 177/277] tidied code comments and documentation, commented unused variables --- instat/dlgTimeSeriesPlot.vb | 60 +++++++++++++++++++++++-------------- instat/sdgTimeSeries.vb | 8 ++--- 2 files changed, 41 insertions(+), 27 deletions(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index 9580b9a5198..d78bd074656 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -22,15 +22,20 @@ Public Class dlgTimeSeriesPlot Private bReset As Boolean = True Private bResetSubdialog As Boolean = True - ' Constants - ' These store the names of the selected columns. This is used to ensure old parameters are correctly removed from dplyr::mutate when selected columns are changed. + ' These store the names of the selected reference/estimates columns. + ' This is used to ensure old parameters are correctly removed from dplyr::mutate when selected columns are changed. ' See ucrReceiverEstimates.ControlValueChanged and ucrReceiverReference.ControlValueChanged event handles for their use. - Private strEstimates As String = "" + ''' Store the name of the selected reference column. Private strReference As String = "" - ' The name of the "names" column when the data is stacked - Private strName As String = "data" - ' The name of the "values" column when the data is stacked - Private strValue As String = "value" + ''' Store the name of the selected estimates column. + Private strEstimates As String = "" + + ' Constants + ' + ''' The name of the "names" column when the data is stacked + Private Const strName As String = "data" + ''' The name of the "values" column when the data is stacked + Private Const strValue As String = "value" ' Adjust NA values ' These functions construct the R code below if ucrChkNAValues is checked. This ensures the two columns have the same missing values. @@ -109,13 +114,19 @@ Public Class dlgTimeSeriesPlot Private clsRoundRSd As RFunction Private clsRoundKge As RFunction - ' A dictionary of the comparison/individual summary functions above. + ' Dictionaries of the comparison/individual summary functions above. ' The key is the summary name in lower case e.g. "bias" ' The value is a tuple of two RFunctions. ' Item1 is the summary function. ' Item2 is the paste function containing the summary. ' These dictionary are created to avoid passing all the RFunctions to the sub dialog individually. + ''' + ''' A dictionary of the comparison summary functions. The key is the summary name in lower case e.g. "bias". The value is a tuple of two RFunctions: the summary function and it's paste function. + ''' Private dctComparisonSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) + ''' + ''' A dictionary of the individual summary functions. The key is the summary name in lower case e.g. "mean". The value is a tuple of two RFunctions: the summary function and it's paste function. + ''' Private dctIndividualSummaries As Dictionary(Of String, Tuple(Of RFunction, RFunction)) ' ggplot functions @@ -143,15 +154,16 @@ Public Class dlgTimeSeriesPlot Private clsEstimatesPasteLabel As RFunction Private clsEstimatesFilter As RFunction - Private clsLabsFunction As New RFunction - Private clsXlabsFunction As New RFunction - Private clsYlabFunction As New RFunction - Private clsXScaleContinuousFunction As New RFunction - Private clsYScaleContinuousFunction As New RFunction + ' These will be needed when the dialog implements the Plot Options subdialog + 'Private clsLabsFunction As New RFunction + 'Private clsXlabsFunction As New RFunction + 'Private clsYlabFunction As New RFunction + 'Private clsXScaleContinuousFunction As New RFunction + 'Private clsYScaleContinuousFunction As New RFunction Private clsFacetFunction As New RFunction Private clsFacetOperator As New ROperator - Private clsThemeFunction As New RFunction - Private dctThemeFunctions As Dictionary(Of String, RFunction) + 'Private clsThemeFunction As New RFunction + 'Private dctThemeFunctions As Dictionary(Of String, RFunction) 'Parameter names for geoms Private strGeomLineParameterName As String = "geom_line" @@ -161,7 +173,8 @@ Public Class dlgTimeSeriesPlot Private strGeomTextEstimatesParameterName As String = "estimates_geom_text" Private strGeomTextComparisonParameterName As String = "comparison_geom_text" Private strGeomSmoothParameterName As String = "geom_smooth" - Private strGeomParameterNames() As String = {strGeomLineParameterName, strGeomPointParameterName, strGeomHLineParameterName, strGeomTextReferenceParameterName, strGeomTextEstimatesParameterName, strGeomTextComparisonParameterName} + ' This will be needed when the dialog implements the Plot Options subdialog + 'Private strGeomParameterNames() As String = {strGeomLineParameterName, strGeomPointParameterName, strGeomHLineParameterName, strGeomTextReferenceParameterName, strGeomTextEstimatesParameterName, strGeomTextComparisonParameterName} Private Sub dlgTimeSeriesPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) @@ -648,13 +661,14 @@ Public Class dlgTimeSeriesPlot clsFacetOperator.bForceIncludeOperation = True clsGgplotOperator.AddParameter(GgplotDefaults.clsDefaultThemeParameter.Clone()) - clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() - clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() - clsXScaleContinuousFunction = GgplotDefaults.clsXScalecontinuousFunction.Clone() - clsYScaleContinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone() - clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone - clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction.Clone() - dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions) + ' Commented until Plot Options subdialog is implemented. + 'clsXlabsFunction = GgplotDefaults.clsXlabTitleFunction.Clone() + 'clsLabsFunction = GgplotDefaults.clsDefaultLabs.Clone() + 'clsXScaleContinuousFunction = GgplotDefaults.clsXScalecontinuousFunction.Clone() + 'clsYScaleContinuousFunction = GgplotDefaults.clsYScalecontinuousFunction.Clone() + 'clsYlabFunction = GgplotDefaults.clsYlabTitleFunction.Clone + 'clsThemeFunction = GgplotDefaults.clsDefaultThemeFunction.Clone() + 'dctThemeFunctions = New Dictionary(Of String, RFunction)(GgplotDefaults.dctThemeFunctions) clsGgplotOperator.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorTimeSeriesPlots.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") ucrBase.clsRsyntax.SetBaseROperator(clsGgplotOperator) diff --git a/instat/sdgTimeSeries.vb b/instat/sdgTimeSeries.vb index 7cd78aa9c7c..23dafa59289 100644 --- a/instat/sdgTimeSeries.vb +++ b/instat/sdgTimeSeries.vb @@ -25,10 +25,10 @@ Public Class sdgTimeSeries Private strGeomTextEstimatesParameterName As String = "estimates_geom_text" Private strGeomTextComparisonParameterName As String = "comparison_geom_text" - Private strTopLeft As String = "Top Left" - Private strTopRight As String = "Top Right" - Private strBottomLeft As String = "Bottom Left" - Private strBottomRight As String = "Bottom Right" + Private Const strTopLeft As String = "Top Left" + Private Const strTopRight As String = "Top Right" + Private Const strBottomLeft As String = "Bottom Left" + Private Const strBottomRight As String = "Bottom Right" Private clsComparisonSummariesSummarise As RFunction Private clsIndividualSummariesSummarise As RFunction From 944a857466673f94ebc59547f335da076148899f Mon Sep 17 00:00:00 2001 From: Lily Clements Date: Mon, 28 Sep 2020 13:00:29 +0100 Subject: [PATCH 178/277] make_inventory_plot fix --- instat/static/InstatObject/R/data_object_R6.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index 4f7216f4070..f2a6ef502c6 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -2467,7 +2467,7 @@ DataSheet$set("public","make_inventory_plot", function(date_col, station_col = N if(is.null(year_col)) { if(is_climatic) { if(is.null(self$get_climatic_column_name(year_label))) { - self$split_date(col_name = date_col, year = TRUE) + self$split_date(col_name = date_col, year_val = TRUE) } year_col <- self$get_climatic_column_name(year_label) } From c924b8e370ce16f42239b0f4f319082c13f1bbf8 Mon Sep 17 00:00:00 2001 From: N-thony Date: Wed, 30 Sep 2020 11:59:28 +0200 Subject: [PATCH 179/277] Still working on summry --- instat/dlgInventoryPlot.designer.vb | 176 ++++++++++++++-------------- instat/dlgInventoryPlot.resx | 3 + instat/dlgInventoryPlot.vb | 66 +++++++---- 3 files changed, 133 insertions(+), 112 deletions(-) diff --git a/instat/dlgInventoryPlot.designer.vb b/instat/dlgInventoryPlot.designer.vb index 9a0108b0499..e86e3b7c223 100644 --- a/instat/dlgInventoryPlot.designer.vb +++ b/instat/dlgInventoryPlot.designer.vb @@ -49,31 +49,31 @@ Partial Class dlgInventoryPlot Me.rdoElementOrder = New System.Windows.Forms.RadioButton() Me.rdoDateOrder = New System.Windows.Forms.RadioButton() Me.grpOptions = New System.Windows.Forms.GroupBox() - Me.ucrChkOmitStart = New instat.ucrCheck() - Me.ucrChkOmitEnd = New instat.ucrCheck() - Me.ucrChkDetails = New instat.ucrCheck() - Me.ucrPnlOrder = New instat.UcrPanel() - Me.ucrChkSummary = New instat.ucrCheck() Me.grpDetailsOptions = New System.Windows.Forms.GroupBox() - Me.ucrChkMinute = New instat.ucrCheck() - Me.ucrSaveDetails = New instat.ucrSave() - Me.ucrChkSecond = New instat.ucrCheck() - Me.ucrChkMonth = New instat.ucrCheck() - Me.ucrChkHour = New instat.ucrCheck() - Me.ucrChkYear = New instat.ucrCheck() - Me.ucrChkDay = New instat.ucrCheck() Me.lblGraphTitle = New System.Windows.Forms.Label() Me.grpPlotType = New System.Windows.Forms.GroupBox() Me.rdoyear_doy_plot = New System.Windows.Forms.RadioButton() Me.rdoDatePlot = New System.Windows.Forms.RadioButton() - Me.ucrPnlPlotType = New instat.UcrPanel() Me.lblFacetBy = New System.Windows.Forms.Label() Me.ucrChkDisplayRainDays = New instat.ucrCheck() + Me.ucrPnlPlotType = New instat.UcrPanel() Me.ucrInputFacetBy = New instat.ucrInputComboBox() Me.ucrInputTitle = New instat.ucrInputTextBox() Me.ucrChkShowNonMissing = New instat.ucrCheck() Me.ucrSaveGraph = New instat.ucrSave() Me.ucrChkFlipCoordinates = New instat.ucrCheck() + Me.ucrChkMinute = New instat.ucrCheck() + Me.ucrSaveDetails = New instat.ucrSave() + Me.ucrChkSecond = New instat.ucrCheck() + Me.ucrChkMonth = New instat.ucrCheck() + Me.ucrChkHour = New instat.ucrCheck() + Me.ucrChkYear = New instat.ucrCheck() + Me.ucrChkDay = New instat.ucrCheck() + Me.ucrChkOmitStart = New instat.ucrCheck() + Me.ucrChkOmitEnd = New instat.ucrCheck() + Me.ucrChkDetails = New instat.ucrCheck() + Me.ucrPnlOrder = New instat.UcrPanel() + Me.ucrChkSummary = New instat.ucrCheck() Me.ucrPnlOptions = New instat.UcrPanel() Me.ucrReceiverDate = New instat.ucrReceiverSingle() Me.ucrReceiverElements = New instat.ucrReceiverMultiple() @@ -157,35 +157,6 @@ Partial Class dlgInventoryPlot Me.grpOptions.Name = "grpOptions" Me.grpOptions.TabStop = False ' - 'ucrChkOmitStart - ' - Me.ucrChkOmitStart.Checked = False - resources.ApplyResources(Me.ucrChkOmitStart, "ucrChkOmitStart") - Me.ucrChkOmitStart.Name = "ucrChkOmitStart" - ' - 'ucrChkOmitEnd - ' - Me.ucrChkOmitEnd.Checked = False - resources.ApplyResources(Me.ucrChkOmitEnd, "ucrChkOmitEnd") - Me.ucrChkOmitEnd.Name = "ucrChkOmitEnd" - ' - 'ucrChkDetails - ' - Me.ucrChkDetails.Checked = False - resources.ApplyResources(Me.ucrChkDetails, "ucrChkDetails") - Me.ucrChkDetails.Name = "ucrChkDetails" - ' - 'ucrPnlOrder - ' - resources.ApplyResources(Me.ucrPnlOrder, "ucrPnlOrder") - Me.ucrPnlOrder.Name = "ucrPnlOrder" - ' - 'ucrChkSummary - ' - Me.ucrChkSummary.Checked = False - resources.ApplyResources(Me.ucrChkSummary, "ucrChkSummary") - Me.ucrChkSummary.Name = "ucrChkSummary" - ' 'grpDetailsOptions ' Me.grpDetailsOptions.Controls.Add(Me.ucrChkMinute) @@ -199,47 +170,6 @@ Partial Class dlgInventoryPlot Me.grpDetailsOptions.Name = "grpDetailsOptions" Me.grpDetailsOptions.TabStop = False ' - 'ucrChkMinute - ' - Me.ucrChkMinute.Checked = False - resources.ApplyResources(Me.ucrChkMinute, "ucrChkMinute") - Me.ucrChkMinute.Name = "ucrChkMinute" - ' - 'ucrSaveDetails - ' - resources.ApplyResources(Me.ucrSaveDetails, "ucrSaveDetails") - Me.ucrSaveDetails.Name = "ucrSaveDetails" - ' - 'ucrChkSecond - ' - Me.ucrChkSecond.Checked = False - resources.ApplyResources(Me.ucrChkSecond, "ucrChkSecond") - Me.ucrChkSecond.Name = "ucrChkSecond" - ' - 'ucrChkMonth - ' - Me.ucrChkMonth.Checked = False - resources.ApplyResources(Me.ucrChkMonth, "ucrChkMonth") - Me.ucrChkMonth.Name = "ucrChkMonth" - ' - 'ucrChkHour - ' - Me.ucrChkHour.Checked = False - resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") - Me.ucrChkHour.Name = "ucrChkHour" - ' - 'ucrChkYear - ' - Me.ucrChkYear.Checked = False - resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") - Me.ucrChkYear.Name = "ucrChkYear" - ' - 'ucrChkDay - ' - Me.ucrChkDay.Checked = False - resources.ApplyResources(Me.ucrChkDay, "ucrChkDay") - Me.ucrChkDay.Name = "ucrChkDay" - ' 'lblGraphTitle ' resources.ApplyResources(Me.lblGraphTitle, "lblGraphTitle") @@ -268,11 +198,6 @@ Partial Class dlgInventoryPlot Me.rdoDatePlot.TabStop = True Me.rdoDatePlot.UseVisualStyleBackColor = True ' - 'ucrPnlPlotType - ' - resources.ApplyResources(Me.ucrPnlPlotType, "ucrPnlPlotType") - Me.ucrPnlPlotType.Name = "ucrPnlPlotType" - ' 'lblFacetBy ' resources.ApplyResources(Me.lblFacetBy, "lblFacetBy") @@ -284,6 +209,11 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrChkDisplayRainDays, "ucrChkDisplayRainDays") Me.ucrChkDisplayRainDays.Name = "ucrChkDisplayRainDays" ' + 'ucrPnlPlotType + ' + resources.ApplyResources(Me.ucrPnlPlotType, "ucrPnlPlotType") + Me.ucrPnlPlotType.Name = "ucrPnlPlotType" + ' 'ucrInputFacetBy ' Me.ucrInputFacetBy.AddQuotesIfUnrecognised = True @@ -317,6 +247,76 @@ Partial Class dlgInventoryPlot resources.ApplyResources(Me.ucrChkFlipCoordinates, "ucrChkFlipCoordinates") Me.ucrChkFlipCoordinates.Name = "ucrChkFlipCoordinates" ' + 'ucrChkMinute + ' + Me.ucrChkMinute.Checked = False + resources.ApplyResources(Me.ucrChkMinute, "ucrChkMinute") + Me.ucrChkMinute.Name = "ucrChkMinute" + ' + 'ucrSaveDetails + ' + resources.ApplyResources(Me.ucrSaveDetails, "ucrSaveDetails") + Me.ucrSaveDetails.Name = "ucrSaveDetails" + ' + 'ucrChkSecond + ' + Me.ucrChkSecond.Checked = False + resources.ApplyResources(Me.ucrChkSecond, "ucrChkSecond") + Me.ucrChkSecond.Name = "ucrChkSecond" + ' + 'ucrChkMonth + ' + Me.ucrChkMonth.Checked = False + resources.ApplyResources(Me.ucrChkMonth, "ucrChkMonth") + Me.ucrChkMonth.Name = "ucrChkMonth" + ' + 'ucrChkHour + ' + Me.ucrChkHour.Checked = False + resources.ApplyResources(Me.ucrChkHour, "ucrChkHour") + Me.ucrChkHour.Name = "ucrChkHour" + ' + 'ucrChkYear + ' + Me.ucrChkYear.Checked = False + resources.ApplyResources(Me.ucrChkYear, "ucrChkYear") + Me.ucrChkYear.Name = "ucrChkYear" + ' + 'ucrChkDay + ' + Me.ucrChkDay.Checked = False + resources.ApplyResources(Me.ucrChkDay, "ucrChkDay") + Me.ucrChkDay.Name = "ucrChkDay" + ' + 'ucrChkOmitStart + ' + Me.ucrChkOmitStart.Checked = False + resources.ApplyResources(Me.ucrChkOmitStart, "ucrChkOmitStart") + Me.ucrChkOmitStart.Name = "ucrChkOmitStart" + ' + 'ucrChkOmitEnd + ' + Me.ucrChkOmitEnd.Checked = False + resources.ApplyResources(Me.ucrChkOmitEnd, "ucrChkOmitEnd") + Me.ucrChkOmitEnd.Name = "ucrChkOmitEnd" + ' + 'ucrChkDetails + ' + Me.ucrChkDetails.Checked = False + resources.ApplyResources(Me.ucrChkDetails, "ucrChkDetails") + Me.ucrChkDetails.Name = "ucrChkDetails" + ' + 'ucrPnlOrder + ' + resources.ApplyResources(Me.ucrPnlOrder, "ucrPnlOrder") + Me.ucrPnlOrder.Name = "ucrPnlOrder" + ' + 'ucrChkSummary + ' + Me.ucrChkSummary.Checked = False + resources.ApplyResources(Me.ucrChkSummary, "ucrChkSummary") + Me.ucrChkSummary.Name = "ucrChkSummary" + ' 'ucrPnlOptions ' resources.ApplyResources(Me.ucrPnlOptions, "ucrPnlOptions") diff --git a/instat/dlgInventoryPlot.resx b/instat/dlgInventoryPlot.resx index 091cf70917a..22030ed9f00 100644 --- a/instat/dlgInventoryPlot.resx +++ b/instat/dlgInventoryPlot.resx @@ -1137,6 +1137,9 @@ 23 + + NoControl + CenterScreen diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index af3735678c2..963ddc4b054 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -71,14 +71,11 @@ Public Class dlgInventoryPlot ucrReceiverStation.SetParameterIsString() ucrReceiverStation.strSelectorHeading = "Factors" - ucrChkSummary.AddFunctionNamesCondition(True, "climatic_missing") + ucrChkSummary.AddRSyntaxContainsFunctionNamesCondition(True, {"climatic_missing"}) ucrChkSummary.SetText("Summary") - 'ucrChkSummary.SetRDefault("TRUE") - ucrChkDetails.AddRSyntaxContainsFunctionNamesCondition(True, {"climatic_details"}) ucrChkDetails.SetText("Details") - ucrChkDetails.SetRDefault("FALSE") ucrChkOmitStart.SetParameter(New RParameter("start", 4)) ucrChkOmitStart.SetText("Omit Start") @@ -110,7 +107,7 @@ Public Class dlgInventoryPlot ucrSaveDetails.SetSaveTypeAsDataFrame() ucrSaveDetails.SetDataFrameSelector(ucrInventoryPlotSelector.ucrAvailableDataFrames) ucrSaveDetails.SetIsComboBox() - 'ucrSaveDetails.SetAssignToIfUncheckedValue("last_details") + ' ucrSaveDetails.SetAssignToIfUncheckedValue("last_details") ' ucrChkHour.SetParameter(New RParameter("", 13)) ucrChkHour.SetText("Hour") @@ -158,7 +155,7 @@ Public Class dlgInventoryPlot ucrPnlOptions.AddRadioButton(rdoMissing) ucrPnlOptions.AddRadioButton(rdoGraph) - ucrPnlOptions.AddFunctionNamesCondition(rdoMissing, "climatic_missing") + ucrPnlOptions.AddFunctionNamesCondition(rdoMissing, {"climatic_missing", "climatic_details"}) ucrPnlOptions.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") ucrPnlOptions.AddToLinkedControls({ucrChkDisplayRainDays, ucrChkFlipCoordinates, ucrChkShowNonMissing, ucrPnlPlotType, ucrSaveGraph, ucrInputTitle, ucrInputFacetBy}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls({ucrChkSummary, ucrChkDetails}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -206,14 +203,13 @@ Public Class dlgInventoryPlot clsDefaultRFunction.AddParameter("year_doy_plot", "FALSE") clsDefaultRFunction.AddParameter("facet_by", "NULL") clsDefaultRFunction.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") - 'clsClimaticDetails.SetAssignTo("", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strDataFrameNames:="") + ' clsClimaticDetails.SetAssignTo("last_details", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, "last_details") clsClimaticMissing.SetRCommand("climatic_missing") clsClimaticDetails.SetRCommand("climatic_details") - clsClimaticDetails.iCallType = 2 ucrBase.clsRsyntax.ClearCodes() - ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) + ucrBase.clsRsyntax.AddToBeforeCodes(clsDefaultRFunction, iPosition:=0) + 'ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) - TestOkEnabled() End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -238,7 +234,7 @@ Public Class dlgInventoryPlot ucrPnlPlotType.SetRCode(clsDefaultRFunction, bReset) ucrInputFacetBy.SetRCode(clsDefaultRFunction, bReset) ucrSaveGraph.SetRCode(clsDefaultRFunction, bReset) - ucrChkSummary.SetRCode(clsClimaticMissing, bReset) + ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkDetails.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkYear.SetRCode(clsClimaticDetails, bReset) ucrChkMonth.SetRCode(clsClimaticDetails, bReset) @@ -251,10 +247,18 @@ Public Class dlgInventoryPlot End Sub Private Sub TestOkEnabled() - If (Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty) Then - ucrBase.OKEnabled(True) + If rdoGraph.Checked Then + If (Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrSaveGraph.IsComplete) Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If Else - ucrBase.OKEnabled(False) + If (Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso (ucrChkSummary.Checked OrElse (ucrChkDetails.Checked AndAlso ucrSaveDetails.IsComplete AndAlso (ucrChkYear.Checked OrElse ucrChkMonth.Checked OrElse ucrChkDay.Checked OrElse ucrChkHour.Checked OrElse ucrChkMinute.Checked OrElse ucrChkSecond.Checked)))) Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If End If End Sub @@ -270,31 +274,36 @@ Public Class dlgInventoryPlot TestOkEnabled() End Sub - Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged + Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveGraph.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrChkSummary.ControlValueChanged, ucrChkDetails.ControlValueChanged, ucrChkYear.ControlValueChanged, ucrChkMonth.ControlValueChanged, ucrChkDay.ControlValueChanged, ucrChkHour.ControlValueChanged, ucrChkMinute.ControlValueChanged, ucrChkSecond.ControlValueChanged TestOkEnabled() End Sub Private Sub ChangeFunction() If ucrChkSummary.Checked Then - ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticMissing) - ucrBase.clsRsyntax.iCallType = 2 + clsCurrInvFunction = clsClimaticMissing + ElseIf ucrChkDetails.Checked Then + clsCurrInvFunction = clsClimaticDetails End If End Sub Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoMissing.Checked Then - ChangeFunction() + ' ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticMissing) + ucrBase.clsRsyntax.iCallType = 2 grpOptions.Location = New Point(grpOptions.Location.X, iPnlSummaryY / 1.05) grpDetailsOptions.Location = New Point(grpDetailsOptions.Location.X, iPnlDetailsY / 1.04) cmdInventoryPlotOptions.Visible = False cmdOptions.Visible = False - clsCurrInvFunction = clsClimaticMissing - Else - ucrBase.clsRsyntax.ClearCodes() - ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) + ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsDefaultRFunction) + ' ChangeFunction() + ElseIf rdoGraph.Checked Then + ' ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) + clsDefaultRFunction.bExcludeAssignedFunctionOutput = False ucrBase.clsRsyntax.iCallType = 3 + ucrBase.clsRsyntax.AddToBeforeCodes(clsDefaultRFunction, iPosition:=0) cmdInventoryPlotOptions.Visible = True cmdOptions.Visible = True - clsCurrInvFunction = clsDefaultRFunction + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing) + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticDetails) End If End Sub @@ -314,9 +323,18 @@ Public Class dlgInventoryPlot Private Sub ucrChkDetails_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDetails.ControlValueChanged If ucrChkDetails.Checked Then - ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticDetails) + ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticDetails, iPosition:=1) + ucrBase.clsRsyntax.iCallType = 2 Else ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticDetails) End If End Sub + Private Sub ucrChkSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSummary.ControlValueChanged + If ucrChkSummary.Checked Then + ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=2) + ucrBase.clsRsyntax.iCallType = 2 + Else + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing) + End If + End Sub End Class \ No newline at end of file From 80555f4fc874d3537be3e99d2308f66d8abc7aaa Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 30 Sep 2020 15:03:51 +0300 Subject: [PATCH 180/277] Bug fixes --- instat/dlgInventoryPlot.vb | 176 +++++++++++++++---------------------- 1 file changed, 73 insertions(+), 103 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 963ddc4b054..979c091b153 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -18,18 +18,12 @@ Imports instat.Translations Public Class dlgInventoryPlot Private bFirstLoad As Boolean = True Private bReset As Boolean = True - Private clsDefaultRFunction As New RFunction - Private clsClimaticMissing As New RFunction - Private clsClimaticDetails As New RFunction - Private clsCurrInvFunction As New RFunction - - Private iPnlSummaryY As Integer - Private iPnlDetailsY As Integer + Private clsInventoryPlot As RFunction + Private clsClimaticMissing As RFunction + Private clsClimaticDetails As RFunction Private Sub dlgInventoryPlot_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then - iPnlSummaryY = grpOptions.Location.Y - iPnlDetailsY = grpDetailsOptions.Location.Y InitialiseDialog() bFirstLoad = False End If @@ -42,33 +36,29 @@ Public Class dlgInventoryPlot End Sub Private Sub InitialiseDialog() - ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False + Dim dctFacetByPairs As New Dictionary(Of String, String) + Dim lstCmdControls As New List(Of Control) ucrBase.iHelpTopicID = 359 - ucrBase.clsRsyntax.iCallType = 3 + ucrInventoryPlotSelector.SetParameter(New RParameter("data_name", 0)) ucrInventoryPlotSelector.SetParameterIsString() - ucrReceiverDate.SetParameter(New RParameter("date_col", 1)) ucrReceiverDate.Selector = ucrInventoryPlotSelector ucrReceiverDate.SetClimaticType("date") ucrReceiverDate.SetIncludedDataTypes({"Date"}) ucrReceiverDate.bAutoFill = True ucrReceiverDate.SetParameterIsString() - 'ucrReceiverDate.bWithQuotes = False ucrReceiverDate.strSelectorHeading = "Date" ucrReceiverElements.SetParameter(New RParameter("element_cols", 2)) ucrReceiverElements.Selector = ucrInventoryPlotSelector ucrReceiverElements.SetParameterIsString() - ' ucrReceiverElements.bWithQuotes = False ucrReceiverElements.strSelectorHeading = "Numerics" - ucrReceiverStation.SetParameter(New RParameter("station_col", 3)) ucrReceiverStation.Selector = ucrInventoryPlotSelector ucrReceiverStation.SetClimaticType("station") ucrReceiverStation.bAutoFill = True - ucrReceiverStation.SetParameterIsString() ucrReceiverStation.strSelectorHeading = "Factors" ucrChkSummary.AddRSyntaxContainsFunctionNamesCondition(True, {"climatic_missing"}) @@ -146,6 +136,16 @@ Public Class dlgInventoryPlot ucrPnlPlotType.AddRadioButton(rdoDatePlot, "FALSE") ucrPnlPlotType.SetRDefault("FALSE") + ucrInputFacetBy.SetParameter(New RParameter("facet_by", 8)) + dctFacetByPairs.Add("Default", "NULL") + dctFacetByPairs.Add("Elements", Chr(34) & "elements" & Chr(34)) + dctFacetByPairs.Add("Stations", Chr(34) & "stations" & Chr(34)) + dctFacetByPairs.Add("Stations-Elements", Chr(34) & "stations-elements" & Chr(34)) + dctFacetByPairs.Add("Elements-Stations", Chr(34) & "elements-stations" & Chr(34)) + ucrInputFacetBy.SetItems(dctFacetByPairs) + ucrInputFacetBy.SetRDefault("NULL") + ucrInputFacetBy.SetDropDownStyleAsNonEditable() + ucrSaveGraph.SetPrefix("Inventory") ucrSaveGraph.SetSaveTypeAsGraph() ucrSaveGraph.SetDataFrameSelector(ucrInventoryPlotSelector.ucrAvailableDataFrames) @@ -155,8 +155,9 @@ Public Class dlgInventoryPlot ucrPnlOptions.AddRadioButton(rdoMissing) ucrPnlOptions.AddRadioButton(rdoGraph) - ucrPnlOptions.AddFunctionNamesCondition(rdoMissing, {"climatic_missing", "climatic_details"}) - ucrPnlOptions.AddFunctionNamesCondition(rdoGraph, frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") + ucrPnlOptions.AddRSyntaxContainsFunctionNamesCondition(rdoMissing, {"climatic_missing", "climatic_details"}) + ucrPnlOptions.AddRSyntaxContainsFunctionNamesCondition(rdoGraph, {frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot"}) + ucrPnlOptions.AddToLinkedControls({ucrChkDisplayRainDays, ucrChkFlipCoordinates, ucrChkShowNonMissing, ucrPnlPlotType, ucrSaveGraph, ucrInputTitle, ucrInputFacetBy}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls({ucrChkSummary, ucrChkDetails}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -170,24 +171,12 @@ Public Class dlgInventoryPlot ucrPnlPlotType.SetLinkedDisplayControl(grpPlotType) ucrInputTitle.SetLinkedDisplayControl(lblGraphTitle) ucrInputFacetBy.SetLinkedDisplayControl(lblFacetBy) - - Dim dctFacetByPairs As New Dictionary(Of String, String) - ucrInputFacetBy.SetParameter(New RParameter("facet_by", 8)) - dctFacetByPairs.Add("Default", "NULL") - dctFacetByPairs.Add("Elements", Chr(34) & "elements" & Chr(34)) - dctFacetByPairs.Add("Stations", Chr(34) & "stations" & Chr(34)) - dctFacetByPairs.Add("Stations-Elements", Chr(34) & "stations-elements" & Chr(34)) - dctFacetByPairs.Add("Elements-Stations", Chr(34) & "elements-stations" & Chr(34)) - ucrInputFacetBy.SetItems(dctFacetByPairs) - ucrInputFacetBy.SetRDefault("NULL") - ucrInputFacetBy.SetDropDownStyleAsNonEditable() - - - + lstCmdControls.AddRange({cmdInventoryPlotOptions, cmdOptions}) + ucrChkFlipCoordinates.SetLinkedDisplayControl(lstCmdControls) End Sub Private Sub SetDefaults() - clsDefaultRFunction = New RFunction + clsInventoryPlot = New RFunction clsClimaticMissing = New RFunction clsClimaticDetails = New RFunction @@ -196,44 +185,40 @@ Public Class dlgInventoryPlot ucrSaveGraph.Reset() ucrSaveDetails.Reset() - clsCurrInvFunction = clsDefaultRFunction + clsInventoryPlot.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") + clsInventoryPlot.AddParameter("coord_flip", "FALSE") + clsInventoryPlot.AddParameter("year_doy_plot", "FALSE") + clsInventoryPlot.AddParameter("facet_by", "NULL") + clsInventoryPlot.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") - clsDefaultRFunction.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") - clsDefaultRFunction.AddParameter("coord_flip", "FALSE") - clsDefaultRFunction.AddParameter("year_doy_plot", "FALSE") - clsDefaultRFunction.AddParameter("facet_by", "NULL") - clsDefaultRFunction.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") - ' clsClimaticDetails.SetAssignTo("last_details", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, "last_details") clsClimaticMissing.SetRCommand("climatic_missing") + clsClimaticDetails.SetRCommand("climatic_details") - ucrBase.clsRsyntax.ClearCodes() - ucrBase.clsRsyntax.AddToBeforeCodes(clsDefaultRFunction, iPosition:=0) - 'ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) + clsClimaticDetails.SetAssignTo("last_details", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempTable:="last_details") + ucrBase.clsRsyntax.ClearCodes() + ucrBase.clsRsyntax.AddToBeforeCodes(clsInventoryPlot, iPosition:=0) End Sub Private Sub SetRCodeForControls(bReset As Boolean) ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("data", 0), iAdditionalPairNo:=1) ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("date", 1), iAdditionalPairNo:=1) ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("elements", 2), iAdditionalPairNo:=1) - ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("stations", 3), iAdditionalPairNo:=1) ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("data", 0), iAdditionalPairNo:=2) ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("date", 1), iAdditionalPairNo:=2) ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("elements", 2), iAdditionalPairNo:=2) - ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("stations", 3), iAdditionalPairNo:=2) - - ucrInventoryPlotSelector.SetRCode(clsDefaultRFunction, bReset) - ucrReceiverDate.SetRCode(clsDefaultRFunction, bReset) - ucrReceiverStation.SetRCode(clsDefaultRFunction, bReset) - ucrReceiverElements.SetRCode(clsDefaultRFunction, bReset) - ucrChkFlipCoordinates.SetRCode(clsDefaultRFunction, bReset) - ucrInputTitle.SetRCode(clsDefaultRFunction, bReset) - ucrChkDisplayRainDays.SetRCode(clsDefaultRFunction, bReset) - ucrChkShowNonMissing.SetRCode(clsDefaultRFunction, bReset) - ucrPnlPlotType.SetRCode(clsDefaultRFunction, bReset) - ucrInputFacetBy.SetRCode(clsDefaultRFunction, bReset) - ucrSaveGraph.SetRCode(clsDefaultRFunction, bReset) + + ucrInventoryPlotSelector.SetRCode(clsInventoryPlot, bReset) + ucrReceiverDate.SetRCode(clsInventoryPlot, bReset) + ucrReceiverElements.SetRCode(clsInventoryPlot, bReset) + ucrChkFlipCoordinates.SetRCode(clsInventoryPlot, bReset) + ucrInputTitle.SetRCode(clsInventoryPlot, bReset) + ucrChkDisplayRainDays.SetRCode(clsInventoryPlot, bReset) + ucrChkShowNonMissing.SetRCode(clsInventoryPlot, bReset) + ucrPnlPlotType.SetRCode(clsInventoryPlot, bReset) + ucrInputFacetBy.SetRCode(clsInventoryPlot, bReset) + ucrSaveGraph.SetRCode(clsInventoryPlot, bReset) ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkDetails.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkYear.SetRCode(clsClimaticDetails, bReset) @@ -243,7 +228,7 @@ Public Class dlgInventoryPlot ucrChkOmitStart.SetRCode(clsClimaticMissing, bReset) ucrChkOmitEnd.SetRCode(clsClimaticMissing, bReset) ucrPnlOrder.SetRCode(clsClimaticDetails, bReset) - ucrPnlOptions.SetRCode(clsCurrInvFunction, bReset) + ucrPnlOptions.SetRSyntax(ucrBase.clsRsyntax, bReset) End Sub Private Sub TestOkEnabled() @@ -254,7 +239,7 @@ Public Class dlgInventoryPlot ucrBase.OKEnabled(False) End If Else - If (Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso (ucrChkSummary.Checked OrElse (ucrChkDetails.Checked AndAlso ucrSaveDetails.IsComplete AndAlso (ucrChkYear.Checked OrElse ucrChkMonth.Checked OrElse ucrChkDay.Checked OrElse ucrChkHour.Checked OrElse ucrChkMinute.Checked OrElse ucrChkSecond.Checked)))) Then + If (Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso (ucrChkSummary.Checked OrElse (ucrChkDetails.Checked AndAlso ucrSaveDetails.IsComplete AndAlso (ucrChkYear.Checked OrElse ucrChkMonth.Checked OrElse ucrChkDay.Checked OrElse ucrChkHour.Checked OrElse ucrChkMinute.Checked OrElse ucrChkSecond.Checked)))) AndAlso (ucrChkSummary.Checked OrElse ucrChkDetails.Checked) Then ucrBase.OKEnabled(True) Else ucrBase.OKEnabled(False) @@ -274,67 +259,52 @@ Public Class dlgInventoryPlot TestOkEnabled() End Sub - Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveGraph.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrChkSummary.ControlValueChanged, ucrChkDetails.ControlValueChanged, ucrChkYear.ControlValueChanged, ucrChkMonth.ControlValueChanged, ucrChkDay.ControlValueChanged, ucrChkHour.ControlValueChanged, ucrChkMinute.ControlValueChanged, ucrChkSecond.ControlValueChanged - TestOkEnabled() - End Sub - Private Sub ChangeFunction() - If ucrChkSummary.Checked Then - clsCurrInvFunction = clsClimaticMissing - ElseIf ucrChkDetails.Checked Then - clsCurrInvFunction = clsClimaticDetails - End If - End Sub - Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoMissing.Checked Then - ' ucrBase.clsRsyntax.SetBaseRFunction(clsClimaticMissing) - ucrBase.clsRsyntax.iCallType = 2 - grpOptions.Location = New Point(grpOptions.Location.X, iPnlSummaryY / 1.05) - grpDetailsOptions.Location = New Point(grpDetailsOptions.Location.X, iPnlDetailsY / 1.04) - cmdInventoryPlotOptions.Visible = False - cmdOptions.Visible = False - ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsDefaultRFunction) - ' ChangeFunction() + ucrReceiverDate.SetParameterIsRFunction() + ucrInventoryPlotSelector.SetParameterIsrfunction() + ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsInventoryPlot) ElseIf rdoGraph.Checked Then - ' ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultRFunction) - clsDefaultRFunction.bExcludeAssignedFunctionOutput = False - ucrBase.clsRsyntax.iCallType = 3 - ucrBase.clsRsyntax.AddToBeforeCodes(clsDefaultRFunction, iPosition:=0) - cmdInventoryPlotOptions.Visible = True - cmdOptions.Visible = True - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing) - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticDetails) + ucrReceiverDate.SetParameterIsString() + ucrInventoryPlotSelector.SetParameterIsString() + ucrBase.clsRsyntax.ClearCodes() + ucrBase.clsRsyntax.AddToBeforeCodes(clsInventoryPlot, iPosition:=0) + clsInventoryPlot.iCallType = 3 + clsInventoryPlot.bExcludeAssignedFunctionOutput = False End If End Sub - Private Sub ucrPnls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlContentsChanged - If rdoGraph.Checked Then - ucrReceiverDate.SetParameterIsString() - ucrInventoryPlotSelector.SetParameterIsString() - ucrReceiverStation.SetParameterIsString() - ucrReceiverStation.bWithQuotes = True + Private Sub ucrChkSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSummary.ControlValueChanged + If ucrChkSummary.Checked Then + ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) + clsClimaticMissing.iCallType = 2 Else - ucrReceiverDate.SetParameterIsRFunction() - ucrReceiverStation.SetParameterIsString() - ucrReceiverStation.bWithQuotes = False - ucrInventoryPlotSelector.SetParameterIsrfunction() + ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing) End If End Sub Private Sub ucrChkDetails_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDetails.ControlValueChanged If ucrChkDetails.Checked Then - ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticDetails, iPosition:=1) - ucrBase.clsRsyntax.iCallType = 2 + ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticDetails, iPosition:=2) + clsClimaticDetails.iCallType = 2 Else ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticDetails) End If End Sub - Private Sub ucrChkSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSummary.ControlValueChanged - If ucrChkSummary.Checked Then - ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=2) - ucrBase.clsRsyntax.iCallType = 2 + + Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged + If Not ucrReceiverStation.IsEmpty Then + clsInventoryPlot.AddParameter("station_col", ucrReceiverStation.GetVariableNames, iPosition:=3) + clsClimaticDetails.AddParameter("station", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) + clsClimaticMissing.AddParameter("station", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) Else - ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing) + clsInventoryPlot.RemoveParameterByName("station_col") + clsClimaticDetails.RemoveParameterByName("station") + clsClimaticMissing.RemoveParameterByName("station") End If End Sub + + Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveGraph.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrChkSummary.ControlContentsChanged, ucrChkDetails.ControlContentsChanged, ucrChkYear.ControlContentsChanged, ucrChkMonth.ControlContentsChanged, ucrChkDay.ControlContentsChanged, ucrChkHour.ControlContentsChanged, ucrChkMinute.ControlContentsChanged, ucrChkSecond.ControlContentsChanged, ucrPnlOptions.ControlValueChanged + TestOkEnabled() + End Sub End Class \ No newline at end of file From 823b9c4d35f078d9e673a95f2a947fbe2f6ad14e Mon Sep 17 00:00:00 2001 From: N-thony Date: Thu, 1 Oct 2020 09:05:27 +0200 Subject: [PATCH 181/277] Fixing the bugs in the code and updating the R function --- instat/dlgInventoryPlot.vb | 13 ++++++------- .../static/InstatObject/R/stand_alone_functions.R | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 979c091b153..43a8ca57ac3 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -99,16 +99,16 @@ Public Class dlgInventoryPlot ucrSaveDetails.SetIsComboBox() ' ucrSaveDetails.SetAssignToIfUncheckedValue("last_details") - ' ucrChkHour.SetParameter(New RParameter("", 13)) - ucrChkHour.SetText("Hour") + ' ucrChkHour.SetParameter(New RParameter("", )) + ucrChkHour.SetText("Hour") ' this currently has no parameter associated with it ' ucrChkHour.SetRDefault("FALSE") - ' ucrChkMinute.SetParameter(New RParameter("", 13)) - ucrChkMinute.SetText("Minute") + ' ucrChkMinute.SetParameter(New RParameter("", )) + ucrChkMinute.SetText("Minute") ' this currently has no parameter associated with it ' ucrChkMinute.SetRDefault("FALSE") - ' ucrChkSecond.SetParameter(New RParameter("", 13)) - ucrChkSecond.SetText("Second") + ' ucrChkSecond.SetParameter(New RParameter("", )) + ucrChkSecond.SetText("Second") ' this currently has no parameter associated with it ' ucrChkSecond.SetRDefault("FALSE") ucrPnlOrder.SetParameter(New RParameter("order", 4)) @@ -192,7 +192,6 @@ Public Class dlgInventoryPlot clsInventoryPlot.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") clsClimaticMissing.SetRCommand("climatic_missing") - clsClimaticDetails.SetRCommand("climatic_details") clsClimaticDetails.SetAssignTo("last_details", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempTable:="last_details") diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 414b858dcda..eb153befe52 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1332,13 +1332,13 @@ climatic_missing <- function(data, date, elements = ..., stations, } # number and percentage missing - summary.data <- data.frame(data.stack %>% + summary.data <- data.stack %>% dplyr::group_by({{ stations }}, Element) %>% dplyr::filter(({{ date }}) >= start & ({{ date }}) <= end) %>% dplyr::summarise(From = dplyr::first(start), To = dplyr::last(end), Missing = sum(is.na(value)), - Percentage = sum(is.na(value))/n()*100)) + `%` = sum(is.na(value))/n()*100) # complete years complete.years <- data.stack %>% From a3156c5cf6a3f23f4d0d1cdbf5eba7a6b578231b Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 5 Oct 2020 10:39:40 +0300 Subject: [PATCH 182/277] minor edit --- instat/static/InstatObject/R/stand_alone_functions.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 762aa19b6c6..32c2fe18711 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1315,7 +1315,8 @@ add_t_range <- function(path, min_date, max_date) { add_nc <- function(path) { paste0(path, "data.nc") - +} + slope <- function(y, x) { x <- as.numeric(x) lm(y ~ x)$coefficients[2] From 0b794951d3fe59d24b4724010e65f5aecd2f3289 Mon Sep 17 00:00:00 2001 From: N-thony Date: Tue, 6 Oct 2020 11:39:38 +0200 Subject: [PATCH 183/277] Fixing the developer error message under missing --- instat/dlgInventoryPlot.vb | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 43a8ca57ac3..fe9e1ecfc2b 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -33,6 +33,7 @@ Public Class dlgInventoryPlot SetRCodeForControls(bReset) bReset = False autoTranslate(Me) + End Sub Private Sub InitialiseDialog() @@ -159,7 +160,7 @@ Public Class dlgInventoryPlot ucrPnlOptions.AddRSyntaxContainsFunctionNamesCondition(rdoGraph, {frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot"}) ucrPnlOptions.AddToLinkedControls({ucrChkDisplayRainDays, ucrChkFlipCoordinates, ucrChkShowNonMissing, ucrPnlPlotType, ucrSaveGraph, ucrInputTitle, ucrInputFacetBy}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlOptions.AddToLinkedControls({ucrChkSummary, ucrChkDetails}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrChkSummary}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrPnlOrder}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkSummary.AddToLinkedControls({ucrChkOmitStart, ucrChkOmitEnd}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -193,7 +194,7 @@ Public Class dlgInventoryPlot clsClimaticMissing.SetRCommand("climatic_missing") clsClimaticDetails.SetRCommand("climatic_details") - clsClimaticDetails.SetAssignTo("last_details", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempTable:="last_details") + clsClimaticDetails.SetAssignTo("last_details", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strDataFrameNames:="last_details") ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.AddToBeforeCodes(clsInventoryPlot, iPosition:=0) @@ -257,8 +258,7 @@ Public Class dlgInventoryPlot SetRCodeForControls(True) TestOkEnabled() End Sub - - Private Sub ucrPnls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged + Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoMissing.Checked Then ucrReceiverDate.SetParameterIsRFunction() ucrInventoryPlotSelector.SetParameterIsrfunction() @@ -272,7 +272,6 @@ Public Class dlgInventoryPlot clsInventoryPlot.bExcludeAssignedFunctionOutput = False End If End Sub - Private Sub ucrChkSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSummary.ControlValueChanged If ucrChkSummary.Checked Then ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) @@ -303,7 +302,14 @@ Public Class dlgInventoryPlot End If End Sub - Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveGraph.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrChkSummary.ControlContentsChanged, ucrChkDetails.ControlContentsChanged, ucrChkYear.ControlContentsChanged, ucrChkMonth.ControlContentsChanged, ucrChkDay.ControlContentsChanged, ucrChkHour.ControlContentsChanged, ucrChkMinute.ControlContentsChanged, ucrChkSecond.ControlContentsChanged, ucrPnlOptions.ControlValueChanged + Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveGraph.ControlContentsChanged, ucrSaveDetails.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrChkSummary.ControlContentsChanged, ucrChkDetails.ControlContentsChanged, ucrChkYear.ControlContentsChanged, ucrChkMonth.ControlContentsChanged, ucrChkDay.ControlContentsChanged, ucrChkHour.ControlContentsChanged, ucrChkMinute.ControlContentsChanged, ucrChkSecond.ControlContentsChanged, ucrPnlOptions.ControlContentsChanged TestOkEnabled() End Sub + + Private Sub ucrBase_ClickClose(sender As Object, e As EventArgs) Handles ucrBase.ClickClose + If rdoMissing.Checked AndAlso Not ucrChkSummary.Checked AndAlso Not ucrChkDetails.Checked Then + ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) + clsClimaticDetails.iCallType = 2 + End If + End Sub End Class \ No newline at end of file From 4fa18135c014acd604b2c06ee5815f6cc65deee6 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 6 Oct 2020 17:19:07 +0100 Subject: [PATCH 184/277] changed estimates summary options, set mean as default summary, fixed R code setting for controls, corrected variables as strings from receivers --- instat/dlgSeasonalPlot.Designer.vb | 183 +++++++++--------- instat/dlgSeasonalPlot.vb | 286 +++++++++++++++++++---------- 2 files changed, 280 insertions(+), 189 deletions(-) diff --git a/instat/dlgSeasonalPlot.Designer.vb b/instat/dlgSeasonalPlot.Designer.vb index 0f5e3070e8c..86f8d7451ab 100644 --- a/instat/dlgSeasonalPlot.Designer.vb +++ b/instat/dlgSeasonalPlot.Designer.vb @@ -37,24 +37,24 @@ Partial Class dlgSeasonalPlot Me.ucrInputSmoothing = New instat.ucrInputComboBox() Me.lblPeriod = New System.Windows.Forms.Label() Me.ucrNudPeriod = New instat.ucrNud() - Me.lblRefSummary = New System.Windows.Forms.Label() + Me.lblReferenceSummary = New System.Windows.Forms.Label() Me.lblSeasonality = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() Me.lblReference = New System.Windows.Forms.Label() - Me.lblEstimate = New System.Windows.Forms.Label() - Me.ucrChkOptionalSummary = New instat.ucrCheck() - Me.ucrInputEstimateThreshold = New instat.ucrInputTextBox() + Me.lblEstimates = New System.Windows.Forms.Label() + Me.ucrInputEstimatesThreshold = New instat.ucrInputTextBox() Me.ucrInputReferenceThreshold = New instat.ucrInputTextBox() Me.ucrInputReferenceSummary = New instat.ucrInputComboBox() - Me.ucrInputEstimateSummary = New instat.ucrInputComboBox() Me.ucrSaveGraph = New instat.ucrSave() Me.ucrChkRemoveMissing = New instat.ucrCheck() - Me.ucrReceiverEstimate = New instat.ucrReceiverSingle() + Me.ucrReceiverEstimates = New instat.ucrReceiverSingle() Me.ucrReceiverSeasonality = New instat.ucrReceiverSingle() Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.ucrReceiverReference = New instat.ucrReceiverSingle() Me.ucrSelectorSeasonalityComparisons = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.lblEstimatesSummary = New System.Windows.Forms.Label() + Me.ucrInputEstimatesSummary = New instat.ucrInputTextBox() Me.grpValues.SuspendLayout() Me.grpSmoothing.SuspendLayout() Me.SuspendLayout() @@ -65,19 +65,19 @@ Partial Class dlgSeasonalPlot Me.grpValues.Controls.Add(Me.lblN) Me.grpValues.Controls.Add(Me.ucrChkPoints) Me.grpValues.Controls.Add(Me.ucrChkMovingAverage) - Me.grpValues.Location = New System.Drawing.Point(12, 242) + Me.grpValues.Location = New System.Drawing.Point(12, 343) Me.grpValues.Name = "grpValues" - Me.grpValues.Size = New System.Drawing.Size(232, 71) + Me.grpValues.Size = New System.Drawing.Size(243, 71) Me.grpValues.TabIndex = 16 Me.grpValues.TabStop = False - Me.grpValues.Text = "Values" + Me.grpValues.Text = "Display Values As" ' 'ucrInputN ' Me.ucrInputN.AddQuotesIfUnrecognised = True Me.ucrInputN.IsMultiline = False Me.ucrInputN.IsReadOnly = False - Me.ucrInputN.Location = New System.Drawing.Point(149, 41) + Me.ucrInputN.Location = New System.Drawing.Point(149, 45) Me.ucrInputN.Name = "ucrInputN" Me.ucrInputN.Size = New System.Drawing.Size(47, 21) Me.ucrInputN.TabIndex = 23 @@ -85,7 +85,7 @@ Partial Class dlgSeasonalPlot 'lblN ' Me.lblN.AutoSize = True - Me.lblN.Location = New System.Drawing.Point(130, 43) + Me.lblN.Location = New System.Drawing.Point(130, 47) Me.lblN.Name = "lblN" Me.lblN.Size = New System.Drawing.Size(16, 13) Me.lblN.TabIndex = 21 @@ -94,7 +94,7 @@ Partial Class dlgSeasonalPlot 'ucrChkPoints ' Me.ucrChkPoints.Checked = False - Me.ucrChkPoints.Location = New System.Drawing.Point(8, 15) + Me.ucrChkPoints.Location = New System.Drawing.Point(8, 19) Me.ucrChkPoints.Name = "ucrChkPoints" Me.ucrChkPoints.Size = New System.Drawing.Size(155, 20) Me.ucrChkPoints.TabIndex = 8 @@ -102,7 +102,7 @@ Partial Class dlgSeasonalPlot 'ucrChkMovingAverage ' Me.ucrChkMovingAverage.Checked = False - Me.ucrChkMovingAverage.Location = New System.Drawing.Point(8, 41) + Me.ucrChkMovingAverage.Location = New System.Drawing.Point(8, 45) Me.ucrChkMovingAverage.Name = "ucrChkMovingAverage" Me.ucrChkMovingAverage.Size = New System.Drawing.Size(121, 20) Me.ucrChkMovingAverage.TabIndex = 7 @@ -118,12 +118,12 @@ Partial Class dlgSeasonalPlot Me.grpSmoothing.Controls.Add(Me.ucrInputSmoothing) Me.grpSmoothing.Controls.Add(Me.lblPeriod) Me.grpSmoothing.Controls.Add(Me.ucrNudPeriod) - Me.grpSmoothing.Location = New System.Drawing.Point(12, 317) + Me.grpSmoothing.Location = New System.Drawing.Point(12, 253) Me.grpSmoothing.Name = "grpSmoothing" Me.grpSmoothing.Size = New System.Drawing.Size(243, 75) Me.grpSmoothing.TabIndex = 17 Me.grpSmoothing.TabStop = False - Me.grpSmoothing.Text = "Smoothing" + Me.grpSmoothing.Text = "Smoothing Curves" ' 'ucrNudSpan ' @@ -219,19 +219,19 @@ Partial Class dlgSeasonalPlot Me.ucrNudPeriod.TabIndex = 2 Me.ucrNudPeriod.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'lblRefSummary + 'lblReferenceSummary ' - Me.lblRefSummary.AutoSize = True - Me.lblRefSummary.Location = New System.Drawing.Point(275, 73) - Me.lblRefSummary.Name = "lblRefSummary" - Me.lblRefSummary.Size = New System.Drawing.Size(53, 13) - Me.lblRefSummary.TabIndex = 3 - Me.lblRefSummary.Text = "Summary:" + Me.lblReferenceSummary.AutoSize = True + Me.lblReferenceSummary.Location = New System.Drawing.Point(275, 73) + Me.lblReferenceSummary.Name = "lblReferenceSummary" + Me.lblReferenceSummary.Size = New System.Drawing.Size(53, 13) + Me.lblReferenceSummary.TabIndex = 3 + Me.lblReferenceSummary.Text = "Summary:" ' 'lblSeasonality ' Me.lblSeasonality.AutoSize = True - Me.lblSeasonality.Location = New System.Drawing.Point(275, 227) + Me.lblSeasonality.Location = New System.Drawing.Point(275, 218) Me.lblSeasonality.Name = "lblSeasonality" Me.lblSeasonality.Size = New System.Drawing.Size(64, 13) Me.lblSeasonality.TabIndex = 11 @@ -240,7 +240,7 @@ Partial Class dlgSeasonalPlot 'lblStation ' Me.lblStation.AutoSize = True - Me.lblStation.Location = New System.Drawing.Point(275, 273) + Me.lblStation.Location = New System.Drawing.Point(275, 264) Me.lblStation.Name = "lblStation" Me.lblStation.Size = New System.Drawing.Size(43, 13) Me.lblStation.TabIndex = 13 @@ -251,45 +251,37 @@ Partial Class dlgSeasonalPlot Me.lblReference.AutoSize = True Me.lblReference.Location = New System.Drawing.Point(275, 27) Me.lblReference.Name = "lblReference" - Me.lblReference.Size = New System.Drawing.Size(60, 13) + Me.lblReference.Size = New System.Drawing.Size(95, 13) Me.lblReference.TabIndex = 1 - Me.lblReference.Text = "Reference:" + Me.lblReference.Text = "Reference Values:" ' - 'lblEstimate + 'lblEstimates ' - Me.lblEstimate.AutoSize = True - Me.lblEstimate.Location = New System.Drawing.Point(275, 120) - Me.lblEstimate.Name = "lblEstimate" - Me.lblEstimate.Size = New System.Drawing.Size(50, 13) - Me.lblEstimate.TabIndex = 6 - Me.lblEstimate.Text = "Estimate:" + Me.lblEstimates.AutoSize = True + Me.lblEstimates.Location = New System.Drawing.Point(275, 120) + Me.lblEstimates.Name = "lblEstimates" + Me.lblEstimates.Size = New System.Drawing.Size(55, 13) + Me.lblEstimates.TabIndex = 6 + Me.lblEstimates.Text = "Estimates:" ' - 'ucrChkOptionalSummary + 'ucrInputEstimatesThreshold ' - Me.ucrChkOptionalSummary.Checked = False - Me.ucrChkOptionalSummary.Location = New System.Drawing.Point(274, 169) - Me.ucrChkOptionalSummary.Name = "ucrChkOptionalSummary" - Me.ucrChkOptionalSummary.Size = New System.Drawing.Size(189, 20) - Me.ucrChkOptionalSummary.TabIndex = 8 - ' - 'ucrInputEstimateThreshold - ' - Me.ucrInputEstimateThreshold.AddQuotesIfUnrecognised = True - Me.ucrInputEstimateThreshold.IsMultiline = False - Me.ucrInputEstimateThreshold.IsReadOnly = False - Me.ucrInputEstimateThreshold.Location = New System.Drawing.Point(370, 192) - Me.ucrInputEstimateThreshold.Name = "ucrInputEstimateThreshold" - Me.ucrInputEstimateThreshold.Size = New System.Drawing.Size(48, 21) - Me.ucrInputEstimateThreshold.TabIndex = 10 + Me.ucrInputEstimatesThreshold.AddQuotesIfUnrecognised = True + Me.ucrInputEstimatesThreshold.IsMultiline = False + Me.ucrInputEstimatesThreshold.IsReadOnly = False + Me.ucrInputEstimatesThreshold.Location = New System.Drawing.Point(373, 181) + Me.ucrInputEstimatesThreshold.Name = "ucrInputEstimatesThreshold" + Me.ucrInputEstimatesThreshold.Size = New System.Drawing.Size(40, 21) + Me.ucrInputEstimatesThreshold.TabIndex = 10 ' 'ucrInputReferenceThreshold ' Me.ucrInputReferenceThreshold.AddQuotesIfUnrecognised = True Me.ucrInputReferenceThreshold.IsMultiline = False Me.ucrInputReferenceThreshold.IsReadOnly = False - Me.ucrInputReferenceThreshold.Location = New System.Drawing.Point(365, 89) + Me.ucrInputReferenceThreshold.Location = New System.Drawing.Point(373, 89) Me.ucrInputReferenceThreshold.Name = "ucrInputReferenceThreshold" - Me.ucrInputReferenceThreshold.Size = New System.Drawing.Size(53, 21) + Me.ucrInputReferenceThreshold.Size = New System.Drawing.Size(40, 21) Me.ucrInputReferenceThreshold.TabIndex = 5 ' 'ucrInputReferenceSummary @@ -302,19 +294,9 @@ Partial Class dlgSeasonalPlot Me.ucrInputReferenceSummary.Size = New System.Drawing.Size(89, 21) Me.ucrInputReferenceSummary.TabIndex = 4 ' - 'ucrInputEstimateSummary - ' - Me.ucrInputEstimateSummary.AddQuotesIfUnrecognised = True - Me.ucrInputEstimateSummary.GetSetSelectedIndex = -1 - Me.ucrInputEstimateSummary.IsReadOnly = False - Me.ucrInputEstimateSummary.Location = New System.Drawing.Point(275, 192) - Me.ucrInputEstimateSummary.Name = "ucrInputEstimateSummary" - Me.ucrInputEstimateSummary.Size = New System.Drawing.Size(93, 21) - Me.ucrInputEstimateSummary.TabIndex = 9 - ' 'ucrSaveGraph ' - Me.ucrSaveGraph.Location = New System.Drawing.Point(12, 400) + Me.ucrSaveGraph.Location = New System.Drawing.Point(12, 430) Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveGraph.Name = "ucrSaveGraph" Me.ucrSaveGraph.Size = New System.Drawing.Size(255, 29) @@ -328,26 +310,26 @@ Partial Class dlgSeasonalPlot Me.ucrChkRemoveMissing.Size = New System.Drawing.Size(197, 20) Me.ucrChkRemoveMissing.TabIndex = 15 ' - 'ucrReceiverEstimate + 'ucrReceiverEstimates ' - Me.ucrReceiverEstimate.frmParent = Me - Me.ucrReceiverEstimate.Location = New System.Drawing.Point(275, 136) - Me.ucrReceiverEstimate.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverEstimate.Name = "ucrReceiverEstimate" - Me.ucrReceiverEstimate.Selector = Nothing - Me.ucrReceiverEstimate.Size = New System.Drawing.Size(143, 20) - Me.ucrReceiverEstimate.strNcFilePath = "" - Me.ucrReceiverEstimate.TabIndex = 7 - Me.ucrReceiverEstimate.ucrSelector = Nothing + Me.ucrReceiverEstimates.frmParent = Me + Me.ucrReceiverEstimates.Location = New System.Drawing.Point(275, 136) + Me.ucrReceiverEstimates.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverEstimates.Name = "ucrReceiverEstimates" + Me.ucrReceiverEstimates.Selector = Nothing + Me.ucrReceiverEstimates.Size = New System.Drawing.Size(120, 20) + Me.ucrReceiverEstimates.strNcFilePath = "" + Me.ucrReceiverEstimates.TabIndex = 7 + Me.ucrReceiverEstimates.ucrSelector = Nothing ' 'ucrReceiverSeasonality ' Me.ucrReceiverSeasonality.frmParent = Me - Me.ucrReceiverSeasonality.Location = New System.Drawing.Point(275, 243) + Me.ucrReceiverSeasonality.Location = New System.Drawing.Point(275, 234) Me.ucrReceiverSeasonality.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverSeasonality.Name = "ucrReceiverSeasonality" Me.ucrReceiverSeasonality.Selector = Nothing - Me.ucrReceiverSeasonality.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverSeasonality.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverSeasonality.strNcFilePath = "" Me.ucrReceiverSeasonality.TabIndex = 12 Me.ucrReceiverSeasonality.ucrSelector = Nothing @@ -355,11 +337,11 @@ Partial Class dlgSeasonalPlot 'ucrReceiverStation ' Me.ucrReceiverStation.frmParent = Me - Me.ucrReceiverStation.Location = New System.Drawing.Point(275, 289) + Me.ucrReceiverStation.Location = New System.Drawing.Point(275, 280) Me.ucrReceiverStation.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverStation.Name = "ucrReceiverStation" Me.ucrReceiverStation.Selector = Nothing - Me.ucrReceiverStation.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverStation.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverStation.strNcFilePath = "" Me.ucrReceiverStation.TabIndex = 14 Me.ucrReceiverStation.ucrSelector = Nothing @@ -371,7 +353,7 @@ Partial Class dlgSeasonalPlot Me.ucrReceiverReference.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverReference.Name = "ucrReceiverReference" Me.ucrReceiverReference.Selector = Nothing - Me.ucrReceiverReference.Size = New System.Drawing.Size(143, 20) + Me.ucrReceiverReference.Size = New System.Drawing.Size(120, 20) Me.ucrReceiverReference.strNcFilePath = "" Me.ucrReceiverReference.TabIndex = 2 Me.ucrReceiverReference.ucrSelector = Nothing @@ -389,31 +371,50 @@ Partial Class dlgSeasonalPlot ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(12, 429) + Me.ucrBase.Location = New System.Drawing.Point(12, 468) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 19 ' + 'lblEstimatesSummary + ' + Me.lblEstimatesSummary.AutoSize = True + Me.lblEstimatesSummary.Location = New System.Drawing.Point(275, 165) + Me.lblEstimatesSummary.Name = "lblEstimatesSummary" + Me.lblEstimatesSummary.Size = New System.Drawing.Size(53, 13) + Me.lblEstimatesSummary.TabIndex = 20 + Me.lblEstimatesSummary.Text = "Summary:" + ' + 'ucrInputEstimatesSummary + ' + Me.ucrInputEstimatesSummary.AddQuotesIfUnrecognised = True + Me.ucrInputEstimatesSummary.IsMultiline = False + Me.ucrInputEstimatesSummary.IsReadOnly = False + Me.ucrInputEstimatesSummary.Location = New System.Drawing.Point(275, 181) + Me.ucrInputEstimatesSummary.Name = "ucrInputEstimatesSummary" + Me.ucrInputEstimatesSummary.Size = New System.Drawing.Size(89, 21) + Me.ucrInputEstimatesSummary.TabIndex = 21 + ' 'dlgSeasonalPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(466, 491) - Me.Controls.Add(Me.ucrChkOptionalSummary) - Me.Controls.Add(Me.lblEstimate) + Me.ClientSize = New System.Drawing.Size(439, 521) + Me.Controls.Add(Me.ucrInputEstimatesSummary) + Me.Controls.Add(Me.lblEstimatesSummary) + Me.Controls.Add(Me.lblEstimates) Me.Controls.Add(Me.lblReference) Me.Controls.Add(Me.lblStation) Me.Controls.Add(Me.lblSeasonality) - Me.Controls.Add(Me.lblRefSummary) - Me.Controls.Add(Me.ucrInputEstimateThreshold) + Me.Controls.Add(Me.lblReferenceSummary) + Me.Controls.Add(Me.ucrInputEstimatesThreshold) Me.Controls.Add(Me.ucrInputReferenceThreshold) Me.Controls.Add(Me.ucrInputReferenceSummary) - Me.Controls.Add(Me.ucrInputEstimateSummary) Me.Controls.Add(Me.ucrSaveGraph) Me.Controls.Add(Me.grpSmoothing) Me.Controls.Add(Me.grpValues) Me.Controls.Add(Me.ucrChkRemoveMissing) - Me.Controls.Add(Me.ucrReceiverEstimate) + Me.Controls.Add(Me.ucrReceiverEstimates) Me.Controls.Add(Me.ucrReceiverSeasonality) Me.Controls.Add(Me.ucrReceiverStation) Me.Controls.Add(Me.ucrReceiverReference) @@ -443,21 +444,20 @@ Partial Class dlgSeasonalPlot Friend WithEvents ucrChkPoints As ucrCheck Friend WithEvents ucrChkMovingAverage As ucrCheck Friend WithEvents ucrChkRemoveMissing As ucrCheck - Friend WithEvents ucrReceiverEstimate As ucrReceiverSingle + Friend WithEvents ucrReceiverEstimates As ucrReceiverSingle Friend WithEvents ucrReceiverSeasonality As ucrReceiverSingle Friend WithEvents ucrReceiverStation As ucrReceiverSingle Friend WithEvents ucrNudPeriod As ucrNud Friend WithEvents ucrNudHarmonics As ucrNud Friend WithEvents ucrInputSmoothing As ucrInputComboBox - Friend WithEvents ucrInputEstimateThreshold As ucrInputTextBox + Friend WithEvents ucrInputEstimatesThreshold As ucrInputTextBox Friend WithEvents ucrInputReferenceThreshold As ucrInputTextBox Friend WithEvents ucrInputReferenceSummary As ucrInputComboBox - Friend WithEvents ucrInputEstimateSummary As ucrInputComboBox - Friend WithEvents lblEstimate As Label + Friend WithEvents lblEstimates As Label Friend WithEvents lblReference As Label Friend WithEvents lblStation As Label Friend WithEvents lblSeasonality As Label - Friend WithEvents lblRefSummary As Label + Friend WithEvents lblReferenceSummary As Label Friend WithEvents lblPeriod As Label Friend WithEvents lblHarmonics As Label Friend WithEvents ucrInputN As ucrInputTextBox @@ -466,5 +466,6 @@ Partial Class dlgSeasonalPlot Friend WithEvents ucrNudDf As ucrNud Friend WithEvents lblDf As Label Friend WithEvents lblSpan As Label - Friend WithEvents ucrChkOptionalSummary As ucrCheck + Friend WithEvents lblEstimatesSummary As Label + Friend WithEvents ucrInputEstimatesSummary As ucrInputTextBox End Class diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index 0e7753ffab4..7d4e0a80113 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -19,6 +19,7 @@ Imports instat.Translations Public Class dlgSeasonalPlot Private bFirstLoad As Boolean = True Private bReset As Boolean = True + 'summary functions + operators Private clsPipeOperator As ROperator Private clsAndOperator As ROperator @@ -51,7 +52,10 @@ Public Class dlgSeasonalPlot 'ggplot functions + operators Private clsPlusOperator As ROperator Private clsFacetWrapTildeOperator As ROperator - Private clsPbsSplinesTildeOperator As ROperator + Private clsTildeOperator As ROperator + + ''' Dummy RCodeStructure set to either clsAsFormulaFunction or clsTildeOperator depending on smoothing option. This is used in SetRCode for ucrInputSmoothing. + Private clsFormulaRCode As RCodeStructure Private clsGgplotFunction As RFunction Private clsGeomPointFunction As RFunction @@ -78,8 +82,8 @@ Public Class dlgSeasonalPlot If bReset Then SetDefaults() - SetRcodeForControls(bReset) End If + SetRCodeForControls(bReset) bReset = False TestOkEnabled() End Sub @@ -93,37 +97,50 @@ Public Class dlgSeasonalPlot ucrReceiverReference.SetParameter(New RParameter("x", 0)) ucrReceiverReference.Selector = ucrSelectorSeasonalityComparisons - ucrReceiverReference.SetParameterIsRFunction() - - ucrReceiverEstimate.SetParameter(New RParameter("x", 0)) - ucrReceiverEstimate.Selector = ucrSelectorSeasonalityComparisons - ucrReceiverEstimate.SetParameterIsRFunction() + ucrReceiverReference.SetParameterIsString() + ucrReceiverReference.bWithQuotes = False + ucrReceiverReference.SetDataType("numeric") + ucrReceiverReference.strSelectorHeading = "Numerics" + + ucrReceiverEstimates.SetParameter(New RParameter("x", 0)) + ucrReceiverEstimates.Selector = ucrSelectorSeasonalityComparisons + ucrReceiverEstimates.SetParameterIsString() + ucrReceiverEstimates.bWithQuotes = False + ucrReceiverEstimates.SetDataType("numeric") + ucrReceiverEstimates.strSelectorHeading = "Numerics" ucrReceiverSeasonality.SetParameter(New RParameter("seasonality", 2, bNewIncludeArgumentName:=False)) ucrReceiverSeasonality.Selector = ucrSelectorSeasonalityComparisons - ucrReceiverSeasonality.SetParameterIsRFunction() + ucrReceiverSeasonality.SetParameterIsString() + ucrReceiverSeasonality.bWithQuotes = False ucrReceiverSeasonality.SetClimaticType("doy") ucrReceiverSeasonality.bAutoFill = True + ' Lines don't appear if x is not numeric. + ' DP: I thought it can work with x as a factor so this could be TODO + ucrReceiverSeasonality.SetDataType("numeric") + ucrReceiverSeasonality.strSelectorHeading = "Numerics" ucrReceiverStation.SetParameter(New RParameter("station", 0, bNewIncludeArgumentName:=False)) ucrReceiverStation.Selector = ucrSelectorSeasonalityComparisons - ucrReceiverStation.SetParameterIsRFunction() + ucrReceiverStation.SetParameterIsString() + ucrReceiverStation.bWithQuotes = False ucrReceiverStation.SetClimaticType("station") ucrReceiverStation.bAutoFill = True + ucrReceiverStation.SetDataType("factor") + ucrReceiverStation.strSelectorHeading = "Factors" ucrInputReferenceSummary.SetItems({"Mean", "Mean Above", "Mean Below", "Prop Above", "Prop Below", "Std.dev"}) ucrInputReferenceSummary.SetDropDownStyleAsNonEditable() - ucrInputEstimateSummary.SetItems({"Prop Above", "Prop Below"}) - ucrInputEstimateSummary.SetDropDownStyleAsNonEditable() + ucrInputEstimatesSummary.IsReadOnly = True ucrInputReferenceThreshold.SetParameter(New RParameter("value", 1)) ucrInputReferenceThreshold.SetValidationTypeAsNumeric() ucrInputReferenceThreshold.AddQuotesIfUnrecognised = False - ucrInputEstimateThreshold.SetParameter(New RParameter("value", 1)) - ucrInputEstimateThreshold.SetValidationTypeAsNumeric() - ucrInputEstimateThreshold.AddQuotesIfUnrecognised = False + ucrInputEstimatesThreshold.SetParameter(New RParameter("value", 1)) + ucrInputEstimatesThreshold.SetValidationTypeAsNumeric() + ucrInputEstimatesThreshold.AddQuotesIfUnrecognised = False ucrInputN.SetParameter(New RParameter("n", 1)) ucrInputN.SetValidationTypeAsNumeric() @@ -133,20 +150,17 @@ Public Class dlgSeasonalPlot ucrChkRemoveMissing.AddParameterPresentCondition(True, "filter") ucrChkRemoveMissing.AddParameterPresentCondition(False, "filter", False) - ucrChkOptionalSummary.SetText("Different summary for estimate") - ucrInputReferenceSummary.AddToLinkedControls(ucrInputReferenceThreshold, {"Prop Above", "Prop Below", "Mean Above", "Mean Below"}, bNewLinkedHideIfParameterMissing:=True) - ucrChkMovingAverage.AddToLinkedControls(ucrInputN, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrInputReferenceSummary.AddToLinkedControls(ucrInputEstimatesThreshold, {"Prop Above", "Prop Below", "Mean Above", "Mean Below"}, bNewLinkedHideIfParameterMissing:=True) + ucrChkMovingAverage.AddToLinkedControls(ucrInputN, {True}, bNewLinkedHideIfParameterMissing:=True) ucrInputSmoothing.AddToLinkedControls({ucrNudHarmonics, ucrNudPeriod}, {"Fourier Series"}, bNewLinkedHideIfParameterMissing:=True) ucrInputSmoothing.AddToLinkedControls(ucrNudSpan, {"LOESS"}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputSmoothing.AddToLinkedControls(ucrNudDf, {"Periodic Splines", "Natural Splines"}, bNewLinkedHideIfParameterMissing:=True) - ucrChkOptionalSummary.AddToLinkedControls(ucrInputEstimateSummary, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrInputN.SetLinkedDisplayControl(lblN) ucrNudHarmonics.SetLinkedDisplayControl(lblHarmonics) ucrNudPeriod.SetLinkedDisplayControl(lblPeriod) ucrNudSpan.SetLinkedDisplayControl(lblSpan) ucrNudDf.SetLinkedDisplayControl(lblDf) - ucrInputEstimateSummary.SetLinkedDisplayControl(ucrInputEstimateThreshold) ucrChkPoints.SetText("Points") ucrChkPoints.AddParameterPresentCondition(True, "geom_point") @@ -165,10 +179,18 @@ Public Class dlgSeasonalPlot ucrInputSmoothing.SetItems({"Fourier Series", "Periodic Splines", "Natural Splines", "LOESS"}) ucrInputSmoothing.SetDropDownStyleAsNonEditable() + ucrInputSmoothing.AddRCodeIsRFunctionCondition("Fourier Series", bNewIsPositive:=True) + ucrInputSmoothing.AddRCodeIsRFunctionCondition("Periodic Splines", bNewIsPositive:=False) + ucrInputSmoothing.AddParameterValueFunctionNamesCondition("Periodic Splines", strParameterName:="1", strFunctionName:="pbs") + ucrInputSmoothing.AddRCodeIsRFunctionCondition("Natural Splines", bNewIsPositive:=False) + ucrInputSmoothing.AddParameterValueFunctionNamesCondition("Natural Splines", strParameterName:="1", strFunctionName:="ns") + ucrInputSmoothing.AddRCodeIsRFunctionCondition("LOESS", bNewIsPositive:=False) + ucrInputSmoothing.AddParameterIsStringCondition("LOESS", "1") ucrNudSpan.SetParameter(New RParameter("span", 4)) ucrNudSpan.DecimalPlaces = 2 ucrNudSpan.Increment = 0.05 + ucrNudSpan.SetRDefault(0.75) ucrNudSpan.SetMinMax(0, Integer.MaxValue) ucrNudDf.SetParameter(New RParameter("df", 1)) @@ -196,7 +218,7 @@ Public Class dlgSeasonalPlot clsPlusOperator = New ROperator clsFacetWrapTildeOperator = New ROperator - clsPbsSplinesTildeOperator = New ROperator + clsTildeOperator = New ROperator clsMissingFilterFunction = New RFunction clsRefIsNotNaFunction = New RFunction @@ -214,6 +236,8 @@ Public Class dlgSeasonalPlot clsMeanFilterFunction = New RFunction clsStdFunction = New RFunction + clsFormulaRCode = New RCodeStructure + clsGgplotFunction = New RFunction clsGeomPointFunction = New RFunction clsGeomLineFunction = New RFunction @@ -232,9 +256,8 @@ Public Class dlgSeasonalPlot ucrSelectorSeasonalityComparisons.Reset() ucrReceiverReference.SetMeAsReceiver() - ucrInputEstimateSummary.cboInput.SelectedItem = "Prop Above" - ucrInputReferenceSummary.cboInput.SelectedItem = "Mean" - ucrInputSmoothing.cboInput.SelectedItem = "Fourier Series" + ' Need to reset so that bUserTyped is reset to False + ucrInputEstimatesThreshold.Reset() clsPipeOperator.SetOperation("%>%") clsPipeOperator.AddParameter("filter", clsRFunctionParameter:=clsMissingFilterFunction, iPosition:=1) @@ -275,12 +298,12 @@ Public Class dlgSeasonalPlot clsMutateFunction.SetPackageName("dplyr") clsMutateFunction.SetRCommand("mutate") - clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefGreaterOperator, iPosition:=0) - clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst1GreaterOperator, iPosition:=1) + clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) + clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) clsPivotLongerFunction.SetPackageName("tidyr") clsPivotLongerFunction.SetRCommand("pivot_longer") - clsPivotLongerFunction.AddParameter("cols", "c(" & "reference" & "," & "estimate" & ")", iPosition:=0) + clsPivotLongerFunction.AddParameter("cols", "c(reference, estimates)", iPosition:=0) clsPivotLongerFunction.AddParameter("names_to", Chr(34) & "data" & Chr(34), iPosition:=1) clsPivotLongerFunction.AddParameter("values_to", Chr(34) & "value" & Chr(34), iPosition:=2) @@ -291,7 +314,7 @@ Public Class dlgSeasonalPlot clsSummariseFunction.SetPackageName("dplyr") clsSummariseFunction.SetRCommand("summarise") clsSummariseFunction.AddParameter("n", clsRFunctionParameter:=clsNSumFunction, iPosition:=0) - clsSummariseFunction.AddParameter("calc_summary", clsROperatorParameter:=clsDivideOperator, iPosition:=1) + clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=1) clsMovingMutateFunction.SetPackageName("dplyr") clsMovingMutateFunction.SetRCommand("mutate") @@ -299,23 +322,23 @@ Public Class dlgSeasonalPlot clsMovingFunction.SetPackageName("raster") clsMovingFunction.SetRCommand("movingFun") - clsMovingFunction.AddParameter("calc_summary", "calc_summary", bIncludeArgumentName:=False, iPosition:=0) + clsMovingFunction.AddParameter("summary", "summary", bIncludeArgumentName:=False, iPosition:=0) clsMovingFunction.AddParameter("n", 5, iPosition:=1) clsMovingFunction.AddParameter("circular", "TRUE", iPosition:=2) clsMovingFunction.AddParameter("na.rm", "TRUE", iPosition:=3) clsNSumFunction.SetRCommand("sum") - clsNSumFunction.AddParameter("sum", clsRFunctionParameter:=clsNotIsNaThreshFunction, bIncludeArgumentName:=False, iPosition:=0) + clsNSumFunction.AddParameter("x", clsRFunctionParameter:=clsNotIsNaThreshFunction, iPosition:=0) clsPropSumFunction.SetRCommand("sum") - clsPropSumFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) + clsPropSumFunction.AddParameter("x", "value", iPosition:=0) clsPropSumFunction.AddParameter("na.rm", "TRUE", iPosition:=1) clsNotIsNaThreshFunction.SetRCommand("!is.na") - clsNotIsNaThreshFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) + clsNotIsNaThreshFunction.AddParameter("x", "value", iPosition:=0) clsMeanFunction.SetRCommand("mean") - clsMeanFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) + clsMeanFunction.AddParameter("x", "value", iPosition:=0) clsMeanFunction.AddParameter("na.rm", "TRUE", iPosition:=1) clsMeanFilterFunction.SetPackageName("dplyr") @@ -332,9 +355,12 @@ Public Class dlgSeasonalPlot clsEst2LessOperator.SetOperation("<") clsStdFunction.SetRCommand("sd") - clsStdFunction.AddParameter("value", "value", bIncludeArgumentName:=False, iPosition:=0) + clsStdFunction.AddParameter("x", "value", iPosition:=0) clsStdFunction.AddParameter("na.rm", "TRUE", iPosition:=1) + ' Set to clsAsFormulaFunction by default since "Fourier Series" is the default. + clsFormulaRCode = clsAsFormulaFunction + 'ggplot functions + operators clsGgplotFunction.SetPackageName("ggplot2") clsGgplotFunction.SetRCommand("ggplot") @@ -347,10 +373,10 @@ Public Class dlgSeasonalPlot clsPlusOperator.AddParameter("ylab", clsRFunctionParameter:=clsYlabFunction, iPosition:=4) clsFacetWrapTildeOperator.SetOperation("~") - clsFacetWrapTildeOperator.AddParameter("", "", iPosition:=0) + clsFacetWrapTildeOperator.bForceIncludeOperation = True - clsPbsSplinesTildeOperator.SetOperation("~") - clsPbsSplinesTildeOperator.AddParameter("y", "y", iPosition:=0) + clsTildeOperator.SetOperation("~") + clsTildeOperator.AddParameter("0", "y", iPosition:=0) clsGeomPointFunction.SetPackageName("ggplot2") clsGeomPointFunction.SetRCommand("geom_point") @@ -368,7 +394,7 @@ Public Class dlgSeasonalPlot clsGgPlotAesFunction.SetPackageName("ggplot2") clsGgPlotAesFunction.SetRCommand("aes") - clsGgPlotAesFunction.AddParameter("y", "calc_summary", iPosition:=1) + clsGgPlotAesFunction.AddParameter("y", "summary", iPosition:=1) clsGgPlotAesFunction.AddParameter("colour", "data", iPosition:=2) clsGgPlotAesFunction.AddParameter("weight", "n", iPosition:=3) @@ -414,22 +440,22 @@ Public Class dlgSeasonalPlot ucrBase.clsRsyntax.SetBaseROperator(clsPipeOperator) End Sub - Private Sub SetRcodeForControls(bReset As Boolean) + Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverReference.AddAdditionalCodeParameterPair(clsRefGreaterOperator, ucrReceiverReference.GetParameter, iAdditionalPairNo:=1) ucrReceiverReference.AddAdditionalCodeParameterPair(clsRefLessOperator, ucrReceiverReference.GetParameter, iAdditionalPairNo:=2) - ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEst1GreaterOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=1) - ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEst1LessOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=2) - ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEst2GreaterOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=3) - ucrReceiverEstimate.AddAdditionalCodeParameterPair(clsEst2LessOperator, ucrReceiverEstimate.GetParameter, iAdditionalPairNo:=4) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsEst1GreaterOperator, ucrReceiverEstimates.GetParameter, iAdditionalPairNo:=1) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsEst1LessOperator, ucrReceiverEstimates.GetParameter, iAdditionalPairNo:=2) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsEst2GreaterOperator, ucrReceiverEstimates.GetParameter, iAdditionalPairNo:=3) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsEst2LessOperator, ucrReceiverEstimates.GetParameter, iAdditionalPairNo:=4) ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsRefLessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=1) ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsLessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=2) ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsGreaterOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=3) - ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsEst2GreaterOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=4) - ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsEst2LessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=5) - ucrInputEstimateThreshold.AddAdditionalCodeParameterPair(clsEst1LessOperator, ucrInputEstimateThreshold.GetParameter, iAdditionalPairNo:=1) + ucrInputEstimatesThreshold.AddAdditionalCodeParameterPair(clsEst1LessOperator, ucrInputEstimatesThreshold.GetParameter, iAdditionalPairNo:=1) + ucrInputEstimatesThreshold.AddAdditionalCodeParameterPair(clsEst2GreaterOperator, ucrInputEstimatesThreshold.GetParameter, iAdditionalPairNo:=2) + ucrInputEstimatesThreshold.AddAdditionalCodeParameterPair(clsEst2LessOperator, ucrInputEstimatesThreshold.GetParameter, iAdditionalPairNo:=3) ucrReceiverSeasonality.AddAdditionalCodeParameterPair(clsGgPlotAesFunction, New RParameter("x", 0), iAdditionalPairNo:=1) @@ -438,10 +464,10 @@ Public Class dlgSeasonalPlot ucrNudDf.AddAdditionalCodeParameterPair(clsPbsFunction, ucrNudDf.GetParameter, iAdditionalPairNo:=1) ucrSelectorSeasonalityComparisons.SetRCode(clsPipeOperator, bReset) - ucrReceiverEstimate.SetRCode(clsEstIsNotNaFunction, bReset) + ucrReceiverEstimates.SetRCode(clsEstIsNotNaFunction, bReset) ucrReceiverReference.SetRCode(clsRefIsNotNaFunction, bReset) ucrInputReferenceThreshold.SetRCode(clsRefGreaterOperator, bReset) - ucrInputEstimateThreshold.SetRCode(clsEst1GreaterOperator, bReset) + ucrInputEstimatesThreshold.SetRCode(clsEst1GreaterOperator, bReset) ucrReceiverStation.SetRCode(clsGroupByFunction, bReset) ucrReceiverSeasonality.SetRCode(clsGroupByFunction, bReset) ucrInputN.SetRCode(clsMovingFunction, bReset) @@ -453,11 +479,73 @@ Public Class dlgSeasonalPlot ucrNudDf.SetRCode(clsNsFunction, bReset) ucrNudHarmonics.SetRCode(clsFourierSeriesFunction, bReset) ucrNudPeriod.SetRCode(clsFourierSeriesFunction, bReset) - ucrChkOptionalSummary.SetRCode(clsEst1GreaterOperator, bReset) + ucrInputSmoothing.SetRCode(clsFormulaRCode, bReset) + ' Cannot easily set R code using conditions because checks on multiple functions is needed hence done "manually" in this sub. + ReferenceSummarySetRCode(bReset) + End Sub + + ''' + ''' Sets the R Code for ucrInputReferenceSummary. This is done manually by this Sub instead of through conditions because of the complex checks on multiple functions required. + ''' + ''' True if the dialog is being reset. + Private Sub ReferenceSummarySetRCode(bReset As Boolean) + Dim clsTempParam As RParameter + Dim clsTempROp As ROperator + Dim clsTempRFunc As RFunction + + ' Used to return a developer error if R Code cannot be set. + Dim ReferenceSummaryDevError = Sub() + MsgBox("Developer error: in " & ucrInputReferenceSummary.Name & ". Cannot determine how to set the control from the RCode. Modify conditions so that only one state can satisfy its conditions.") + End Sub + + ' filter2 is used in clsPipeOperator to filter the data to for "Mean Above" or "Mean Below" calculation + If clsPipeOperator.ContainsParameter("filter2") Then + ' If clsMeanFilterFunction contains an "operator" parameter and its value is clsGreaterOperator then the summary is "Mean Above" + If clsMeanFilterFunction.ContainsParameter("operator") AndAlso clsMeanFilterFunction.GetParameter("operator").clsArgumentCodeStructure IsNot Nothing AndAlso clsMeanFilterFunction.GetParameter("operator").clsArgumentCodeStructure.Equals(clsGreaterOperator) Then + ucrInputReferenceSummary.SetName("Mean Above") + ' If clsMeanFilterFunction contains an "operator" parameter and its value is clsLessOperator then the summary is "Mean Below" + ElseIf clsMeanFilterFunction.ContainsParameter("operator") AndAlso clsMeanFilterFunction.GetParameter("operator").clsArgumentCodeStructure IsNot Nothing AndAlso clsMeanFilterFunction.GetParameter("operator").clsArgumentCodeStructure.Equals(clsLessOperator) Then + ucrInputReferenceSummary.SetName("Mean Below") + Else + ReferenceSummaryDevError() + End If + ' If filter2 is not in clsPipeOperator then the summary is one of the other four summaries and can be determined by "summary" parameter in clsSummariseFunction + ElseIf clsSummariseFunction.ContainsParameter("summary") Then + clsTempParam = clsSummariseFunction.GetParameter("summary") + clsTempROp = TryCast(clsTempParam.clsArgumentCodeStructure, ROperator) + clsTempRFunc = TryCast(clsTempParam.clsArgumentCodeStructure, RFunction) + ' If "summary" parameter contains an ROperator then it is either for "Prop Above" or "Prop Below" + If clsTempROp IsNot Nothing Then + ' If "reference" parameter in clsMutateFunction has clsRefGreaterOperator as its value then the summary is "Prop Above" + If clsMutateFunction.ContainsParameter("reference") AndAlso clsMutateFunction.GetParameter("reference").clsArgumentCodeStructure IsNot Nothing AndAlso clsMutateFunction.GetParameter("reference").clsArgumentCodeStructure.Equals(clsRefGreaterOperator) Then + ucrInputReferenceSummary.SetName("Prop Above") + ' If "reference" parameter in clsMutateFunction has clsRefLessOperator as its value then the summary is "Prop Below" + ElseIf clsMutateFunction.ContainsParameter("reference") AndAlso clsMutateFunction.GetParameter("reference").clsArgumentCodeStructure IsNot Nothing AndAlso clsMutateFunction.GetParameter("reference").clsArgumentCodeStructure.Equals(clsRefLessOperator) Then + ucrInputReferenceSummary.SetName("Prop Below") + Else + ReferenceSummaryDevError() + End If + ' If "summary" parameter contains an RFunction then it is either for "Mean" or "Std.dev" + ' Check the name of the RFunction to confirm which one. + ElseIf clsTempRFunc IsNot Nothing Then + If clsTempRFunc.strRCommand = "mean" Then + ucrInputReferenceSummary.SetName("Mean") + ElseIf clsTempRFunc.strRCommand = "sd" Then + ucrInputReferenceSummary.SetName("Std.dev") + Else + ReferenceSummaryDevError() + End If + Else + ReferenceSummaryDevError() + End If + Else + ReferenceSummaryDevError() + End If + ucrInputReferenceSummary.UpdateLinkedControls(bReset) End Sub Private Sub TestOkEnabled() - If ucrReceiverReference.IsEmpty OrElse ucrReceiverEstimate.IsEmpty OrElse ucrReceiverSeasonality.IsEmpty OrElse (ucrChkMovingAverage.Checked AndAlso ucrInputN.IsEmpty) OrElse ((ucrInputReferenceSummary.GetText = "Prop Above" OrElse ucrInputReferenceSummary.GetText = "Prop Below") AndAlso ucrInputReferenceThreshold.IsEmpty) OrElse (ucrChkOptionalSummary.Checked AndAlso (ucrInputEstimateSummary.GetText = "Prop Above" OrElse ucrInputEstimateSummary.GetText = "Prop Below") AndAlso ucrInputEstimateThreshold.IsEmpty) OrElse Not ucrSaveGraph.IsComplete OrElse (ucrInputSmoothing.GetText = "Fourier Series" AndAlso (ucrNudHarmonics.GetText = "" OrElse ucrNudPeriod.GetText = "")) OrElse (ucrInputSmoothing.GetText = "LOESS" AndAlso ucrNudSpan.GetText = "") OrElse ((ucrInputSmoothing.GetText = "Periodic Splines" OrElse ucrInputSmoothing.GetText = "Natural Splines") AndAlso ucrNudDf.GetText = "") Then + If ucrReceiverReference.IsEmpty OrElse ucrReceiverEstimates.IsEmpty OrElse ucrReceiverSeasonality.IsEmpty OrElse (ucrChkMovingAverage.Checked AndAlso ucrInputN.IsEmpty) OrElse ((ucrInputReferenceSummary.GetText = "Prop Above" OrElse ucrInputReferenceSummary.GetText = "Prop Below" OrElse ucrInputReferenceSummary.GetText = "Mean Above" OrElse ucrInputReferenceSummary.GetText = "Mean Below") AndAlso ucrInputReferenceThreshold.IsEmpty) OrElse ((ucrInputEstimatesSummary.GetText = "Prop Above" OrElse ucrInputEstimatesSummary.GetText = "Prop Below" OrElse ucrInputEstimatesSummary.GetText = "Mean Above" OrElse ucrInputEstimatesSummary.GetText = "Mean Below") AndAlso ucrInputEstimatesThreshold.IsEmpty) OrElse Not ucrSaveGraph.IsComplete OrElse (ucrInputSmoothing.GetText = "Fourier Series" AndAlso (ucrNudHarmonics.GetText = "" OrElse ucrNudPeriod.GetText = "")) OrElse (ucrInputSmoothing.GetText = "LOESS" AndAlso ucrNudSpan.GetText = "") OrElse ((ucrInputSmoothing.GetText = "Periodic Splines" OrElse ucrInputSmoothing.GetText = "Natural Splines") AndAlso ucrNudDf.GetText = "") Then ucrBase.OKEnabled(False) Else ucrBase.OKEnabled(True) @@ -466,7 +554,7 @@ Public Class dlgSeasonalPlot Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset SetDefaults() - SetRcodeForControls(True) + SetRCodeForControls(True) TestOkEnabled() End Sub @@ -475,60 +563,56 @@ Public Class dlgSeasonalPlot Case "Prop Above" clsPipeOperator.RemoveParameterByName("filter2") clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefGreaterOperator, iPosition:=0) - clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst2GreaterOperator, iPosition:=1) - clsSummariseFunction.AddParameter("calc_summary", clsROperatorParameter:=clsDivideOperator, iPosition:=3) + clsMutateFunction.AddParameter("estimates", clsROperatorParameter:=clsEst2GreaterOperator, iPosition:=1) + clsSummariseFunction.AddParameter("summary", clsROperatorParameter:=clsDivideOperator, iPosition:=3) Case "Prop Below" clsPipeOperator.RemoveParameterByName("filter2") clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefLessOperator, iPosition:=0) - clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst2LessOperator, iPosition:=1) - clsSummariseFunction.AddParameter("calc_summary", clsROperatorParameter:=clsDivideOperator, iPosition:=3) + clsMutateFunction.AddParameter("estimates", clsROperatorParameter:=clsEst2LessOperator, iPosition:=1) + clsSummariseFunction.AddParameter("summary", clsROperatorParameter:=clsDivideOperator, iPosition:=3) Case "Mean" clsPipeOperator.RemoveParameterByName("filter2") - clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) - clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) - clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) + clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) + clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) Case "Mean Above" - clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) - clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) + clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) + clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) clsMeanFilterFunction.AddParameter("operator", clsROperatorParameter:=clsGreaterOperator, bIncludeArgumentName:=False, iPosition:=0) clsPipeOperator.AddParameter("filter2", clsRFunctionParameter:=clsMeanFilterFunction, iPosition:=4) - clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) Case "Mean Below" - clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) - clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) + clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) + clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) clsMeanFilterFunction.AddParameter("operator", clsROperatorParameter:=clsLessOperator, bIncludeArgumentName:=False, iPosition:=0) clsPipeOperator.AddParameter("filter2", clsRFunctionParameter:=clsMeanFilterFunction, iPosition:=4) - clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) + clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) Case "Std.dev" clsPipeOperator.RemoveParameterByName("filter2") - clsMutateFunction.AddParameter("reference", clsRFunctionParameter:=ucrReceiverReference.GetVariables, iPosition:=0) - clsMutateFunction.AddParameter("estimate", clsRFunctionParameter:=ucrReceiverEstimate.GetVariables, iPosition:=1) - clsSummariseFunction.AddParameter("calc_summary", clsRFunctionParameter:=clsStdFunction, iPosition:=3) + clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) + clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) + clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsStdFunction, iPosition:=3) End Select End Sub - Private Sub ucrInputReferenceSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimate.ControlValueChanged, ucrInputSmoothing.ControlValueChanged - UpdateSummaryParameters() + Private Sub UpdateSmoothingParameters() Select Case ucrInputSmoothing.GetText Case "Fourier Series" clsGeomSmoothFunction.AddParameter("formula", clsRFunctionParameter:=clsAsFormulaFunction, iPosition:=1) + clsFormulaRCode = clsAsFormulaFunction Case "Periodic Splines" - clsPbsSplinesTildeOperator.AddParameter("pbs", clsRFunctionParameter:=clsPbsFunction, iPosition:=1) - clsPbsSplinesTildeOperator.RemoveParameterByName("ns") - clsPbsSplinesTildeOperator.RemoveParameterByName("x") - clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + clsTildeOperator.AddParameter("1", clsRFunctionParameter:=clsPbsFunction, iPosition:=1) + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsTildeOperator, iPosition:=1) + clsFormulaRCode = clsTildeOperator Case "Natural Splines" - clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") - clsPbsSplinesTildeOperator.RemoveParameterByName("x") - clsPbsSplinesTildeOperator.AddParameter("ns", clsRFunctionParameter:=clsNsFunction, iPosition:=1) - clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + clsTildeOperator.AddParameter("1", clsRFunctionParameter:=clsNsFunction, iPosition:=1) + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsTildeOperator, iPosition:=1) + clsFormulaRCode = clsTildeOperator Case "LOESS" - clsPbsSplinesTildeOperator.RemoveParameterByName("pbs") - clsPbsSplinesTildeOperator.RemoveParameterByName("ns") - clsPbsSplinesTildeOperator.AddParameter("x", "x", iPosition:=1) - clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsPbsSplinesTildeOperator, iPosition:=1) + clsTildeOperator.AddParameter("1", "x", iPosition:=1) + clsGeomSmoothFunction.AddParameter("formula", clsROperatorParameter:=clsTildeOperator, iPosition:=1) + clsFormulaRCode = clsTildeOperator End Select - If ucrInputSmoothing.GetText = "LOESS" Then clsGeomSmoothFunction.AddParameter("method", Chr(34) & "loess" & Chr(34), iPosition:=0) clsGeomSmoothFunction.RemoveParameterByName("method.args") @@ -537,14 +621,12 @@ Public Class dlgSeasonalPlot Case "Prop Above", "Prop Below" clsGeomSmoothFunction.AddParameter("method", Chr(34) & "glm" & Chr(34), iPosition:=0) clsGeomSmoothFunction.AddParameter("method.args", clsRFunctionParameter:=clsListFunction, iPosition:=2) - clsYlabFunction.AddParameter("label", "Prop") Case "Mean", "Mean Above", "Mean Below", "Std.dev" clsGeomSmoothFunction.AddParameter("method", Chr(34) & "lm" & Chr(34), iPosition:=0) clsGeomSmoothFunction.RemoveParameterByName("method.args") - clsYlabFunction.AddParameter("label", "Std.dev") End Select End If - + ucrInputEstimatesSummary.SetName(ucrInputReferenceSummary.GetText()) Select Case ucrInputReferenceSummary.GetText Case "Prop Above", "Prop Below" clsYlabFunction.AddParameter("label", Chr(34) & "Prop" & Chr(34)) @@ -555,16 +637,22 @@ Public Class dlgSeasonalPlot End Select End Sub - Private Sub ucrInputEstimateSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputEstimateSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimate.ControlValueChanged, ucrChkOptionalSummary.ControlValueChanged - If ucrChkOptionalSummary.Checked Then - Select Case ucrInputEstimateSummary.GetText - Case "Prop Above" - clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst1GreaterOperator, iPosition:=1) - Case "Prop Below" - clsMutateFunction.AddParameter("estimate", clsROperatorParameter:=clsEst1LessOperator, iPosition:=1) - End Select - Else - UpdateSummaryParameters() + Private Sub Summary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimates.ControlValueChanged + UpdateSummaryParameters() + End Sub + + Private Sub Smoothing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceSummary.ControlValueChanged, ucrInputSmoothing.ControlValueChanged + UpdateSmoothingParameters() + End Sub + + Private Sub ucrInputReferenceThreshold_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceThreshold.ControlContentsChanged + UpdateEstimatesThresholdParameter() + End Sub + + Private Sub UpdateEstimatesThresholdParameter() + ' By default estimates has the same threshold as reference values, unless the user has already typed in ucrInputEstimatesThreshold to make them different. + If Not ucrInputEstimatesThreshold.UserTyped Then + ucrInputEstimatesThreshold.SetName(ucrInputReferenceThreshold.GetText()) End If End Sub @@ -597,14 +685,16 @@ Public Class dlgSeasonalPlot End Sub Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged - If Not ucrReceiverStation.IsEmpty Then - clsPlusOperator.AddParameter("facet_wrap", clsRFunctionParameter:=clsFacetWrapFunction, iPosition:=5) + ' Facets are handles manually since they could also be managed on a sub dialog. + ' The check for clsFacetWrapTildeOperator.clsParameters.Count = 0 ensures that facets added on a subdialog are not removed when ucrReceiverStation is empty. + If ucrReceiverStation.IsEmpty AndAlso clsFacetWrapTildeOperator.clsParameters.Count = 0 Then + clsPlusOperator.RemoveParameterByName("facets") Else - clsPlusOperator.RemoveParameterByName("facet_wrap") + clsPlusOperator.AddParameter("facets", clsRFunctionParameter:=clsFacetWrapFunction, iPosition:=5) End If End Sub - Private Sub ucrReceiverReference_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReference.ControlContentsChanged, ucrReceiverEstimate.ControlContentsChanged, ucrReceiverSeasonality.ControlContentsChanged, ucrChkMovingAverage.ControlContentsChanged, ucrInputN.ControlContentsChanged, ucrInputReferenceSummary.ControlContentsChanged, ucrInputReferenceThreshold.ControlContentsChanged, ucrInputEstimateSummary.ControlContentsChanged, ucrInputEstimateThreshold.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrInputSmoothing.ControlContentsChanged, ucrNudHarmonics.ControlContentsChanged, ucrNudPeriod.ControlContentsChanged, ucrNudSpan.ControlContentsChanged, ucrNudDf.ControlContentsChanged, ucrChkOptionalSummary.ControlContentsChanged + Private Sub ucrReceiverReference_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverReference.ControlContentsChanged, ucrReceiverEstimates.ControlContentsChanged, ucrReceiverSeasonality.ControlContentsChanged, ucrChkMovingAverage.ControlContentsChanged, ucrInputN.ControlContentsChanged, ucrInputReferenceSummary.ControlContentsChanged, ucrInputReferenceThreshold.ControlContentsChanged, ucrInputEstimatesThreshold.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrInputSmoothing.ControlContentsChanged, ucrNudHarmonics.ControlContentsChanged, ucrNudPeriod.ControlContentsChanged, ucrNudSpan.ControlContentsChanged, ucrNudDf.ControlContentsChanged TestOkEnabled() End Sub End Class From fcd307788f666cf8b7455d5ab384bf9cfd4abee6 Mon Sep 17 00:00:00 2001 From: N-thony Date: Wed, 7 Oct 2020 08:39:05 +0200 Subject: [PATCH 185/277] Fixing the problem on Check box under Missing --- instat/dlgInventoryPlot.vb | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index fe9e1ecfc2b..afdfd0b6ce0 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -239,10 +239,23 @@ Public Class dlgInventoryPlot ucrBase.OKEnabled(False) End If Else - If (Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso (ucrChkSummary.Checked OrElse (ucrChkDetails.Checked AndAlso ucrSaveDetails.IsComplete AndAlso (ucrChkYear.Checked OrElse ucrChkMonth.Checked OrElse ucrChkDay.Checked OrElse ucrChkHour.Checked OrElse ucrChkMinute.Checked OrElse ucrChkSecond.Checked)))) AndAlso (ucrChkSummary.Checked OrElse ucrChkDetails.Checked) Then + If Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrChkDetails.Checked AndAlso ucrChkSummary.Checked AndAlso ucrSaveDetails.IsComplete Then + If ucrChkYear.Checked OrElse ucrChkMonth.Checked OrElse ucrChkDay.Checked OrElse ucrChkHour.Checked OrElse ucrChkMinute.Checked OrElse ucrChkSecond.Checked Then + ucrBase.OKEnabled(True) + Exit Sub + Else + ucrBase.OKEnabled(False) + Exit Sub + End If + ElseIf Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso (ucrChkDetails.Checked AndAlso ucrSaveDetails.IsComplete AndAlso (ucrChkYear.Checked OrElse ucrChkMonth.Checked OrElse ucrChkDay.Checked OrElse ucrChkHour.Checked OrElse ucrChkMinute.Checked OrElse ucrChkSecond.Checked)) Then ucrBase.OKEnabled(True) + Exit Sub + ElseIf Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrChkSummary.Checked Then + ucrBase.OKEnabled(True) + Exit Sub Else ucrBase.OKEnabled(False) + Exit Sub End If End If End Sub From 3b6995b5dad5f3121fd31153f580775a1486090a Mon Sep 17 00:00:00 2001 From: N-thony Date: Wed, 7 Oct 2020 11:51:43 +0200 Subject: [PATCH 186/277] Documenting ucrSaveGraph --- instat/ucrSaveGraph.vb | 144 ++++++++++++++++++++++++----------------- 1 file changed, 86 insertions(+), 58 deletions(-) diff --git a/instat/ucrSaveGraph.vb b/instat/ucrSaveGraph.vb index 09406991c0e..6e168e97133 100644 --- a/instat/ucrSaveGraph.vb +++ b/instat/ucrSaveGraph.vb @@ -14,73 +14,101 @@ ' You should have received a copy of the GNU General Public License ' along with this program. If not, see . -Public Class ucrSaveGraph - Public Event SaveGraphCheckedChanged() - Public Event GraphNameChanged() - Public Event ContentsChanged() - Public bFirstLoad As Boolean - - Public Sub New() - ' This call is required by the designer. - InitializeComponent() - - ' Add any initialization after the InitializeComponent() call. - ucrInputGraphName.SetDefaultTypeAsGraph() + + +''' This control allows the user to specify how an object should be saved. +''' +''' This control can save the object of type 'graph'. +''' The user can enter/update the name of the saved object via a text box or combo box. +''' A combo box may be used to display a list of possible save names (e.g. the existing +''' graph names). +''' An optional check box allows the text/combo box to be made visible or not visible. +''' +''' +Public Class ucrSaveGraph + Public Event SaveGraphCheckedChanged() + Public Event GraphNameChanged() + Public Event ContentsChanged() + Public bFirstLoad As Boolean + + ''' Initialize component for the designer and any initialization after initializing component. + Public Sub New() + ' This call is required by the designer. + InitializeComponent() + + ' Add any initialization after the InitializeComponent() call. + ucrInputGraphName.SetDefaultTypeAsGraph() ucrInputGraphName.SetItemsTypeAsGraphs() ucrInputGraphName.SetValidationTypeAsRVariable() - bFirstLoad = True - End Sub - - Private Sub ucrSaveGraph_Load(sender As Object, e As EventArgs) Handles MyBase.Load - If bFirstLoad Then - SetDefaults() - bFirstLoad = False - End If + bFirstLoad = True + End Sub + ''' Executes whenever this control loads. + ''' If this is the first time that the control has loaded then sets the control to the default state. + ''' If the control has already been loaded then this function does nothing. + ''' + ''' Source of the event. + ''' Event information. + Private Sub ucrSaveGraph_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If bFirstLoad Then + SetDefaults() + bFirstLoad = False + End If End Sub - Private Sub SetDefaults() - chkSaveGraph.Checked = False - ucrInputGraphName.Visible = False - End Sub - - Public Sub Reset() - SetDefaults() + ''' Sets the control to its default state. + Private Sub SetDefaults() + chkSaveGraph.Checked = False + ucrInputGraphName.Visible = False End Sub - Public Sub SetDataFrameSelector(ucrNewDataFrameSelector As ucrDataFrame) - ucrInputGraphName.SetDataFrameSelector(ucrNewDataFrameSelector) - End Sub - Private Sub chkSaveGraph_CheckedChanged(sender As Object, e As EventArgs) Handles chkSaveGraph.CheckedChanged - ucrInputGraphName.Enabled = chkSaveGraph.Checked - ucrInputGraphName.Visible = chkSaveGraph.Checked - RaiseEvent SaveGraphCheckedChanged() - End Sub - - Private Sub ucrInputGraphName_NameChanged() Handles ucrInputGraphName.NameChanged - If chkSaveGraph.Checked Then - RaiseEvent GraphNameChanged() - End If + ''' Resets the control to its default state. + Public Sub Reset() + SetDefaults() + End Sub + ''' Sets the new data frame selector and links the selector to the combo box. + ''' The new data frame selector. + Public Sub SetDataFrameSelector(ucrNewDataFrameSelector As ucrDataFrame) + ucrInputGraphName.SetDataFrameSelector(ucrNewDataFrameSelector) End Sub + ''' Handles event triggered when the state of the check box changes. + ''' Source of the event. + ''' Event information. + Private Sub chkSaveGraph_CheckedChanged(sender As Object, e As EventArgs) Handles chkSaveGraph.CheckedChanged + ucrInputGraphName.Enabled = chkSaveGraph.Checked + ucrInputGraphName.Visible = chkSaveGraph.Checked + RaiseEvent SaveGraphCheckedChanged() + End Sub + ''' Handles event triggered when the combo box name changes. + Private Sub ucrInputGraphName_NameChanged() Handles ucrInputGraphName.NameChanged + If chkSaveGraph.Checked Then + RaiseEvent GraphNameChanged() + End If + End Sub + ''' Handles event triggered when the combo box contents changes. Private Sub ucrInputGraphName_ContentsChanged() Handles ucrInputGraphName.ContentsChanged RaiseEvent ContentsChanged() End Sub + ''' Save the graph when the check box save graph is checked. + ''' True if the check box is checked. + Public ReadOnly Property bSaveGraph() As Boolean + Get + Return chkSaveGraph.Checked + End Get + End Property + + ''' Sets the name of the graph in the combo box. + ''' Return the name graph. + Public ReadOnly Property strGraphName() As String + Get + Return ucrInputGraphName.GetText() + End Get + End Property - Public ReadOnly Property bSaveGraph() As Boolean - Get - Return chkSaveGraph.Checked - End Get - End Property - - Public ReadOnly Property strGraphName() As String - Get - Return ucrInputGraphName.GetText() - End Get - End Property - - Public WriteOnly Property strPrefix() As String - Set(strNewPrefix As String) - ucrInputGraphName.SetPrefix(strNewPrefix) - End Set - End Property -End Class + ''' Sets the prefix for the combo box value to the new prefix. + Public WriteOnly Property strPrefix() As String + Set(strNewPrefix As String) + ucrInputGraphName.SetPrefix(strNewPrefix) + End Set + End Property +End Class From 53afd951847ad8dbbf41fa3ab3b64bedc2084f64 Mon Sep 17 00:00:00 2001 From: N-thony Date: Wed, 7 Oct 2020 18:13:02 +0200 Subject: [PATCH 187/277] Fixing the bug on ucrSaveDetails --- instat/dlgInventoryPlot.vb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index afdfd0b6ce0..e5a5fd6944f 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -242,20 +242,18 @@ Public Class dlgInventoryPlot If Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrChkDetails.Checked AndAlso ucrChkSummary.Checked AndAlso ucrSaveDetails.IsComplete Then If ucrChkYear.Checked OrElse ucrChkMonth.Checked OrElse ucrChkDay.Checked OrElse ucrChkHour.Checked OrElse ucrChkMinute.Checked OrElse ucrChkSecond.Checked Then ucrBase.OKEnabled(True) - Exit Sub Else ucrBase.OKEnabled(False) - Exit Sub End If ElseIf Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso (ucrChkDetails.Checked AndAlso ucrSaveDetails.IsComplete AndAlso (ucrChkYear.Checked OrElse ucrChkMonth.Checked OrElse ucrChkDay.Checked OrElse ucrChkHour.Checked OrElse ucrChkMinute.Checked OrElse ucrChkSecond.Checked)) Then ucrBase.OKEnabled(True) - Exit Sub ElseIf Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrChkSummary.Checked Then ucrBase.OKEnabled(True) - Exit Sub Else ucrBase.OKEnabled(False) - Exit Sub + End If + If Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrChkSummary.Checked AndAlso ucrChkDetails.Checked AndAlso Not ucrSaveDetails.IsComplete Then + ucrBase.OKEnabled(False) End If End If End Sub From c118fe38fad040d11db6236d2d1eda60f7f71361 Mon Sep 17 00:00:00 2001 From: N-thony Date: Wed, 7 Oct 2020 18:24:12 +0200 Subject: [PATCH 188/277] Fixing the bug on ucrSaveDetails --- instat/dlgInventoryPlot.vb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index e5a5fd6944f..0f012fc8d63 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -255,6 +255,9 @@ Public Class dlgInventoryPlot If Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrChkSummary.Checked AndAlso ucrChkDetails.Checked AndAlso Not ucrSaveDetails.IsComplete Then ucrBase.OKEnabled(False) End If + If Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso ucrChkDetails.Checked AndAlso Not ucrSaveDetails.IsComplete Then + ucrBase.OKEnabled(False) + End If End If End Sub From e6bc6123c2c3ce024bbb28216b4849492cfa9bf8 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 8 Oct 2020 09:51:53 +0100 Subject: [PATCH 189/277] corrected data labels, added names_ptypes parameter to pivot_longer to ensure correct factor levels, repositioned missing checkbox --- instat/dlgSeasonalPlot.Designer.vb | 232 ++++++++++++++--------------- instat/dlgSeasonalPlot.vb | 111 +++++++++----- 2 files changed, 193 insertions(+), 150 deletions(-) diff --git a/instat/dlgSeasonalPlot.Designer.vb b/instat/dlgSeasonalPlot.Designer.vb index 86f8d7451ab..d8c61523688 100644 --- a/instat/dlgSeasonalPlot.Designer.vb +++ b/instat/dlgSeasonalPlot.Designer.vb @@ -23,29 +23,31 @@ Partial Class dlgSeasonalPlot _ Private Sub InitializeComponent() Me.grpValues = New System.Windows.Forms.GroupBox() - Me.ucrInputN = New instat.ucrInputTextBox() Me.lblN = New System.Windows.Forms.Label() - Me.ucrChkPoints = New instat.ucrCheck() - Me.ucrChkMovingAverage = New instat.ucrCheck() Me.grpSmoothing = New System.Windows.Forms.GroupBox() - Me.ucrNudSpan = New instat.ucrNud() Me.lblSpan = New System.Windows.Forms.Label() - Me.ucrNudDf = New instat.ucrNud() Me.lblHarmonics = New System.Windows.Forms.Label() Me.lblDf = New System.Windows.Forms.Label() - Me.ucrNudHarmonics = New instat.ucrNud() - Me.ucrInputSmoothing = New instat.ucrInputComboBox() Me.lblPeriod = New System.Windows.Forms.Label() - Me.ucrNudPeriod = New instat.ucrNud() Me.lblReferenceSummary = New System.Windows.Forms.Label() Me.lblSeasonality = New System.Windows.Forms.Label() Me.lblStation = New System.Windows.Forms.Label() Me.lblReference = New System.Windows.Forms.Label() Me.lblEstimates = New System.Windows.Forms.Label() + Me.lblEstimatesSummary = New System.Windows.Forms.Label() + Me.ucrInputEstimatesSummary = New instat.ucrInputTextBox() Me.ucrInputEstimatesThreshold = New instat.ucrInputTextBox() Me.ucrInputReferenceThreshold = New instat.ucrInputTextBox() Me.ucrInputReferenceSummary = New instat.ucrInputComboBox() Me.ucrSaveGraph = New instat.ucrSave() + Me.ucrNudSpan = New instat.ucrNud() + Me.ucrNudDf = New instat.ucrNud() + Me.ucrNudHarmonics = New instat.ucrNud() + Me.ucrInputSmoothing = New instat.ucrInputComboBox() + Me.ucrNudPeriod = New instat.ucrNud() + Me.ucrInputN = New instat.ucrInputTextBox() + Me.ucrChkPoints = New instat.ucrCheck() + Me.ucrChkMovingAverage = New instat.ucrCheck() Me.ucrChkRemoveMissing = New instat.ucrCheck() Me.ucrReceiverEstimates = New instat.ucrReceiverSingle() Me.ucrReceiverSeasonality = New instat.ucrReceiverSingle() @@ -53,8 +55,6 @@ Partial Class dlgSeasonalPlot Me.ucrReceiverReference = New instat.ucrReceiverSingle() Me.ucrSelectorSeasonalityComparisons = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.lblEstimatesSummary = New System.Windows.Forms.Label() - Me.ucrInputEstimatesSummary = New instat.ucrInputTextBox() Me.grpValues.SuspendLayout() Me.grpSmoothing.SuspendLayout() Me.SuspendLayout() @@ -65,23 +65,13 @@ Partial Class dlgSeasonalPlot Me.grpValues.Controls.Add(Me.lblN) Me.grpValues.Controls.Add(Me.ucrChkPoints) Me.grpValues.Controls.Add(Me.ucrChkMovingAverage) - Me.grpValues.Location = New System.Drawing.Point(12, 343) + Me.grpValues.Location = New System.Drawing.Point(12, 308) Me.grpValues.Name = "grpValues" Me.grpValues.Size = New System.Drawing.Size(243, 71) Me.grpValues.TabIndex = 16 Me.grpValues.TabStop = False Me.grpValues.Text = "Display Values As" ' - 'ucrInputN - ' - Me.ucrInputN.AddQuotesIfUnrecognised = True - Me.ucrInputN.IsMultiline = False - Me.ucrInputN.IsReadOnly = False - Me.ucrInputN.Location = New System.Drawing.Point(149, 45) - Me.ucrInputN.Name = "ucrInputN" - Me.ucrInputN.Size = New System.Drawing.Size(47, 21) - Me.ucrInputN.TabIndex = 23 - ' 'lblN ' Me.lblN.AutoSize = True @@ -91,22 +81,6 @@ Partial Class dlgSeasonalPlot Me.lblN.TabIndex = 21 Me.lblN.Text = "n:" ' - 'ucrChkPoints - ' - Me.ucrChkPoints.Checked = False - Me.ucrChkPoints.Location = New System.Drawing.Point(8, 19) - Me.ucrChkPoints.Name = "ucrChkPoints" - Me.ucrChkPoints.Size = New System.Drawing.Size(155, 20) - Me.ucrChkPoints.TabIndex = 8 - ' - 'ucrChkMovingAverage - ' - Me.ucrChkMovingAverage.Checked = False - Me.ucrChkMovingAverage.Location = New System.Drawing.Point(8, 45) - Me.ucrChkMovingAverage.Name = "ucrChkMovingAverage" - Me.ucrChkMovingAverage.Size = New System.Drawing.Size(121, 20) - Me.ucrChkMovingAverage.TabIndex = 7 - ' 'grpSmoothing ' Me.grpSmoothing.Controls.Add(Me.ucrNudSpan) @@ -118,25 +92,13 @@ Partial Class dlgSeasonalPlot Me.grpSmoothing.Controls.Add(Me.ucrInputSmoothing) Me.grpSmoothing.Controls.Add(Me.lblPeriod) Me.grpSmoothing.Controls.Add(Me.ucrNudPeriod) - Me.grpSmoothing.Location = New System.Drawing.Point(12, 253) + Me.grpSmoothing.Location = New System.Drawing.Point(12, 221) Me.grpSmoothing.Name = "grpSmoothing" Me.grpSmoothing.Size = New System.Drawing.Size(243, 75) Me.grpSmoothing.TabIndex = 17 Me.grpSmoothing.TabStop = False Me.grpSmoothing.Text = "Smoothing Curves" ' - 'ucrNudSpan - ' - Me.ucrNudSpan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSpan.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSpan.Location = New System.Drawing.Point(45, 49) - Me.ucrNudSpan.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudSpan.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSpan.Name = "ucrNudSpan" - Me.ucrNudSpan.Size = New System.Drawing.Size(50, 20) - Me.ucrNudSpan.TabIndex = 20 - Me.ucrNudSpan.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'lblSpan ' Me.lblSpan.AutoSize = True @@ -146,18 +108,6 @@ Partial Class dlgSeasonalPlot Me.lblSpan.TabIndex = 23 Me.lblSpan.Text = "Span:" ' - 'ucrNudDf - ' - Me.ucrNudDf.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDf.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudDf.Location = New System.Drawing.Point(110, 49) - Me.ucrNudDf.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudDf.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudDf.Name = "ucrNudDf" - Me.ucrNudDf.Size = New System.Drawing.Size(50, 20) - Me.ucrNudDf.TabIndex = 21 - Me.ucrNudDf.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'lblHarmonics ' Me.lblHarmonics.AutoSize = True @@ -176,28 +126,6 @@ Partial Class dlgSeasonalPlot Me.lblDf.TabIndex = 24 Me.lblDf.Text = "Degrees of freedom:" ' - 'ucrNudHarmonics - ' - Me.ucrNudHarmonics.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHarmonics.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudHarmonics.Location = New System.Drawing.Point(70, 49) - Me.ucrNudHarmonics.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudHarmonics.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudHarmonics.Name = "ucrNudHarmonics" - Me.ucrNudHarmonics.Size = New System.Drawing.Size(50, 20) - Me.ucrNudHarmonics.TabIndex = 1 - Me.ucrNudHarmonics.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrInputSmoothing - ' - Me.ucrInputSmoothing.AddQuotesIfUnrecognised = True - Me.ucrInputSmoothing.GetSetSelectedIndex = -1 - Me.ucrInputSmoothing.IsReadOnly = False - Me.ucrInputSmoothing.Location = New System.Drawing.Point(7, 20) - Me.ucrInputSmoothing.Name = "ucrInputSmoothing" - Me.ucrInputSmoothing.Size = New System.Drawing.Size(119, 21) - Me.ucrInputSmoothing.TabIndex = 0 - ' 'lblPeriod ' Me.lblPeriod.AutoSize = True @@ -207,18 +135,6 @@ Partial Class dlgSeasonalPlot Me.lblPeriod.TabIndex = 18 Me.lblPeriod.Text = "Period:" ' - 'ucrNudPeriod - ' - Me.ucrNudPeriod.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPeriod.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudPeriod.Location = New System.Drawing.Point(166, 49) - Me.ucrNudPeriod.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudPeriod.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudPeriod.Name = "ucrNudPeriod" - Me.ucrNudPeriod.Size = New System.Drawing.Size(50, 20) - Me.ucrNudPeriod.TabIndex = 2 - Me.ucrNudPeriod.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'lblReferenceSummary ' Me.lblReferenceSummary.AutoSize = True @@ -264,6 +180,25 @@ Partial Class dlgSeasonalPlot Me.lblEstimates.TabIndex = 6 Me.lblEstimates.Text = "Estimates:" ' + 'lblEstimatesSummary + ' + Me.lblEstimatesSummary.AutoSize = True + Me.lblEstimatesSummary.Location = New System.Drawing.Point(275, 165) + Me.lblEstimatesSummary.Name = "lblEstimatesSummary" + Me.lblEstimatesSummary.Size = New System.Drawing.Size(53, 13) + Me.lblEstimatesSummary.TabIndex = 20 + Me.lblEstimatesSummary.Text = "Summary:" + ' + 'ucrInputEstimatesSummary + ' + Me.ucrInputEstimatesSummary.AddQuotesIfUnrecognised = True + Me.ucrInputEstimatesSummary.IsMultiline = False + Me.ucrInputEstimatesSummary.IsReadOnly = False + Me.ucrInputEstimatesSummary.Location = New System.Drawing.Point(275, 181) + Me.ucrInputEstimatesSummary.Name = "ucrInputEstimatesSummary" + Me.ucrInputEstimatesSummary.Size = New System.Drawing.Size(89, 21) + Me.ucrInputEstimatesSummary.TabIndex = 21 + ' 'ucrInputEstimatesThreshold ' Me.ucrInputEstimatesThreshold.AddQuotesIfUnrecognised = True @@ -302,10 +237,94 @@ Partial Class dlgSeasonalPlot Me.ucrSaveGraph.Size = New System.Drawing.Size(255, 29) Me.ucrSaveGraph.TabIndex = 18 ' + 'ucrNudSpan + ' + Me.ucrNudSpan.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSpan.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSpan.Location = New System.Drawing.Point(45, 49) + Me.ucrNudSpan.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSpan.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSpan.Name = "ucrNudSpan" + Me.ucrNudSpan.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSpan.TabIndex = 20 + Me.ucrNudSpan.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudDf + ' + Me.ucrNudDf.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDf.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudDf.Location = New System.Drawing.Point(110, 49) + Me.ucrNudDf.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudDf.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudDf.Name = "ucrNudDf" + Me.ucrNudDf.Size = New System.Drawing.Size(50, 20) + Me.ucrNudDf.TabIndex = 21 + Me.ucrNudDf.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudHarmonics + ' + Me.ucrNudHarmonics.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHarmonics.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudHarmonics.Location = New System.Drawing.Point(70, 49) + Me.ucrNudHarmonics.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudHarmonics.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudHarmonics.Name = "ucrNudHarmonics" + Me.ucrNudHarmonics.Size = New System.Drawing.Size(50, 20) + Me.ucrNudHarmonics.TabIndex = 1 + Me.ucrNudHarmonics.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputSmoothing + ' + Me.ucrInputSmoothing.AddQuotesIfUnrecognised = True + Me.ucrInputSmoothing.GetSetSelectedIndex = -1 + Me.ucrInputSmoothing.IsReadOnly = False + Me.ucrInputSmoothing.Location = New System.Drawing.Point(7, 20) + Me.ucrInputSmoothing.Name = "ucrInputSmoothing" + Me.ucrInputSmoothing.Size = New System.Drawing.Size(119, 21) + Me.ucrInputSmoothing.TabIndex = 0 + ' + 'ucrNudPeriod + ' + Me.ucrNudPeriod.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPeriod.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudPeriod.Location = New System.Drawing.Point(166, 49) + Me.ucrNudPeriod.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudPeriod.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudPeriod.Name = "ucrNudPeriod" + Me.ucrNudPeriod.Size = New System.Drawing.Size(50, 20) + Me.ucrNudPeriod.TabIndex = 2 + Me.ucrNudPeriod.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrInputN + ' + Me.ucrInputN.AddQuotesIfUnrecognised = True + Me.ucrInputN.IsMultiline = False + Me.ucrInputN.IsReadOnly = False + Me.ucrInputN.Location = New System.Drawing.Point(149, 45) + Me.ucrInputN.Name = "ucrInputN" + Me.ucrInputN.Size = New System.Drawing.Size(47, 21) + Me.ucrInputN.TabIndex = 23 + ' + 'ucrChkPoints + ' + Me.ucrChkPoints.Checked = False + Me.ucrChkPoints.Location = New System.Drawing.Point(8, 19) + Me.ucrChkPoints.Name = "ucrChkPoints" + Me.ucrChkPoints.Size = New System.Drawing.Size(155, 20) + Me.ucrChkPoints.TabIndex = 8 + ' + 'ucrChkMovingAverage + ' + Me.ucrChkMovingAverage.Checked = False + Me.ucrChkMovingAverage.Location = New System.Drawing.Point(8, 45) + Me.ucrChkMovingAverage.Name = "ucrChkMovingAverage" + Me.ucrChkMovingAverage.Size = New System.Drawing.Size(121, 20) + Me.ucrChkMovingAverage.TabIndex = 7 + ' 'ucrChkRemoveMissing ' Me.ucrChkRemoveMissing.Checked = False - Me.ucrChkRemoveMissing.Location = New System.Drawing.Point(22, 219) + Me.ucrChkRemoveMissing.Location = New System.Drawing.Point(12, 396) Me.ucrChkRemoveMissing.Name = "ucrChkRemoveMissing" Me.ucrChkRemoveMissing.Size = New System.Drawing.Size(197, 20) Me.ucrChkRemoveMissing.TabIndex = 15 @@ -376,25 +395,6 @@ Partial Class dlgSeasonalPlot Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 19 ' - 'lblEstimatesSummary - ' - Me.lblEstimatesSummary.AutoSize = True - Me.lblEstimatesSummary.Location = New System.Drawing.Point(275, 165) - Me.lblEstimatesSummary.Name = "lblEstimatesSummary" - Me.lblEstimatesSummary.Size = New System.Drawing.Size(53, 13) - Me.lblEstimatesSummary.TabIndex = 20 - Me.lblEstimatesSummary.Text = "Summary:" - ' - 'ucrInputEstimatesSummary - ' - Me.ucrInputEstimatesSummary.AddQuotesIfUnrecognised = True - Me.ucrInputEstimatesSummary.IsMultiline = False - Me.ucrInputEstimatesSummary.IsReadOnly = False - Me.ucrInputEstimatesSummary.Location = New System.Drawing.Point(275, 181) - Me.ucrInputEstimatesSummary.Name = "ucrInputEstimatesSummary" - Me.ucrInputEstimatesSummary.Size = New System.Drawing.Size(89, 21) - Me.ucrInputEstimatesSummary.TabIndex = 21 - ' 'dlgSeasonalPlot ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index 7d4e0a80113..b8fceaca69e 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -32,12 +32,18 @@ Public Class dlgSeasonalPlot Private clsGreaterOperator As ROperator Private clsEst2GreaterOperator As ROperator Private clsEst2LessOperator As ROperator + ''' Dummy ROperator set to either clsRefGreaterOperator or clsRefLessOperator depending on summary option. This is used in SetRCode for ucrInputReferenceSummary. + Private clsRefGreaterOrLessOperator As ROperator Private clsMissingFilterFunction As RFunction Private clsRefIsNotNaFunction As RFunction Private clsEstIsNotNaFunction As RFunction Private clsMutateFunction As RFunction Private clsPivotLongerFunction As RFunction + Private clsPivotCFunction As RFunction + Private clsPivotListFunction As RFunction + Private clsPivotFactorFunction As RFunction + Private clsPivotFactorLevelsCFunction As New RFunction Private clsGroupByFunction As RFunction Private clsSummariseFunction As RFunction Private clsMovingMutateFunction As RFunction @@ -225,6 +231,10 @@ Public Class dlgSeasonalPlot clsEstIsNotNaFunction = New RFunction clsMutateFunction = New RFunction clsPivotLongerFunction = New RFunction + clsPivotCFunction = New RFunction + clsPivotListFunction = New RFunction + clsPivotFactorFunction = New RFunction + clsPivotFactorLevelsCFunction = New RFunction clsGroupByFunction = New RFunction clsSummariseFunction = New RFunction clsMovingMutateFunction = New RFunction @@ -261,14 +271,12 @@ Public Class dlgSeasonalPlot clsPipeOperator.SetOperation("%>%") clsPipeOperator.AddParameter("filter", clsRFunctionParameter:=clsMissingFilterFunction, iPosition:=1) - clsPipeOperator.AddParameter("mutate", clsRFunctionParameter:=clsMutateFunction, iPosition:=2) clsPipeOperator.AddParameter("pivot_longer", clsRFunctionParameter:=clsPivotLongerFunction, iPosition:=3) clsPipeOperator.AddParameter("group_by", clsRFunctionParameter:=clsGroupByFunction, iPosition:=5) clsPipeOperator.AddParameter("summarise", clsRFunctionParameter:=clsSummariseFunction, iPosition:=6) clsPipeOperator.AddParameter("moving_mutate", clsRFunctionParameter:=clsMovingMutateFunction, iPosition:=7) clsPipeOperator.AddParameter("ggplot", clsROperatorParameter:=clsPlusOperator, iPosition:=8) - clsAndOperator.SetOperation("&") clsAndOperator.AddParameter("ref", clsRFunctionParameter:=clsRefIsNotNaFunction, iPosition:=0) clsAndOperator.AddParameter("est", clsRFunctionParameter:=clsEstIsNotNaFunction, iPosition:=1) @@ -303,9 +311,20 @@ Public Class dlgSeasonalPlot clsPivotLongerFunction.SetPackageName("tidyr") clsPivotLongerFunction.SetRCommand("pivot_longer") - clsPivotLongerFunction.AddParameter("cols", "c(reference, estimates)", iPosition:=0) + clsPivotLongerFunction.AddParameter("cols", clsRFunctionParameter:=clsPivotCFunction, iPosition:=0) clsPivotLongerFunction.AddParameter("names_to", Chr(34) & "data" & Chr(34), iPosition:=1) clsPivotLongerFunction.AddParameter("values_to", Chr(34) & "value" & Chr(34), iPosition:=2) + clsPivotLongerFunction.AddParameter("names_ptypes", clsRFunctionParameter:=clsPivotListFunction, iPosition:=6) + + clsPivotCFunction.SetRCommand("c") + + clsPivotListFunction.SetRCommand("list") + clsPivotListFunction.AddParameter("data", clsRFunctionParameter:=clsPivotFactorFunction, iPosition:=0) + + clsPivotFactorFunction.SetRCommand("factor") + clsPivotFactorFunction.AddParameter("levels", clsRFunctionParameter:=clsPivotFactorLevelsCFunction, iPosition:=1) + + clsPivotFactorLevelsCFunction.SetRCommand("c") clsGroupByFunction.SetPackageName("dplyr") clsGroupByFunction.SetRCommand("group_by") @@ -443,11 +462,13 @@ Public Class dlgSeasonalPlot Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverReference.AddAdditionalCodeParameterPair(clsRefGreaterOperator, ucrReceiverReference.GetParameter, iAdditionalPairNo:=1) ucrReceiverReference.AddAdditionalCodeParameterPair(clsRefLessOperator, ucrReceiverReference.GetParameter, iAdditionalPairNo:=2) + ucrReceiverReference.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("0", iNewPosition:=0, bNewIncludeArgumentName:=False), iAdditionalPairNo:=3) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsEst1GreaterOperator, ucrReceiverEstimates.GetParameter, iAdditionalPairNo:=1) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsEst1LessOperator, ucrReceiverEstimates.GetParameter, iAdditionalPairNo:=2) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsEst2GreaterOperator, ucrReceiverEstimates.GetParameter, iAdditionalPairNo:=3) ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsEst2LessOperator, ucrReceiverEstimates.GetParameter, iAdditionalPairNo:=4) + ucrReceiverEstimates.AddAdditionalCodeParameterPair(clsPivotCFunction, New RParameter("1", iNewPosition:=1, bNewIncludeArgumentName:=False), iAdditionalPairNo:=5) ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsRefLessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=1) ucrInputReferenceThreshold.AddAdditionalCodeParameterPair(clsLessOperator, ucrInputReferenceThreshold.GetParameter, iAdditionalPairNo:=2) @@ -490,16 +511,31 @@ Public Class dlgSeasonalPlot ''' True if the dialog is being reset. Private Sub ReferenceSummarySetRCode(bReset As Boolean) Dim clsTempParam As RParameter - Dim clsTempROp As ROperator Dim clsTempRFunc As RFunction + Dim strReferenceName As String = "" + Dim strEstimatesName As String = "" + + strReferenceName = ucrReceiverReference.GetVariableNames(False) + strEstimatesName = ucrReceiverEstimates.GetVariableNames(False) ' Used to return a developer error if R Code cannot be set. Dim ReferenceSummaryDevError = Sub() MsgBox("Developer error: in " & ucrInputReferenceSummary.Name & ". Cannot determine how to set the control from the RCode. Modify conditions so that only one state can satisfy its conditions.") End Sub - ' filter2 is used in clsPipeOperator to filter the data to for "Mean Above" or "Mean Below" calculation - If clsPipeOperator.ContainsParameter("filter2") Then + ' mutate is used in clsPipeOperator to calculate proportions for "Prop Above" and "Prop Below" summaries + If clsPipeOperator.ContainsParameter("mutate") Then + ' If the "reference" parameter in clsMutateFunction has clsRefGreaterOperator as its value then the summary is "Prop Above" + ' clsRefGreaterOrLessOperator is the reference parameter in clsMutateFunction + If clsRefGreaterOrLessOperator IsNot Nothing AndAlso clsRefGreaterOrLessOperator.Equals(clsRefGreaterOperator) Then + ucrInputReferenceSummary.SetName("Prop Above") + ElseIf clsRefGreaterOrLessOperator IsNot Nothing AndAlso clsRefGreaterOrLessOperator.Equals(clsRefLessOperator) Then + ucrInputReferenceSummary.SetName("Prop Below") + Else + ReferenceSummaryDevError() + End If + ' filter2 is used in clsPipeOperator to filter the data to for "Mean Above" or "Mean Below" summaries + ElseIf clsPipeOperator.ContainsParameter("filter2") Then ' If clsMeanFilterFunction contains an "operator" parameter and its value is clsGreaterOperator then the summary is "Mean Above" If clsMeanFilterFunction.ContainsParameter("operator") AndAlso clsMeanFilterFunction.GetParameter("operator").clsArgumentCodeStructure IsNot Nothing AndAlso clsMeanFilterFunction.GetParameter("operator").clsArgumentCodeStructure.Equals(clsGreaterOperator) Then ucrInputReferenceSummary.SetName("Mean Above") @@ -509,25 +545,13 @@ Public Class dlgSeasonalPlot Else ReferenceSummaryDevError() End If - ' If filter2 is not in clsPipeOperator then the summary is one of the other four summaries and can be determined by "summary" parameter in clsSummariseFunction + ' If filter2 is not in clsPipeOperator then the summary is either "Mean" or "Std.dev" and can be determined by the "summary" parameter in clsSummariseFunction ElseIf clsSummariseFunction.ContainsParameter("summary") Then clsTempParam = clsSummariseFunction.GetParameter("summary") - clsTempROp = TryCast(clsTempParam.clsArgumentCodeStructure, ROperator) clsTempRFunc = TryCast(clsTempParam.clsArgumentCodeStructure, RFunction) - ' If "summary" parameter contains an ROperator then it is either for "Prop Above" or "Prop Below" - If clsTempROp IsNot Nothing Then - ' If "reference" parameter in clsMutateFunction has clsRefGreaterOperator as its value then the summary is "Prop Above" - If clsMutateFunction.ContainsParameter("reference") AndAlso clsMutateFunction.GetParameter("reference").clsArgumentCodeStructure IsNot Nothing AndAlso clsMutateFunction.GetParameter("reference").clsArgumentCodeStructure.Equals(clsRefGreaterOperator) Then - ucrInputReferenceSummary.SetName("Prop Above") - ' If "reference" parameter in clsMutateFunction has clsRefLessOperator as its value then the summary is "Prop Below" - ElseIf clsMutateFunction.ContainsParameter("reference") AndAlso clsMutateFunction.GetParameter("reference").clsArgumentCodeStructure IsNot Nothing AndAlso clsMutateFunction.GetParameter("reference").clsArgumentCodeStructure.Equals(clsRefLessOperator) Then - ucrInputReferenceSummary.SetName("Prop Below") - Else - ReferenceSummaryDevError() - End If - ' If "summary" parameter contains an RFunction then it is either for "Mean" or "Std.dev" - ' Check the name of the RFunction to confirm which one. - ElseIf clsTempRFunc IsNot Nothing Then + ' If "summary" parameter contains an RFunction then it is either for "Mean" or "Std.dev" + ' Check the name of the RFunction to confirm which one. + If clsTempRFunc IsNot Nothing Then If clsTempRFunc.strRCommand = "mean" Then ucrInputReferenceSummary.SetName("Mean") ElseIf clsTempRFunc.strRCommand = "sd" Then @@ -559,38 +583,47 @@ Public Class dlgSeasonalPlot End Sub Private Sub UpdateSummaryParameters() + Dim strReferenceName As String = "" + Dim strEstimatesName As String = "" + + strReferenceName = ucrReceiverReference.GetVariableNames(False) + strEstimatesName = ucrReceiverEstimates.GetVariableNames(False) + + If clsMutateFunction IsNot Nothing Then + clsMutateFunction.ClearParameters() + End If Select Case ucrInputReferenceSummary.GetText Case "Prop Above" clsPipeOperator.RemoveParameterByName("filter2") - clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefGreaterOperator, iPosition:=0) - clsMutateFunction.AddParameter("estimates", clsROperatorParameter:=clsEst2GreaterOperator, iPosition:=1) + clsMutateFunction.AddParameter(strReferenceName, clsROperatorParameter:=clsRefGreaterOperator, iPosition:=0) + clsMutateFunction.AddParameter(strEstimatesName, clsROperatorParameter:=clsEst2GreaterOperator, iPosition:=1) clsSummariseFunction.AddParameter("summary", clsROperatorParameter:=clsDivideOperator, iPosition:=3) + clsPipeOperator.AddParameter("mutate", clsRFunctionParameter:=clsMutateFunction, iPosition:=2) + clsRefGreaterOrLessOperator = clsRefGreaterOperator Case "Prop Below" clsPipeOperator.RemoveParameterByName("filter2") - clsMutateFunction.AddParameter("reference", clsROperatorParameter:=clsRefLessOperator, iPosition:=0) - clsMutateFunction.AddParameter("estimates", clsROperatorParameter:=clsEst2LessOperator, iPosition:=1) + clsMutateFunction.AddParameter(strReferenceName, clsROperatorParameter:=clsRefLessOperator, iPosition:=0) + clsMutateFunction.AddParameter(strEstimatesName, clsROperatorParameter:=clsEst2LessOperator, iPosition:=1) clsSummariseFunction.AddParameter("summary", clsROperatorParameter:=clsDivideOperator, iPosition:=3) + clsPipeOperator.AddParameter("mutate", clsRFunctionParameter:=clsMutateFunction, iPosition:=2) + clsRefGreaterOrLessOperator = clsRefLessOperator Case "Mean" clsPipeOperator.RemoveParameterByName("filter2") - clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) - clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) + clsPipeOperator.RemoveParameterByName("mutate") clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) Case "Mean Above" - clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) - clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) + clsPipeOperator.RemoveParameterByName("mutate") clsMeanFilterFunction.AddParameter("operator", clsROperatorParameter:=clsGreaterOperator, bIncludeArgumentName:=False, iPosition:=0) clsPipeOperator.AddParameter("filter2", clsRFunctionParameter:=clsMeanFilterFunction, iPosition:=4) clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) Case "Mean Below" - clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) - clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) + clsPipeOperator.RemoveParameterByName("mutate") clsMeanFilterFunction.AddParameter("operator", clsROperatorParameter:=clsLessOperator, bIncludeArgumentName:=False, iPosition:=0) clsPipeOperator.AddParameter("filter2", clsRFunctionParameter:=clsMeanFilterFunction, iPosition:=4) clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsMeanFunction, iPosition:=3) Case "Std.dev" clsPipeOperator.RemoveParameterByName("filter2") - clsMutateFunction.AddParameter("reference", ucrReceiverReference.GetVariableNames(False), iPosition:=0) - clsMutateFunction.AddParameter("estimates", ucrReceiverEstimates.GetVariableNames(False), iPosition:=1) + clsPipeOperator.RemoveParameterByName("mutate") clsSummariseFunction.AddParameter("summary", clsRFunctionParameter:=clsStdFunction, iPosition:=3) End Select End Sub @@ -638,6 +671,16 @@ Public Class dlgSeasonalPlot End Sub Private Sub Summary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceSummary.ControlValueChanged, ucrReceiverReference.ControlValueChanged, ucrReceiverEstimates.ControlValueChanged + If ucrReceiverReference.IsEmpty Then + clsPivotFactorLevelsCFunction.RemoveParameterByName("0") + Else + clsPivotFactorLevelsCFunction.AddParameter("0", ucrReceiverReference.GetVariableNames(), iPosition:=0, bIncludeArgumentName:=False) + End If + If ucrReceiverEstimates.IsEmpty Then + clsPivotFactorLevelsCFunction.RemoveParameterByName("1") + Else + clsPivotFactorLevelsCFunction.AddParameter("1", ucrReceiverEstimates.GetVariableNames(), iPosition:=1, bIncludeArgumentName:=False) + End If UpdateSummaryParameters() End Sub From 79c2deaeced749f4d308a96460afe63ccf8bb4dd Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 8 Oct 2020 10:58:52 +0100 Subject: [PATCH 190/277] added names_ptypes parameter to pivot_longer to ensure labels are in correct order --- instat/dlgTimeSeriesPlot.vb | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index d78bd074656..c277f0bd446 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -53,10 +53,13 @@ Public Class dlgTimeSeriesPlot ' Stack data ' These functions construct the R code below. This stacks the two columns which is needed for plotting. ' df_stack <- df %>% - ' pivot_longer(cols = c(gauge, estimate), names_to = "data", values_to = "value") + ' pivot_longer(cols = c(gauge, estimate), names_to = "data", values_to = "value", names_ptypes = list(data = factor(levels = c("gauge", "estimates")))) Private clsStackOperator As ROperator Private clsPivotLonger As RFunction Private clsPivotCFunction As RFunction + Private clsPivotListFunction As RFunction + Private clsPivotFactorFunction As RFunction + Private clsPivotFactorLevelsCFunction As New RFunction ' Calculate Individual Summaries. ' These functions construct the R code below if mean lines and/or if annotated individual summaries are added. @@ -271,6 +274,9 @@ Public Class dlgTimeSeriesPlot clsStackOperator = New ROperator clsPivotLonger = New RFunction clsPivotCFunction = New RFunction + clsPivotListFunction = New RFunction + clsPivotFactorFunction = New RFunction + clsPivotFactorLevelsCFunction = New RFunction clsIndividualSummariesOperator = New ROperator clsIndividualSummariesGroupBy = New RFunction @@ -387,10 +393,19 @@ Public Class dlgTimeSeriesPlot clsPivotLonger.SetRCommand("pivot_longer") clsPivotLonger.AddParameter("cols", clsRFunctionParameter:=clsPivotCFunction, iPosition:=1) clsPivotLonger.AddParameter("names_to", Chr(34) & strName & Chr(34), iPosition:=2) + clsPivotLonger.AddParameter("names_ptypes", clsRFunctionParameter:=clsPivotListFunction, iPosition:=6) clsPivotLonger.AddParameter("values_to", Chr(34) & strValue & Chr(34), iPosition:=8) clsPivotCFunction.SetRCommand("c") + clsPivotListFunction.SetRCommand("list") + clsPivotListFunction.AddParameter(strName, clsRFunctionParameter:=clsPivotFactorFunction, iPosition:=0) + + clsPivotFactorFunction.SetRCommand("factor") + clsPivotFactorFunction.AddParameter("levels", clsRFunctionParameter:=clsPivotFactorLevelsCFunction, iPosition:=1) + + clsPivotFactorLevelsCFunction.SetRCommand("c") + ' Calculate individual summaries clsIndividualSummariesOperator.SetOperation("%>%") @@ -756,11 +771,13 @@ Public Class dlgTimeSeriesPlot strEstimates = "" clsEstimatesFilter.RemoveParameterByName("1") clsEstimatesPasteLabel.RemoveParameterByName("0") + clsPivotFactorLevelsCFunction.RemoveParameterByName("1") Else strEstimates = ucrReceiverEstimates.GetVariableNames(False) clsAdjustNAMutate.AddParameter(strEstimates, clsRFunctionParameter:=clsIfElseEstimates, iPosition:=1) clsEstimatesFilter.AddParameter("1", strName & "==" & ucrReceiverEstimates.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) clsEstimatesPasteLabel.AddParameter("0", Chr(34) & strEstimates & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPivotFactorLevelsCFunction.AddParameter("1", Chr(34) & strEstimates & Chr(34), iPosition:=1, bIncludeArgumentName:=False) End If End Sub @@ -772,11 +789,13 @@ Public Class dlgTimeSeriesPlot strReference = "" clsReferenceFilter.RemoveParameterByName("1") clsReferencePasteLabel.RemoveParameterByName("0") + clsPivotFactorLevelsCFunction.RemoveParameterByName("0") Else strReference = ucrReceiverReference.GetVariableNames(False) clsAdjustNAMutate.AddParameter(strReference, clsRFunctionParameter:=clsIfElseReference, iPosition:=0) clsReferenceFilter.AddParameter("1", strName & "==" & ucrReceiverReference.GetVariableNames(True), iPosition:=1, bIncludeArgumentName:=False) clsReferencePasteLabel.AddParameter("0", Chr(34) & strReference & Chr(34), iPosition:=0, bIncludeArgumentName:=False) + clsPivotFactorLevelsCFunction.AddParameter("0", Chr(34) & strReference & Chr(34), iPosition:=0, bIncludeArgumentName:=False) End If End Sub From 4fb9915db0e38ee3a5bc6377eeebf1558d72db5b Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Fri, 9 Oct 2020 11:25:56 +0100 Subject: [PATCH 191/277] fixes rain totals bug with multiple station #5959 --- instat/static/InstatObject/R/instat_object_R6.R | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index e4b7ead5622..8441256ac63 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1685,9 +1685,11 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r plant_day_name <- "plant_day" plant_length_name <- "plant_length" rain_total_name <- "rain_total" + + is_station <- !missing(station) if(missing(year)) stop("Year column must be specified.") - if(missing(station)) by <- year + if(!is_station) by <- year else by <- c(year, station) if(missing(season_data_name)) season_data_name <- data_name if(season_data_name != data_name) { @@ -1712,7 +1714,7 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r expand_list[[length(expand_list) + 1]] <- unique_year names_list[length(names_list) + 1] <- year - if(!missing(station)) { + if(is_station) { station_col <- self$get_columns_from_data(data_name, station) unique_station <- na.omit(unique(station_col)) expand_list[[length(expand_list) + 1]] <- unique_station @@ -1749,7 +1751,10 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r # Rain total condition df[["rain_total_actual"]] <- sapply(1:nrow(df), function(x) { - rain_values <- daily_data[[rain]][daily_data[[year]] == df[[year]][x] & daily_data[[day]] >= df[[plant_day_name]][x] & daily_data[[day]] < df[[plant_day_name]][x] + df[[plant_length_name]][x]] + ind <- daily_data[[year]] == df[[year]][x] & daily_data[[day]] >= df[[plant_day_name]][x] & + daily_data[[day]] < (df[[plant_day_name]][x] + df[[plant_length_name]][x]) + if(is_station) ind <- ind & (daily_data[[station]] == df[[station]][x]) + rain_values <- daily_data[[rain]][ind] sum_rain <- sum(rain_values, na.rm = TRUE) # TODO + 1 is needed because of non leap years # if period include 29 Feb then period is 1 less than required length From f1b6185dfc247095dec748d9e7bf6c1417b2bb56 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Sat, 10 Oct 2020 10:43:24 +0300 Subject: [PATCH 192/277] New missing options sub-dialog --- instat/instat.vbproj | 9 ++ instat/sdgMissingOptions.Designer.vb | 52 ++++++++++++ instat/sdgMissingOptions.resx | 120 +++++++++++++++++++++++++++ instat/sdgMissingOptions.vb | 22 +++++ 4 files changed, 203 insertions(+) create mode 100644 instat/sdgMissingOptions.Designer.vb create mode 100644 instat/sdgMissingOptions.resx create mode 100644 instat/sdgMissingOptions.vb diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 74a764bf5a9..717e4f1d762 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -340,6 +340,12 @@ Form + + sdgMissingOptions.vb + + + Form + sdgThemesSub.vb @@ -2654,6 +2660,9 @@ dlgTreemap.vb + + sdgMissingOptions.vb + sdgThemesSub.vb diff --git a/instat/sdgMissingOptions.Designer.vb b/instat/sdgMissingOptions.Designer.vb new file mode 100644 index 00000000000..6f9ecc07281 --- /dev/null +++ b/instat/sdgMissingOptions.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class sdgMissingOptions + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.ucrBase = New instat.ucrButtonsSubdialogue() + Me.SuspendLayout() + ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(86, 303) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(142, 30) + Me.ucrBase.TabIndex = 0 + ' + 'sdgMissingOptions + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(324, 345) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "sdgMissingOptions" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Missing Options" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents ucrBase As ucrButtonsSubdialogue +End Class diff --git a/instat/sdgMissingOptions.resx b/instat/sdgMissingOptions.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/sdgMissingOptions.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/sdgMissingOptions.vb b/instat/sdgMissingOptions.vb new file mode 100644 index 00000000000..133b44c3e53 --- /dev/null +++ b/instat/sdgMissingOptions.vb @@ -0,0 +1,22 @@ +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + +Imports instat.Translations +Public Class sdgMissingOptions + Private Sub sdgMissingOptions_Load(sender As Object, e As EventArgs) Handles MyBase.Load + + End Sub +End Class \ No newline at end of file From 00adb926cccc08cf0beac7c7c4d633f1b68c02cd Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 12 Oct 2020 22:16:16 +0300 Subject: [PATCH 193/277] moving missing values options into a separate subdialog --- instat/dlgClimaticSummary.Designer.vb | 56 +- instat/dlgClimaticSummary.resx | 81 +- instat/dlgClimaticSummary.vb | 30 +- instat/dlgColumnStats.Designer.vb | 10 + instat/dlgColumnStats.resx | 41 +- instat/dlgColumnStats.vb | 8 + instat/sdgMissingOptions.Designer.vb | 114 +- instat/sdgMissingOptions.vb | 59 + instat/sdgSummaries.Designer.vb | 122 +- instat/sdgSummaries.resx | 3848 ++++++++----------------- instat/sdgSummaries.vb | 48 +- 11 files changed, 1521 insertions(+), 2896 deletions(-) diff --git a/instat/dlgClimaticSummary.Designer.vb b/instat/dlgClimaticSummary.Designer.vb index 1cdf5ab4279..87a9c2198b1 100644 --- a/instat/dlgClimaticSummary.Designer.vb +++ b/instat/dlgClimaticSummary.Designer.vb @@ -49,14 +49,15 @@ Partial Class dlgClimaticSummary Me.cmdSummary = New System.Windows.Forms.Button() Me.lblWithinYear = New System.Windows.Forms.Label() Me.grpOptions = New System.Windows.Forms.GroupBox() + Me.cmdDoyRange = New System.Windows.Forms.Button() + Me.lblYear = New System.Windows.Forms.Label() + Me.cmdMissingOptions = New System.Windows.Forms.Button() + Me.ucrInputFilterPreview = New instat.ucrInputTextBox() Me.ucrChkOmitMissing = New instat.ucrCheck() Me.ucrChkAddDateColumn = New instat.ucrCheck() Me.ucrChkStoreResults = New instat.ucrCheck() Me.ucrChkPrintOutput = New instat.ucrCheck() Me.ucrChkDropUnusedLevels = New instat.ucrCheck() - Me.cmdDoyRange = New System.Windows.Forms.Button() - Me.lblYear = New System.Windows.Forms.Label() - Me.ucrInputFilterPreview = New instat.ucrInputTextBox() Me.ucrSelectorVariable = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverWithinYear = New instat.ucrReceiverSingle() Me.ucrReceiverDOY = New instat.ucrReceiverSingle() @@ -133,6 +134,7 @@ Partial Class dlgClimaticSummary ' 'grpOptions ' + Me.grpOptions.Controls.Add(Me.cmdMissingOptions) Me.grpOptions.Controls.Add(Me.ucrChkOmitMissing) Me.grpOptions.Controls.Add(Me.ucrChkAddDateColumn) Me.grpOptions.Controls.Add(Me.ucrChkStoreResults) @@ -142,6 +144,33 @@ Partial Class dlgClimaticSummary Me.grpOptions.Name = "grpOptions" Me.grpOptions.TabStop = False ' + 'cmdDoyRange + ' + resources.ApplyResources(Me.cmdDoyRange, "cmdDoyRange") + Me.cmdDoyRange.Name = "cmdDoyRange" + Me.cmdDoyRange.Tag = "" + Me.cmdDoyRange.UseVisualStyleBackColor = True + ' + 'lblYear + ' + resources.ApplyResources(Me.lblYear, "lblYear") + Me.lblYear.Name = "lblYear" + ' + 'cmdMissingOptions + ' + resources.ApplyResources(Me.cmdMissingOptions, "cmdMissingOptions") + Me.cmdMissingOptions.Name = "cmdMissingOptions" + Me.cmdMissingOptions.Tag = "MissingOptions" + Me.cmdMissingOptions.UseVisualStyleBackColor = True + ' + 'ucrInputFilterPreview + ' + Me.ucrInputFilterPreview.AddQuotesIfUnrecognised = True + Me.ucrInputFilterPreview.IsMultiline = False + Me.ucrInputFilterPreview.IsReadOnly = True + resources.ApplyResources(Me.ucrInputFilterPreview, "ucrInputFilterPreview") + Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview" + ' 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.Checked = False @@ -172,26 +201,6 @@ Partial Class dlgClimaticSummary resources.ApplyResources(Me.ucrChkDropUnusedLevels, "ucrChkDropUnusedLevels") Me.ucrChkDropUnusedLevels.Name = "ucrChkDropUnusedLevels" ' - 'cmdDoyRange - ' - resources.ApplyResources(Me.cmdDoyRange, "cmdDoyRange") - Me.cmdDoyRange.Name = "cmdDoyRange" - Me.cmdDoyRange.Tag = "" - Me.cmdDoyRange.UseVisualStyleBackColor = True - ' - 'lblYear - ' - resources.ApplyResources(Me.lblYear, "lblYear") - Me.lblYear.Name = "lblYear" - ' - 'ucrInputFilterPreview - ' - Me.ucrInputFilterPreview.AddQuotesIfUnrecognised = True - Me.ucrInputFilterPreview.IsMultiline = False - Me.ucrInputFilterPreview.IsReadOnly = True - resources.ApplyResources(Me.ucrInputFilterPreview, "ucrInputFilterPreview") - Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview" - ' 'ucrSelectorVariable ' Me.ucrSelectorVariable.bDropUnusedFilterLevels = False @@ -327,4 +336,5 @@ Partial Class dlgClimaticSummary Friend WithEvents ucrReceiverYear As ucrReceiverSingle Friend WithEvents ucrChkAddDateColumn As ucrCheck Friend WithEvents ucrChkOmitMissing As ucrCheck + Friend WithEvents cmdMissingOptions As Button End Class diff --git a/instat/dlgClimaticSummary.resx b/instat/dlgClimaticSummary.resx index bbe7c4b7f20..c702d88144a 100644 --- a/instat/dlgClimaticSummary.resx +++ b/instat/dlgClimaticSummary.resx @@ -235,7 +235,7 @@ NoControl - 262, 68 + 282, 68 43, 13 @@ -265,7 +265,7 @@ NoControl - 262, 109 + 282, 109 33, 13 @@ -295,13 +295,13 @@ NoControl - 262, 191 + 282, 191 66, 13 - 13 + 11 Day of Year: @@ -325,7 +325,7 @@ NoControl - 262, 150 + 282, 150 48, 13 @@ -352,13 +352,13 @@ NoControl - 258, 326 + 282, 317 120, 26 - 23 + 18 Summaries @@ -382,7 +382,7 @@ NoControl - 262, 273 + 282, 273 65, 13 @@ -405,6 +405,33 @@ 5 + + NoControl + + + 156, 83 + + + 104, 26 + + + 19 + + + Missing Options + + + cmdMissingOptions + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpOptions + + + 0 + 6, 86 @@ -424,7 +451,7 @@ grpOptions - 0 + 1 6, 109 @@ -445,7 +472,7 @@ grpOptions - 1 + 2 6, 17 @@ -466,7 +493,7 @@ grpOptions - 2 + 3 6, 40 @@ -487,7 +514,7 @@ grpOptions - 3 + 4 6, 63 @@ -508,13 +535,13 @@ grpOptions - 4 + 5 10, 233 - 160, 136 + 266, 136 17 @@ -544,7 +571,7 @@ 105, 26 - 25 + 20 Day Range @@ -568,13 +595,13 @@ NoControl - 262, 232 + 282, 232 32, 13 - 11 + 13 Year: @@ -598,7 +625,7 @@ 242, 22 - 26 + 21 ucrInputFilterPreview @@ -646,7 +673,7 @@ 415, 480 - 262, 207 + 282, 207 0, 0, 0, 0 @@ -655,7 +682,7 @@ 120, 20 - 14 + 12 ucrReceiverDOY @@ -670,7 +697,7 @@ 12 - 262, 248 + 282, 248 0, 0, 0, 0 @@ -679,7 +706,7 @@ 120, 20 - 12 + 14 ucrReceiverYear @@ -694,7 +721,7 @@ 13 - 262, 125 + 282, 125 0, 0, 0, 0 @@ -718,7 +745,7 @@ 14 - 262, 84 + 282, 84 0, 0, 0, 0 @@ -742,7 +769,7 @@ 15 - 262, 166 + 282, 166 0, 0, 0, 0 @@ -772,7 +799,7 @@ 399, 52 - 24 + 22 ucrBase @@ -820,7 +847,7 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 262, 289 + 282, 289 0, 0, 0, 0 diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index 884bce1ffc5..cc96b351272 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -53,6 +53,7 @@ Public Class dlgClimaticSummary ucrBase.clsRsyntax.iCallType = 0 ucrBase.iHelpTopicID = 510 ucrChkDropUnusedLevels.Enabled = False ' removed this functionality so this is disabled + cmdMissingOptions.Enabled = False ucrSelectorVariable.SetParameter(New RParameter("data_name", 0)) ucrSelectorVariable.SetParameterIsString() @@ -210,7 +211,6 @@ Public Class dlgClimaticSummary ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.SetBaseRFunction(clsDefaultFunction) - bResetSubdialog = True End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -296,6 +296,13 @@ Public Class dlgClimaticSummary Else clsDefaultFunction.RemoveParameterByName("use") End If + cmdMissingOptions.Enabled = ucrChkOmitMissing.Checked + End Sub + + Private Sub cmdMissingOptions_Click(sender As Object, e As EventArgs) Handles cmdMissingOptions.Click + sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsDefaultFunction, clsNewConcFunction:=clsConcFunction, bReset:=bResetSubdialog) + bResetSubdialog = False + sdgMissingOptions.ShowDialog() End Sub Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDOY.ControlValueChanged, ucrSelectorVariable.ControlValueChanged, ucrChkAddDateColumn.ControlValueChanged, ucrReceiverDate.ControlValueChanged @@ -329,10 +336,6 @@ Public Class dlgClimaticSummary End If End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrReceiverWithinYear.ControlContentsChanged, ucrPnlAnnualWithin.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged - TestOKEnabled() - End Sub - Private Sub ucrSelectorVariable_DataFrameChanged() Handles ucrSelectorVariable.DataFrameChanged clsDayFilterCalcFromList.ClearParameters() End Sub @@ -347,13 +350,11 @@ Public Class dlgClimaticSummary Private Sub SetFactors() If bRCodeSet Then - - If Not ucrReceiverStation.IsEmpty Then - clsDefaultFactors.AddParameter(ucrReceiverStation.GetParameter()) - Else - clsDefaultFactors.RemoveParameterByName("station") - End If + clsDefaultFactors.AddParameter(ucrReceiverStation.GetParameter()) + Else + clsDefaultFactors.RemoveParameterByName("station") + End If If rdoAnnual.Checked Then clsDefaultFactors.RemoveParameterByName("within_variable") @@ -365,9 +366,9 @@ Public Class dlgClimaticSummary clsDefaultFactors.RemoveParameterByName("year") clsDefaultFactors.AddParameter(ucrReceiverWithinYear.GetParameter()) End If - End If End Sub + Private Sub ucrChkAddDateColumn_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkAddDateColumn.ControlValueChanged If ucrChkAddDateColumn.Checked Then ucrBase.clsRsyntax.AddToAfterCodes(clsAddDateFunction, iPosition:=0) @@ -375,7 +376,12 @@ Public Class dlgClimaticSummary ucrBase.clsRsyntax.RemoveFromAfterCodes(clsAddDateFunction) End If End Sub + Private Sub Receivers_controlValueChanged(ucrChangedControl As Control) Handles ucrReceiverStation.ControlValueChanged, ucrReceiverWithinYear.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrReceiverElement.ControlValueChanged, ucrReceiverDOY.ControlValueChanged, ucrReceiverDate.ControlValueChanged SetFactors() End Sub + + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrReceiverWithinYear.ControlContentsChanged, ucrPnlAnnualWithin.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged + TestOKEnabled() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgColumnStats.Designer.vb b/instat/dlgColumnStats.Designer.vb index 7e19e0fa029..2e64167c065 100644 --- a/instat/dlgColumnStats.Designer.vb +++ b/instat/dlgColumnStats.Designer.vb @@ -55,6 +55,7 @@ Partial Class dlgColumnStats Me.ucrReceiverSelectedVariables = New instat.ucrReceiverMultiple() Me.ucrSelectorForColumnStatistics = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() + Me.cmdMissingOptions = New System.Windows.Forms.Button() Me.grpOptions.SuspendLayout() Me.SuspendLayout() ' @@ -70,6 +71,7 @@ Partial Class dlgColumnStats ' 'grpOptions ' + Me.grpOptions.Controls.Add(Me.cmdMissingOptions) Me.grpOptions.Controls.Add(Me.ucrChkOriginalLevel) Me.grpOptions.Controls.Add(Me.ucrChkStoreResults) Me.grpOptions.Controls.Add(Me.ucrChkOmitMissing) @@ -169,6 +171,13 @@ Partial Class dlgColumnStats resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' + 'cmdMissingOptions + ' + resources.ApplyResources(Me.cmdMissingOptions, "cmdMissingOptions") + Me.cmdMissingOptions.Name = "cmdMissingOptions" + Me.cmdMissingOptions.Tag = "MissingOptions" + Me.cmdMissingOptions.UseVisualStyleBackColor = True + ' 'dlgColumnStats ' resources.ApplyResources(Me, "$this") @@ -211,4 +220,5 @@ Partial Class dlgColumnStats Friend WithEvents ucrChkOriginalLevel As ucrCheck Friend WithEvents ucrChkWeights As ucrCheck Friend WithEvents ucrReceiverWeights As ucrReceiverSingle + Friend WithEvents cmdMissingOptions As Button End Class diff --git a/instat/dlgColumnStats.resx b/instat/dlgColumnStats.resx index de296ae1af5..536d44338b1 100644 --- a/instat/dlgColumnStats.resx +++ b/instat/dlgColumnStats.resx @@ -180,6 +180,33 @@ 7 + + NoControl + + + 142, 113 + + + 104, 26 + + + 20 + + + Missing Options + + + cmdMissingOptions + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpOptions + + + 0 + 25, 42 @@ -199,7 +226,7 @@ grpOptions - 0 + 1 6, 17 @@ -220,13 +247,13 @@ grpOptions - 1 + 2 6, 117 - 148, 20 + 130, 20 4 @@ -241,7 +268,7 @@ grpOptions - 2 + 3 6, 67 @@ -262,7 +289,7 @@ grpOptions - 3 + 4 6, 92 @@ -283,13 +310,13 @@ grpOptions - 4 + 5 10, 196 - 160, 145 + 249, 145 7 diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index 8039890b6b3..a128319771b 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -47,6 +47,7 @@ Public Class dlgColumnStats ucrBase.iHelpTopicID = 64 ucrChkDropUnusedLevels.Enabled = False ' removed this functionality so this is disabled + cmdMissingOptions.Enabled = False ucrSelectorForColumnStatistics.SetParameter(New RParameter("data_name", 0)) ucrSelectorForColumnStatistics.SetParameterIsString() @@ -191,6 +192,7 @@ Public Class dlgColumnStats Else clsDefaultFunction.RemoveParameterByName("use") End If + cmdMissingOptions.Enabled = ucrChkOmitMissing.Checked End Sub Private Sub ucrChkPrintOutput_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkPrintOutput.ControlValueChanged @@ -217,6 +219,12 @@ Public Class dlgColumnStats End If End Sub + Private Sub cmdMissingOptions_Click(sender As Object, e As EventArgs) Handles cmdMissingOptions.Click + sdgMissingOptions.SetRFunction(clsNewSummaryFunction:=clsDefaultFunction, clsNewConcFunction:=clsConcFunction, bReset:=bResetSubdialog) + bResetSubdialog = False + sdgMissingOptions.ShowDialog() + End Sub + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrChkPrintOutput.ControlContentsChanged, ucrChkStoreResults.ControlContentsChanged TestOKEnabled() End Sub diff --git a/instat/sdgMissingOptions.Designer.vb b/instat/sdgMissingOptions.Designer.vb index 6f9ecc07281..97612e42dde 100644 --- a/instat/sdgMissingOptions.Designer.vb +++ b/instat/sdgMissingOptions.Designer.vb @@ -23,20 +23,122 @@ Partial Class sdgMissingOptions _ Private Sub InitializeComponent() Me.ucrBase = New instat.ucrButtonsSubdialogue() + Me.ucrInputPercentage = New instat.ucrInputTextBox() + Me.ucrChkMinNumNonMissing = New instat.ucrCheck() + Me.ucrNudNumberNotMissing = New instat.ucrNud() + Me.ucrNudConsecutive = New instat.ucrNud() + Me.ucrChkConsecutiveMissing = New instat.ucrCheck() + Me.ucrChkMaxNumMissing = New instat.ucrCheck() + Me.ucrChkMaxPercMissing = New instat.ucrCheck() + Me.ucrNudNumber = New instat.ucrNud() Me.SuspendLayout() ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(86, 303) + Me.ucrBase.Location = New System.Drawing.Point(91, 139) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(142, 30) Me.ucrBase.TabIndex = 0 ' + 'ucrInputPercentage + ' + Me.ucrInputPercentage.AddQuotesIfUnrecognised = True + Me.ucrInputPercentage.IsMultiline = False + Me.ucrInputPercentage.IsReadOnly = False + Me.ucrInputPercentage.Location = New System.Drawing.Point(268, 67) + Me.ucrInputPercentage.Margin = New System.Windows.Forms.Padding(7, 6, 7, 6) + Me.ucrInputPercentage.Name = "ucrInputPercentage" + Me.ucrInputPercentage.Size = New System.Drawing.Size(50, 21) + Me.ucrInputPercentage.TabIndex = 14 + ' + 'ucrChkMinNumNonMissing + ' + Me.ucrChkMinNumNonMissing.Checked = False + Me.ucrChkMinNumNonMissing.Location = New System.Drawing.Point(9, 41) + Me.ucrChkMinNumNonMissing.Margin = New System.Windows.Forms.Padding(5) + Me.ucrChkMinNumNonMissing.Name = "ucrChkMinNumNonMissing" + Me.ucrChkMinNumNonMissing.Size = New System.Drawing.Size(227, 20) + Me.ucrChkMinNumNonMissing.TabIndex = 11 + ' + 'ucrNudNumberNotMissing + ' + Me.ucrNudNumberNotMissing.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumberNotMissing.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudNumberNotMissing.Location = New System.Drawing.Point(268, 41) + Me.ucrNudNumberNotMissing.Margin = New System.Windows.Forms.Padding(5) + Me.ucrNudNumberNotMissing.Maximum = New Decimal(New Integer() {340, 0, 0, 0}) + Me.ucrNudNumberNotMissing.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumberNotMissing.Name = "ucrNudNumberNotMissing" + Me.ucrNudNumberNotMissing.Size = New System.Drawing.Size(50, 20) + Me.ucrNudNumberNotMissing.TabIndex = 12 + Me.ucrNudNumberNotMissing.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudConsecutive + ' + Me.ucrNudConsecutive.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConsecutive.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudConsecutive.Location = New System.Drawing.Point(268, 99) + Me.ucrNudConsecutive.Margin = New System.Windows.Forms.Padding(5) + Me.ucrNudConsecutive.Maximum = New Decimal(New Integer() {340, 0, 0, 0}) + Me.ucrNudConsecutive.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudConsecutive.Name = "ucrNudConsecutive" + Me.ucrNudConsecutive.Size = New System.Drawing.Size(50, 20) + Me.ucrNudConsecutive.TabIndex = 16 + Me.ucrNudConsecutive.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrChkConsecutiveMissing + ' + Me.ucrChkConsecutiveMissing.Checked = False + Me.ucrChkConsecutiveMissing.Location = New System.Drawing.Point(9, 99) + Me.ucrChkConsecutiveMissing.Margin = New System.Windows.Forms.Padding(5) + Me.ucrChkConsecutiveMissing.Name = "ucrChkConsecutiveMissing" + Me.ucrChkConsecutiveMissing.Size = New System.Drawing.Size(258, 20) + Me.ucrChkConsecutiveMissing.TabIndex = 15 + ' + 'ucrChkMaxNumMissing + ' + Me.ucrChkMaxNumMissing.Checked = False + Me.ucrChkMaxNumMissing.Location = New System.Drawing.Point(9, 12) + Me.ucrChkMaxNumMissing.Margin = New System.Windows.Forms.Padding(5) + Me.ucrChkMaxNumMissing.Name = "ucrChkMaxNumMissing" + Me.ucrChkMaxNumMissing.Size = New System.Drawing.Size(227, 20) + Me.ucrChkMaxNumMissing.TabIndex = 9 + ' + 'ucrChkMaxPercMissing + ' + Me.ucrChkMaxPercMissing.Checked = False + Me.ucrChkMaxPercMissing.Location = New System.Drawing.Point(9, 70) + Me.ucrChkMaxPercMissing.Margin = New System.Windows.Forms.Padding(5) + Me.ucrChkMaxPercMissing.Name = "ucrChkMaxPercMissing" + Me.ucrChkMaxPercMissing.Size = New System.Drawing.Size(227, 20) + Me.ucrChkMaxPercMissing.TabIndex = 13 + ' + 'ucrNudNumber + ' + Me.ucrNudNumber.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumber.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudNumber.Location = New System.Drawing.Point(268, 14) + Me.ucrNudNumber.Margin = New System.Windows.Forms.Padding(5) + Me.ucrNudNumber.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudNumber.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudNumber.Name = "ucrNudNumber" + Me.ucrNudNumber.Size = New System.Drawing.Size(50, 20) + Me.ucrNudNumber.TabIndex = 10 + Me.ucrNudNumber.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'sdgMissingOptions ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(324, 345) + Me.ClientSize = New System.Drawing.Size(324, 176) + Me.Controls.Add(Me.ucrInputPercentage) + Me.Controls.Add(Me.ucrChkMinNumNonMissing) + Me.Controls.Add(Me.ucrNudNumberNotMissing) + Me.Controls.Add(Me.ucrNudConsecutive) + Me.Controls.Add(Me.ucrChkConsecutiveMissing) + Me.Controls.Add(Me.ucrChkMaxNumMissing) + Me.Controls.Add(Me.ucrChkMaxPercMissing) + Me.Controls.Add(Me.ucrNudNumber) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.MaximizeBox = False @@ -49,4 +151,12 @@ Partial Class sdgMissingOptions End Sub Friend WithEvents ucrBase As ucrButtonsSubdialogue + Friend WithEvents ucrInputPercentage As ucrInputTextBox + Friend WithEvents ucrChkMinNumNonMissing As ucrCheck + Friend WithEvents ucrNudNumberNotMissing As ucrNud + Friend WithEvents ucrNudConsecutive As ucrNud + Friend WithEvents ucrChkConsecutiveMissing As ucrCheck + Friend WithEvents ucrChkMaxNumMissing As ucrCheck + Friend WithEvents ucrChkMaxPercMissing As ucrCheck + Friend WithEvents ucrNudNumber As ucrNud End Class diff --git a/instat/sdgMissingOptions.vb b/instat/sdgMissingOptions.vb index 133b44c3e53..8689bf49901 100644 --- a/instat/sdgMissingOptions.vb +++ b/instat/sdgMissingOptions.vb @@ -16,7 +16,66 @@ Imports instat.Translations Public Class sdgMissingOptions + Private bFirstLoad As Boolean = True + Private clsSummaryFunction As RFunction + Private clsConcFunction As RFunction Private Sub sdgMissingOptions_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + End Sub + + Public Sub InitialiseControls() + ucrChkMaxNumMissing.AddToLinkedControls({ucrNudNumber}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) + ucrChkMaxPercMissing.AddToLinkedControls({ucrInputPercentage}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) + ucrChkMinNumNonMissing.AddToLinkedControls({ucrNudNumberNotMissing}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=340) + ucrChkConsecutiveMissing.AddToLinkedControls({ucrNudConsecutive}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=4) + + ucrChkMaxNumMissing.SetParameter(New RParameter("n", 1, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'n'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkMaxNumMissing.SetText("Maximum number of missing allowed") + + ucrChkMinNumNonMissing.SetParameter(New RParameter("n_non_miss", 2, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'n_non_miss'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkMinNumNonMissing.SetText("Minimum number of non missing required") + + ucrChkMaxPercMissing.SetParameter(New RParameter("prop", 3, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'prop'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkMaxPercMissing.SetText("Maximum percentage of missing allowed") + + ucrChkConsecutiveMissing.SetParameter(New RParameter("con", 4, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'con'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkConsecutiveMissing.SetText("Maximum number of consecutive missing allowed") + + ucrInputPercentage.SetParameter(New RParameter("na_max_prop", 10)) + ucrInputPercentage.SetValidationTypeAsNumeric(dcmMin:=0, dcmMax:=100) + ucrInputPercentage.AddQuotesIfUnrecognised = False + + ucrNudNumber.SetParameter(New RParameter("na_max_n", 11)) + + ucrNudNumberNotMissing.SetParameter(New RParameter("na_min_n", 12)) + ucrNudNumberNotMissing.SetMinMax(0, iNewMax:=Integer.MaxValue) + + ucrNudConsecutive.SetParameter(New RParameter("na_consecutive_n", 13)) + End Sub + + Public Sub SetRFunction(clsNewSummaryFunction As RFunction, clsNewConcFunction As RFunction, Optional bReset As Boolean = False) + If bFirstLoad Then + InitialiseControls() + bFirstLoad = False + End If + clsConcFunction = clsNewConcFunction + clsSummaryFunction = clsNewSummaryFunction + + ucrInputPercentage.SetRCode(clsSummaryFunction, bReset, bCloneIfNeeded:=True) + ucrNudNumber.SetRCode(clsSummaryFunction, bReset, bCloneIfNeeded:=True) + ucrNudNumberNotMissing.SetRCode(clsSummaryFunction, bReset, bCloneIfNeeded:=True) + ucrNudConsecutive.SetRCode(clsSummaryFunction, bReset, bCloneIfNeeded:=True) + ucrChkMaxNumMissing.SetRCode(clsConcFunction, bReset, bCloneIfNeeded:=True) + ucrChkMaxPercMissing.SetRCode(clsConcFunction, bReset, bCloneIfNeeded:=True) + ucrChkConsecutiveMissing.SetRCode(clsConcFunction, bReset, bCloneIfNeeded:=True) + ucrChkMinNumNonMissing.SetRCode(clsConcFunction, bReset, bCloneIfNeeded:=True) + End Sub + Private Sub ucrChkConsecutiveMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkConsecutiveMissing.ControlValueChanged, ucrChkMaxNumMissing.ControlValueChanged, ucrChkMinNumNonMissing.ControlValueChanged, ucrChkMaxNumMissing.ControlValueChanged, ucrChkMaxPercMissing.ControlValueChanged + If ucrChkConsecutiveMissing.Checked OrElse ucrChkMinNumNonMissing.Checked OrElse ucrChkMaxNumMissing.Checked OrElse ucrChkMaxPercMissing.Checked Then + clsSummaryFunction.AddParameter("na_type", clsRFunctionParameter:=clsConcFunction, iPosition:=9) + Else + clsSummaryFunction.RemoveParameterByName("na_type") + End If End Sub End Class \ No newline at end of file diff --git a/instat/sdgSummaries.Designer.vb b/instat/sdgSummaries.Designer.vb index dd1d81dd23b..aa5335c1075 100644 --- a/instat/sdgSummaries.Designer.vb +++ b/instat/sdgSummaries.Designer.vb @@ -40,16 +40,6 @@ Partial Class sdgSummaries Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(sdgSummaries)) - Me.tbMissingOptions = New System.Windows.Forms.TabPage() - Me.lblPercentage = New System.Windows.Forms.Label() - Me.ucrInputPercentage = New instat.ucrInputTextBox() - Me.ucrChkMinNumNonMissing = New instat.ucrCheck() - Me.ucrNudNumberNotMissing = New instat.ucrNud() - Me.ucrNudConsecutive = New instat.ucrNud() - Me.ucrChkConsecutiveMissing = New instat.ucrCheck() - Me.ucrChkMaxNumMissing = New instat.ucrCheck() - Me.ucrChkMaxPercMissing = New instat.ucrCheck() - Me.ucrNudNumber = New instat.ucrNud() Me.tbCircular = New System.Windows.Forms.TabPage() Me.grpCircScale = New System.Windows.Forms.GroupBox() Me.ucrChkCircRange = New instat.ucrCheck() @@ -128,8 +118,8 @@ Partial Class sdgSummaries Me.ucrNudFraction = New instat.ucrNud() Me.ucrChkTrimmedMean = New instat.ucrCheck() Me.grpScale = New System.Windows.Forms.GroupBox() - Me.ucrChkQn = New instat.ucrCheck() Me.ucrChkSn = New instat.ucrCheck() + Me.ucrChkQn = New instat.ucrCheck() Me.ucrChkCoefficientOfVariation = New instat.ucrCheck() Me.ucrChkMedianAbsoluteDeviation = New instat.ucrCheck() Me.grpSkewness = New System.Windows.Forms.GroupBox() @@ -160,7 +150,6 @@ Partial Class sdgSummaries Me.tbSummaries = New System.Windows.Forms.TabControl() Me.ttVerificationSummaries = New System.Windows.Forms.ToolTip(Me.components) Me.ucrButtonsSummaries = New instat.ucrButtonsSubdialogue() - Me.tbMissingOptions.SuspendLayout() Me.tbCircular.SuspendLayout() Me.grpCircScale.SuspendLayout() Me.grpCircLocation.SuspendLayout() @@ -184,88 +173,6 @@ Partial Class sdgSummaries Me.tbSummaries.SuspendLayout() Me.SuspendLayout() ' - 'tbMissingOptions - ' - Me.tbMissingOptions.Controls.Add(Me.lblPercentage) - Me.tbMissingOptions.Controls.Add(Me.ucrInputPercentage) - Me.tbMissingOptions.Controls.Add(Me.ucrChkMinNumNonMissing) - Me.tbMissingOptions.Controls.Add(Me.ucrNudNumberNotMissing) - Me.tbMissingOptions.Controls.Add(Me.ucrNudConsecutive) - Me.tbMissingOptions.Controls.Add(Me.ucrChkConsecutiveMissing) - Me.tbMissingOptions.Controls.Add(Me.ucrChkMaxNumMissing) - Me.tbMissingOptions.Controls.Add(Me.ucrChkMaxPercMissing) - Me.tbMissingOptions.Controls.Add(Me.ucrNudNumber) - resources.ApplyResources(Me.tbMissingOptions, "tbMissingOptions") - Me.tbMissingOptions.Name = "tbMissingOptions" - Me.tbMissingOptions.UseVisualStyleBackColor = True - ' - 'lblPercentage - ' - resources.ApplyResources(Me.lblPercentage, "lblPercentage") - Me.lblPercentage.Name = "lblPercentage" - ' - 'ucrInputPercentage - ' - Me.ucrInputPercentage.AddQuotesIfUnrecognised = True - Me.ucrInputPercentage.IsMultiline = False - Me.ucrInputPercentage.IsReadOnly = False - resources.ApplyResources(Me.ucrInputPercentage, "ucrInputPercentage") - Me.ucrInputPercentage.Name = "ucrInputPercentage" - ' - 'ucrChkMinNumNonMissing - ' - Me.ucrChkMinNumNonMissing.Checked = False - resources.ApplyResources(Me.ucrChkMinNumNonMissing, "ucrChkMinNumNonMissing") - Me.ucrChkMinNumNonMissing.Name = "ucrChkMinNumNonMissing" - ' - 'ucrNudNumberNotMissing - ' - Me.ucrNudNumberNotMissing.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudNumberNotMissing.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudNumberNotMissing, "ucrNudNumberNotMissing") - Me.ucrNudNumberNotMissing.Maximum = New Decimal(New Integer() {340, 0, 0, 0}) - Me.ucrNudNumberNotMissing.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudNumberNotMissing.Name = "ucrNudNumberNotMissing" - Me.ucrNudNumberNotMissing.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrNudConsecutive - ' - Me.ucrNudConsecutive.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConsecutive.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudConsecutive, "ucrNudConsecutive") - Me.ucrNudConsecutive.Maximum = New Decimal(New Integer() {340, 0, 0, 0}) - Me.ucrNudConsecutive.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudConsecutive.Name = "ucrNudConsecutive" - Me.ucrNudConsecutive.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'ucrChkConsecutiveMissing - ' - Me.ucrChkConsecutiveMissing.Checked = False - resources.ApplyResources(Me.ucrChkConsecutiveMissing, "ucrChkConsecutiveMissing") - Me.ucrChkConsecutiveMissing.Name = "ucrChkConsecutiveMissing" - ' - 'ucrChkMaxNumMissing - ' - Me.ucrChkMaxNumMissing.Checked = False - resources.ApplyResources(Me.ucrChkMaxNumMissing, "ucrChkMaxNumMissing") - Me.ucrChkMaxNumMissing.Name = "ucrChkMaxNumMissing" - ' - 'ucrChkMaxPercMissing - ' - Me.ucrChkMaxPercMissing.Checked = False - resources.ApplyResources(Me.ucrChkMaxPercMissing, "ucrChkMaxPercMissing") - Me.ucrChkMaxPercMissing.Name = "ucrChkMaxPercMissing" - ' - 'ucrNudNumber - ' - Me.ucrNudNumber.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudNumber.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - resources.ApplyResources(Me.ucrNudNumber, "ucrNudNumber") - Me.ucrNudNumber.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudNumber.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudNumber.Name = "ucrNudNumber" - Me.ucrNudNumber.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'tbCircular ' Me.tbCircular.Controls.Add(Me.grpCircScale) @@ -746,6 +653,7 @@ Partial Class sdgSummaries ' resources.ApplyResources(Me.ucrInputComboCountTest, "ucrInputComboCountTest") Me.ucrInputComboCountTest.AddQuotesIfUnrecognised = True + Me.ucrInputComboCountTest.GetSetSelectedIndex = -1 Me.ucrInputComboCountTest.IsReadOnly = False Me.ucrInputComboCountTest.Name = "ucrInputComboCountTest" ' @@ -779,6 +687,7 @@ Partial Class sdgSummaries ' resources.ApplyResources(Me.ucrInputComboPropTest, "ucrInputComboPropTest") Me.ucrInputComboPropTest.AddQuotesIfUnrecognised = True + Me.ucrInputComboPropTest.GetSetSelectedIndex = -1 Me.ucrInputComboPropTest.IsReadOnly = False Me.ucrInputComboPropTest.Name = "ucrInputComboPropTest" ' @@ -836,18 +745,18 @@ Partial Class sdgSummaries Me.grpScale.Name = "grpScale" Me.grpScale.TabStop = False ' - 'ucrChkQn - ' - Me.ucrChkQn.Checked = False - resources.ApplyResources(Me.ucrChkQn, "ucrChkQn") - Me.ucrChkQn.Name = "ucrChkQn" - ' 'ucrChkSn ' Me.ucrChkSn.Checked = False resources.ApplyResources(Me.ucrChkSn, "ucrChkSn") Me.ucrChkSn.Name = "ucrChkSn" ' + 'ucrChkQn + ' + Me.ucrChkQn.Checked = False + resources.ApplyResources(Me.ucrChkQn, "ucrChkQn") + Me.ucrChkQn.Name = "ucrChkQn" + ' 'ucrChkCoefficientOfVariation ' Me.ucrChkCoefficientOfVariation.Checked = False @@ -1044,7 +953,6 @@ Partial Class sdgSummaries Me.tbSummaries.Controls.Add(Me.tbPosition) Me.tbSummaries.Controls.Add(Me.tbModel) Me.tbSummaries.Controls.Add(Me.tbCircular) - Me.tbSummaries.Controls.Add(Me.tbMissingOptions) resources.ApplyResources(Me.tbSummaries, "tbSummaries") Me.tbSummaries.Name = "tbSummaries" Me.tbSummaries.SelectedIndex = 0 @@ -1065,8 +973,6 @@ Partial Class sdgSummaries Me.MinimizeBox = False Me.Name = "sdgSummaries" Me.Tag = "Summaries" - Me.tbMissingOptions.ResumeLayout(False) - Me.tbMissingOptions.PerformLayout() Me.tbCircular.ResumeLayout(False) Me.grpCircScale.ResumeLayout(False) Me.grpCircLocation.ResumeLayout(False) @@ -1098,16 +1004,6 @@ Partial Class sdgSummaries End Sub Friend WithEvents ucrButtonsSummaries As ucrButtonsSubdialogue - Friend WithEvents tbMissingOptions As TabPage - Friend WithEvents lblPercentage As Label - Friend WithEvents ucrInputPercentage As ucrInputTextBox - Friend WithEvents ucrChkMinNumNonMissing As ucrCheck - Friend WithEvents ucrNudNumberNotMissing As ucrNud - Friend WithEvents ucrNudConsecutive As ucrNud - Friend WithEvents ucrChkConsecutiveMissing As ucrCheck - Friend WithEvents ucrChkMaxNumMissing As ucrCheck - Friend WithEvents ucrChkMaxPercMissing As ucrCheck - Friend WithEvents ucrNudNumber As ucrNud Friend WithEvents tbCircular As TabPage Friend WithEvents grpCircScale As GroupBox Friend WithEvents ucrChkCircRange As ucrCheck diff --git a/instat/sdgSummaries.resx b/instat/sdgSummaries.resx index a6c318595a1..6b4daa9c50d 100644 --- a/instat/sdgSummaries.resx +++ b/instat/sdgSummaries.resx @@ -117,375 +117,369 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - lblPercentage + + + 21, 47 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 4, 4, 4, 4 + + + 80, 20 + + + + 1 + + + ucrChkCircRange + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircScale - + 0 - - ucrInputPercentage + + 213, 21 - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 4, 4, 4, 4 - - tbMissingOptions + + 80, 20 - - 1 + + 4 - - ucrChkMinNumNonMissing + + ucrChkAngVar - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircScale - - 2 + + 1 - - ucrNudNumberNotMissing + + 124, 47 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 4, 4, 4, 4 - - tbMissingOptions + + 80, 20 - + 3 - - ucrNudConsecutive + + ucrChkrho - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircScale - - 4 + + 2 - - ucrChkConsecutiveMissing + + 213, 47 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 4, 4, 4, 4 - - tbMissingOptions + + 80, 20 - + 5 - - ucrChkMaxNumMissing + + ucrChkAngDev - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircScale + + + 3 - - 6 + + 124, 19 + + + 4, 4, 4, 4 + + + 80, 20 - - ucrChkMaxPercMissing + + 2 + + + ucrChkVar - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircScale - - 7 + + 4 - - ucrNudNumber + + 21, 19 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 4, 4, 4, 4 - - tbMissingOptions + + 80, 20 - - 8 + + 0 - - - 4, 22 + + ucrChkSd - - - 3, 3, 3, 3 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 409, 383 + + grpCircScale - - - 4 + + 5 - - Missing Options + + 4, 103 - - tbMissingOptions + + 2, 2, 2, 2 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 2, 2, 2 - - tbSummaries + + 401, 81 - - 6 + + 1 - - True + + Scale - - NoControl + + grpCircScale - - 324, 71 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 0, 13 + + tbCircular - - 6 + + 0 + + + 124, 26 - - lblPercentage + + 4, 4, 4, 4 - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 81, 20 + + + 2 + + + ucrChkCircMedian - - tbMissingOptions + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpCircLocation - + 0 - - 273, 68 + + 213, 26 - - 7, 6, 7, 6 + + 4, 4, 4, 4 - - 50, 21 + + 80, 20 - - 5 + + 4 - - ucrInputPercentage + + ucrChkMin - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircLocation - + 1 - - 11, 42 + + 300, 26 - - 5, 5, 5, 5 + + 4, 4, 4, 4 - - 227, 20 + + 80, 20 - - 2 + + 6 - - ucrChkMinNumNonMissing + + ucrChkMedianH - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircLocation - + 2 - - 273, 42 + + 124, 54 - - 5, 5, 5, 5 + + 4, 4, 4, 4 - - 50, 20 + + 80, 20 - + 3 - - ucrNudNumberNotMissing + + ucrChkQ3 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircLocation - + 3 - - 273, 100 + + 21, 54 - - 5, 5, 5, 5 + + 4, 4, 4, 4 - - 50, 20 + + 80, 20 - - 8 + + 1 - - ucrNudConsecutive + + ucrChkQ1 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircLocation - + 4 - - 11, 100 + + 213, 54 - - 5, 5, 5, 5 + + 4, 4, 4, 4 - - 257, 20 + + 80, 20 - - 7 + + 5 - - ucrChkConsecutiveMissing + + ucrChkMax - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircLocation - + 5 - - 11, 13 - - - 5, 5, 5, 5 + + 21, 26 - - 227, 20 + + 4, 4, 4, 4 + + + 86, 20 - + 0 - - ucrChkMaxNumMissing + + ucrChkCircMean - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMissingOptions + + grpCircLocation - + 6 - - 11, 71 - - - 5, 5, 5, 5 - - - 227, 20 - - - 4 - - - ucrChkMaxPercMissing - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbMissingOptions - - - 7 - - - 273, 13 - - - 5, 5, 5, 5 - - - 50, 20 - - - 1 - - - ucrNudNumber - - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbMissingOptions - - - 8 + + 4, 9 - - grpCircScale + + 2, 2, 2, 2 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 2, 2, 2, 2 - - tbCircular + + 401, 90 - + 0 + + Location + grpCircLocation @@ -528,2537 +522,1094 @@ 5 - - ucrChkCircRange + + 16, 21 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpCircScale + + 295, 20 - - 0 + + 1 - - ucrChkAngVar + + ucrChkStandardErrorOfMean - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircScale + + tbModel - - 1 + + 0 - - ucrChkrho + + 4, 22 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 3, 3, 3, 3 - - grpCircScale + + 409, 383 - - 2 + + 6 - - ucrChkAngDev + + Model - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + tbModel - - grpCircScale + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 3 + + tbSummaries - - ucrChkVar + + 4 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 12, 66 - - grpCircScale + + 5, 5, 5, 5 - - 4 + + 188, 20 - - ucrChkSd + + 1 - + + ucrChkOrderBy + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircScale + + tbPosition - - 5 + + 0 - - 4, 103 + + True - - 2, 2, 2, 2 + + NoControl - - 2, 2, 2, 2 + + 229, 125 - - 401, 81 + + 51, 13 - - 1 + + 3 - - Scale + + Order By: - - grpCircScale + + lblOrderBy - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tbCircular + + tbPosition - - 0 + + 1 - - 21, 47 + + 233, 19 - - 4, 4, 4, 4 + + 7, 6, 7, 6 - - 80, 20 + + 64, 20 - - 1 + + 3 - - ucrChkCircRange + + ucrInputN - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircScale + + grpPosition - + 0 - - 213, 21 + + True - - 4, 4, 4, 4 + + NoControl - - 80, 20 + + 215, 22 - - 4 + + 16, 13 - - ucrChkAngVar + + 2 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + n: - - grpCircScale + + lblInputN - - 1 + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 124, 47 + + grpPosition - - 4, 4, 4, 4 + + 1 - - 80, 20 + + 7, 19 - - 3 + + 5, 5, 5, 5 - - ucrChkrho + + 101, 20 - + + 0 + + + ucrChkFirst + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircScale + + grpPosition - + 2 - - 213, 47 + + 309, 19 - - 4, 4, 4, 4 + + 5, 5, 5, 5 - + 80, 20 - - 5 + + 4 - - ucrChkAngDev + + ucrChkLast - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircScale + + grpPosition - + 3 - - 124, 19 + + 166, 21 - - 4, 4, 4, 4 + + 5, 5, 5, 5 - - 80, 20 + + 41, 20 - - 2 + + 1 - - ucrChkVar + + ucrChknth - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircScale + + grpPosition - + 4 - - 21, 19 - - - 4, 4, 4, 4 + + 6, 6 - - 80, 20 + + 397, 50 - + 0 - - ucrChkSd - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircScale - - - 5 - - - ucrChkCircMedian - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircLocation - - - 0 + + Position - - ucrChkMin + + grpPosition - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpCircLocation + + tbPosition - - 1 + + 2 - - ucrChkMedianH + + 10, 97 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 0, 0, 0, 0 - - grpCircLocation + + 210, 180 - + 2 - - ucrChkQ3 + + ucrSelectorOrderBy - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircLocation + + tbPosition - + 3 - - ucrChkQ1 + + 231, 141 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 0, 0, 0, 0 - - grpCircLocation + + 120, 20 - + 4 - - ucrChkMax + + ucrReceiverOrderBy - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCircLocation + + tbPosition - - 5 + + 4 - - ucrChkCircMean + + 4, 22 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 3, 3, 3, 3 - - grpCircLocation + + 409, 383 - - 6 + + 7 - - 4, 9 + + Position - - 2, 2, 2, 2 + + tbPosition - - 2, 2, 2, 2 + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 401, 90 + + tbSummaries - - 0 + + 3 - - Location + + True - - grpCircLocation + + NoControl - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 263, 207 - - tbCircular + + 88, 13 - - 1 + + 3 - - 124, 26 + + Second Variable: - - 4, 4, 4, 4 - - - 81, 20 - - - 2 - - - ucrChkCircMedian - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircLocation - - - 0 - - - 213, 26 - - - 4, 4, 4, 4 - - - 80, 20 - - - 4 - - - ucrChkMin - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircLocation - - - 1 - - - 300, 26 - - - 4, 4, 4, 4 - - - 80, 20 - - - 6 - - - ucrChkMedianH - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircLocation - - - 2 - - - 124, 54 - - - 4, 4, 4, 4 - - - 80, 20 - - - 3 - - - ucrChkQ3 - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircLocation - - - 3 - - - 21, 54 - - - 4, 4, 4, 4 - - - 80, 20 - - - 1 - - - ucrChkQ1 - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircLocation - - - 4 - - - 213, 54 - - - 4, 4, 4, 4 - - - 80, 20 - - - 5 - - - ucrChkMax - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircLocation - - - 5 - - - 21, 26 - - - 4, 4, 4, 4 - - - 86, 20 - - - 0 - - - ucrChkCircMean - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpCircLocation - - - 6 - - - ucrChkStandardErrorOfMean - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbModel - - - 0 - - - 4, 22 - - - 3, 3, 3, 3 - - - 409, 383 - - - 6 - - - Model - - - tbModel - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbSummaries - - - 4 - - - 16, 21 - - - 5, 5, 5, 5 - - - 295, 20 - - - 1 - - - ucrChkStandardErrorOfMean - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbModel - - - 0 - - - ucrChkOrderBy - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbPosition - - - 0 - - - lblOrderBy - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbPosition - - - 1 - - - grpPosition - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbPosition - - - 2 - - - ucrSelectorOrderBy - - - instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbPosition - - - 3 - - - ucrReceiverOrderBy - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbPosition - - - 4 - - - 4, 22 - - - 3, 3, 3, 3 - - - 409, 383 - - - 7 - - - Position - - - tbPosition - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbSummaries - - - 3 - - - 12, 66 - - - 5, 5, 5, 5 - - - 188, 20 - - - 1 - - - ucrChkOrderBy - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbPosition - - - 0 - - - True - - - NoControl - - - 229, 125 - - - 51, 13 - - - 3 - - - Order By: - - - lblOrderBy - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbPosition - - - 1 - - - ucrInputN - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 0 - - - lblInputN - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpPosition - - - 1 - - - ucrChkFirst - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 2 - - - ucrChkLast - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 3 - - - ucrChknth - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 4 - - - 6, 6 - - - 397, 50 - - - 0 - - - Position - - - grpPosition - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbPosition - - - 2 - - - 233, 19 - - - 7, 6, 7, 6 - - - 64, 20 - - - 3 - - - ucrInputN - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 0 - - - True - - - NoControl - - - 215, 22 - - - 16, 13 - - - 2 - - - n: - - - lblInputN - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpPosition - - - 1 - - - 7, 19 - - - 5, 5, 5, 5 - - - 101, 20 - - - 0 - - - ucrChkFirst - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 2 - - - 309, 19 - - - 5, 5, 5, 5 - - - 80, 20 - - - 4 - - - ucrChkLast - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 3 - - - 166, 21 - - - 5, 5, 5, 5 - - - 41, 20 - - - 1 - - - ucrChknth - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpPosition - - - 4 - - - 10, 97 - - - 0, 0, 0, 0 - - - 210, 180 - - - 2 - - - ucrSelectorOrderBy - - - instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbPosition - - - 3 - - - 231, 141 - - - 0, 0, 0, 0 - - - 120, 20 - - - 4 - - - ucrReceiverOrderBy - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbPosition - - - 4 - - - lblSecondVariable - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbTwoVariables - - - 0 - - - grpRelationships - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbTwoVariables - - - 1 - - - grpHyroGOF - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbTwoVariables - - - 2 - - - ucrReceiverSecondVariable - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbTwoVariables - - - 3 - - - ucrSelectorSecondVariable - - - instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - tbTwoVariables - - - 4 - - - 4, 22 - - - 3, 3, 3, 3 - - - 409, 383 - - - 5 - - - Two-Variables - - - tbTwoVariables - - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbSummaries - - - 2 - - - True - - - NoControl - - - 263, 207 - - - 88, 13 - - - 3 - - - Second Variable: - - - lblSecondVariable - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbTwoVariables - - - 0 - - - ucrChkCovariance - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpRelationships - - - 0 - - - ucrChkCorrelations - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpRelationships - - - 1 - - - 4, 6 - - - 399, 38 - - - 0 - - - Relationships - - - grpRelationships - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbTwoVariables - - - 1 - - - 166, 10 - - - 5, 5, 5, 5 - - - 167, 20 - - - 1 - - - ucrChkCovariance - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpRelationships - - - 0 - - - 15, 13 - - - 5, 5, 5, 5 - - - 149, 20 - - - 0 - - - ucrChkCorrelations - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpRelationships - - - 1 - - - lblJmia - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHyroGOF - - - 0 - - - ucrInputJmia - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 1 - - - ucrChkSelectAll - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 2 - - - ucrChkRelativeIndexOfAgreement - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 3 - - - ucrChkRatioOfStandardDeviation - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 4 - - - ucrChkCoefDetermination - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 5 - - - ucrChkRatioOfRootMeanSquaredError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 6 - - - ucrChkRelativeNashSutcliffeEff - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 7 - - - ucrChkModifiedIndexOfAgreement - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 8 - - - ucrChkCoefPersistence - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 9 - - - ucrChkNashSutcliffeEfficiency - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 10 - - - ucrChkSumOfSquaredResiduals - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 11 - - - ucrChkKlingGuptaEfficiency - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 12 - - - ucrChkVolumetricEfficiency - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 13 - - - ucrChkPercentBias - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 14 - - - ucrChkModNashSutcliffeEff - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 15 - - - ucrChkMeanError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 16 - - - ucrChkMeanSquaredError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 17 - - - ucrChkRootMeanSquaredError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 18 - - - cmdHelp - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHyroGOF - - - 19 - - - ucrChkNormRootMeanSquaredError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 20 - - - ucrChkMeanAbsoluteError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 21 - - - ucrChkIndexOfAgreement - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 22 - - - 6, 45 - - - 399, 145 - - - 1 - - - HydroGOF - - - grpHyroGOF - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tbTwoVariables - - - 2 - - - True - - - NoControl - - - 284, 125 - - - 12, 13 - - - 20 - - - j: - - - lblJmia - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - grpHyroGOF - - - 0 - - - 299, 122 - - - 32, 21 - - - 21 - - - ucrInputJmia - - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 1 - - - 9, 15 - - - 5, 5, 5, 5 - - - 87, 20 - - - 0 - - - ucrChkSelectAll - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 2 - - - 204, 75 - - - 5, 5, 5, 5 - - - 87, 20 - - - 13 - - - ucrChkRelativeIndexOfAgreement - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 3 - - - 94, 54 - - - 5, 5, 5, 5 - - - 87, 20 - - - 7 - - - ucrChkRatioOfStandardDeviation - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 4 - - - 204, 116 - - - 5, 5, 5, 5 - - - 87, 20 - - - 15 - - - ucrChkCoefDetermination - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 5 - - - 94, 34 - - - 5, 5, 5, 5 - - - 87, 20 - - - 6 - - - ucrChkRatioOfRootMeanSquaredError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 6 - - - 94, 115 - - - 5, 5, 5, 5 - - - 87, 20 - - - 10 - - - ucrChkRelativeNashSutcliffeEff - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 7 - - - 204, 36 - - - 5, 5, 5, 5 - - - 87, 20 - - - 11 - - - ucrChkModifiedIndexOfAgreement - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 8 - - - 204, 95 - - - 5, 5, 5, 5 - - - 87, 20 - - - 14 - - - ucrChkCoefPersistence + + lblSecondVariable - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpHyroGOF + + tbTwoVariables - - 9 + + 0 - - 94, 75 + + 166, 10 - + 5, 5, 5, 5 - - 87, 20 + + 167, 20 - - 8 + + 1 - - ucrChkNashSutcliffeEfficiency + + ucrChkCovariance - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpHyroGOF + + grpRelationships - - 10 + + 0 - - 306, 100 + + 15, 13 - + 5, 5, 5, 5 - - 87, 20 + + 149, 20 - - 19 + + 0 - - ucrChkSumOfSquaredResiduals + + ucrChkCorrelations - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpHyroGOF - - - 11 - - - 306, 38 - - - 5, 5, 5, 5 - - - 87, 20 - - - 16 - - - ucrChkKlingGuptaEfficiency + + grpRelationships - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 1 - - grpHyroGOF + + 4, 6 - - 12 + + 399, 38 - - 306, 58 + + 0 - - 5, 5, 5, 5 + + Relationships - - 87, 20 + + grpRelationships - - 17 + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ucrChkVolumetricEfficiency + + tbTwoVariables - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 1 - - grpHyroGOF + + True - - 13 + + NoControl - - 8, 116 + + 284, 125 - - 5, 5, 5, 5 + + 12, 13 - - 87, 20 + + 20 - - 5 + + j: - - ucrChkPercentBias + + lblJmia - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + grpHyroGOF - - 14 - - - 94, 95 + + 0 - - 5, 5, 5, 5 + + 299, 122 - - 87, 20 + + 32, 21 - - 9 + + 21 - - ucrChkModNashSutcliffeEff + + ucrInputJmia - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + grpHyroGOF - - 15 - - - 8, 34 - - - 5, 5, 5, 5 - - - 87, 20 - - + 1 - - ucrChkMeanError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 16 - - - 306, 79 - - - 5, 5, 5, 5 - - - 87, 20 - - - 18 - - - ucrChkMeanSquaredError - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpHyroGOF - - - 17 - - - 8, 74 + + 9, 15 - + 5, 5, 5, 5 - + 87, 20 - - 3 + + 0 - - ucrChkRootMeanSquaredError + + ucrChkSelectAll - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpHyroGOF - - - 18 + + grpHyroGOF - - NoControl + + 2 - - 331, 120 + + 204, 75 - - 68, 23 + + 5, 5, 5, 5 - - 22 + + 87, 20 - - Help + + 13 - - cmdHelp + + ucrChkRelativeIndexOfAgreement - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + grpHyroGOF - - 19 + + 3 - - 8, 95 + + 94, 54 - + 5, 5, 5, 5 - + 87, 20 - - 4 + + 7 - - ucrChkNormRootMeanSquaredError + + ucrChkRatioOfStandardDeviation - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + grpHyroGOF - - 20 + + 4 - - 8, 54 + + 204, 116 - + 5, 5, 5, 5 - + 87, 20 - - 2 + + 15 - - ucrChkMeanAbsoluteError + + ucrChkCoefDetermination - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + grpHyroGOF - - 21 + + 5 - - 204, 57 + + 94, 34 - + 5, 5, 5, 5 - + 87, 20 - - 12 + + 6 - - ucrChkIndexOfAgreement + + ucrChkRatioOfRootMeanSquaredError - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + grpHyroGOF - - 22 + + 6 - - 266, 223 + + 94, 115 - - 0, 0, 0, 0 + + 5, 5, 5, 5 - - 120, 20 + + 87, 20 - - 4 + + 10 - - ucrReceiverSecondVariable + + ucrChkRelativeNashSutcliffeEff - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbTwoVariables + + grpHyroGOF - - 3 + + 7 - - 8, 193 + + 204, 36 - - 0, 0, 0, 0 + + 5, 5, 5, 5 - - 210, 188 + + 87, 20 - - 2 + + 11 - - ucrSelectorSecondVariable + + ucrChkModifiedIndexOfAgreement - - instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbTwoVariables + + grpHyroGOF - - 4 + + 8 - - ucrInputQuantile + + 204, 95 - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpProportionsPercentiles + + 87, 20 - - 0 + + 14 - - ucrChkQuantile + + ucrChkCoefPersistence - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpProportionsPercentiles + + grpHyroGOF - - 1 + + 9 - - ucrInputCountValue + + 94, 75 - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpProportionsPercentiles + + 87, 20 - - 2 + + 8 - - ucrInputComboCountTest + + ucrChkNashSutcliffeEfficiency - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpProportionsPercentiles + + grpHyroGOF - - 3 + + 10 - - ucrChkProportion + + 306, 100 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpProportionsPercentiles + + 87, 20 - - 4 + + 19 - - ucrChkCount + + ucrChkSumOfSquaredResiduals - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpProportionsPercentiles + + grpHyroGOF - - 5 + + 11 - - ucrChkPercentage + + 306, 38 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpProportionsPercentiles + + 87, 20 - - 6 + + 16 - - ucrInputPropValue + + ucrChkKlingGuptaEfficiency - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpProportionsPercentiles + + grpHyroGOF - - 7 + + 12 - - ucrInputComboPropTest + + 306, 58 - - instat.ucrInputComboBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpProportionsPercentiles + + 87, 20 - - 8 + + 17 - - ucrInputPercentile + + ucrChkVolumetricEfficiency - - instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpProportionsPercentiles + + grpHyroGOF - - 9 + + 13 - - ucrChkPercentile + + 8, 116 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpProportionsPercentiles + + 87, 20 - - 10 + + 5 - - 10, 6 + + ucrChkPercentBias - - 393, 122 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 0 + + grpHyroGOF - - Proportions/Percentiles/Count + + 14 - - grpProportionsPercentiles + + 94, 95 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5, 5, 5, 5 - - tbMore + + 87, 20 - - 0 + + 9 - - lblFractionTrimmed + + ucrChkModNashSutcliffeEff - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpLocation + + grpHyroGOF - - 0 + + 15 - - ucrNudFraction + + 8, 34 - - instat.ucrNud, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpLocation + + 87, 20 - + 1 - - ucrChkTrimmedMean + + ucrChkMeanError - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpLocation + + grpHyroGOF - - 2 + + 16 - - 10, 134 + + 306, 79 - - 393, 52 + + 5, 5, 5, 5 - - 0 + + 87, 20 - - Location + + 18 - - grpLocation + + ucrChkMeanSquaredError - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMore + + grpHyroGOF - - 1 + + 17 - - ucrChkSn + + 8, 74 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpScale + + 87, 20 - - 0 + + 3 - - ucrChkQn + + ucrChkRootMeanSquaredError - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpScale + + grpHyroGOF - - 1 + + 18 - - ucrChkCoefficientOfVariation + + NoControl - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 331, 120 - - grpScale + + 68, 23 - - 2 + + 22 - - ucrChkMedianAbsoluteDeviation + + Help - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + cmdHelp - - grpScale + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpHyroGOF - - 3 + + 19 - - 10, 193 + + 8, 95 - - 393, 74 + + 5, 5, 5, 5 - - 1 + + 87, 20 - - Scale + + 4 - - grpScale + + ucrChkNormRootMeanSquaredError - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - tbMore + + grpHyroGOF - - 2 + + 20 - - 208, 19 + + 8, 54 - + 5, 5, 5, 5 - - 101, 20 + + 87, 20 - - 1 + + 2 - - ucrChkMc + + ucrChkMeanAbsoluteError - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpSkewness + + grpHyroGOF - - 0 + + 21 - - 7, 19 + + 204, 57 - + 5, 5, 5, 5 - - 254, 20 + + 87, 20 - - 0 + + 12 - - ucrChkSkewness + + ucrChkIndexOfAgreement - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpSkewness + + grpHyroGOF - - 1 + + 22 - - 10, 273 + + 6, 45 - - 393, 49 + + 399, 145 - - 2 + + 1 - - Skewness + + HydroGOF - - grpSkewness + + grpHyroGOF - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tbMore + + tbTwoVariables - - 3 + + 2 - - ucrChkKurtosis + + 266, 223 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 0, 0, 0, 0 - - grpKurtosis + + 120, 20 - - 0 + + 4 - - 10, 329 + + ucrReceiverSecondVariable - - 393, 50 + + instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - + + tbTwoVariables + + 3 - - Kurtosis + + 8, 193 - - grpKurtosis + + 0, 0, 0, 0 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 210, 188 - - tbMore + + 2 - + + ucrSelectorSecondVariable + + + instat.ucrSelectorByDataFrameAddRemove, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + tbTwoVariables + + 4 - + 4, 22 - + 3, 3, 3, 3 - + 409, 383 - - 1 + + 5 - - More + + Two-Variables - - tbMore + + tbTwoVariables - + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tbSummaries - - 1 + + 2 86, 96 @@ -3330,6 +1881,30 @@ 10 + + 10, 6 + + + 393, 122 + + + 0 + + + Proportions/Percentiles/Count + + + grpProportionsPercentiles + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbMore + + + 0 + True @@ -3408,28 +1983,28 @@ 2 - - 208, 19 + + 10, 134 - - 5, 5, 5, 5 + + 393, 52 - - 101, 20 + + 0 - - 2 + + Location - - ucrChkQn + + grpLocation - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpScale + + tbMore - + 1 @@ -3456,6 +2031,30 @@ 0 + + 208, 19 + + + 5, 5, 5, 5 + + + 101, 20 + + + 2 + + + ucrChkQn + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpScale + + + 1 + 7, 19 @@ -3504,188 +2103,176 @@ 3 - - 7, 19 - - - 5, 5, 5, 5 - - - 120, 20 - - - 0 - - - ucrChkKurtosis + + 10, 193 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 393, 74 - - grpKurtosis + + 1 - - 0 + + Scale - - grpCommon + + grpScale - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tbsum + + tbMore - - 0 + + 2 - - grpQuartiles + + 208, 19 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 5, 5, 5, 5 - - tbsum + + 101, 20 - + 1 - - grpNotOrderedFactor - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ucrChkMc - - tbsum + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 2 + + grpSkewness - - grpNumeric + + 0 - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 7, 19 - - tbsum + + 5, 5, 5, 5 - - 3 + + 254, 20 - - 4, 22 + + 0 - - 3, 3, 3, 3 + + ucrChkSkewness - - 409, 383 + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - 0 + + grpSkewness - - Summaries + + 1 - - tbsum + + 10, 273 - - System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 393, 49 - - tbSummaries + + 2 - - 0 + + Skewness - - ucrChkn_distinct + + grpSkewness - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - grpCommon + + tbMore - - 0 + + 3 - - ucrChkNTotal + + 7, 19 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 5, 5, 5, 5 - - grpCommon + + 120, 20 - - 1 + + 0 - - ucrChkMode + + ucrChkKurtosis - + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - grpCommon - - - 2 + + grpKurtosis - - ucrChkNMissing + + 0 - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 10, 329 - - grpCommon + + 393, 50 - + 3 - - ucrChkNonMissing + + Kurtosis - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + grpKurtosis - - grpCommon + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + + tbMore + + 4 - - 10, 6 + + 4, 22 - - 393, 83 + + 3, 3, 3, 3 - - 0 + + 409, 383 - - Common + + 1 - - grpCommon + + More - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + tbMore - - tbsum + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbSummaries - - 0 + + 1 172, 51 @@ -3807,53 +2394,29 @@ 4 - - ucrChkLowerQuartile - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 10, 6 - - grpQuartiles + + 393, 83 - + 0 - - ucrChkUpperQuartile - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpQuartiles - - - 1 - - - 10, 301 - - - 393, 56 - - - 3 - - - Quartiles + + Common - - grpQuartiles + + grpCommon - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tbsum - - 1 + + 0 7, 19 @@ -3903,65 +2466,29 @@ 1 - - ucrChkRange - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNotOrderedFactor - - - 0 - - - ucrChkMaximum - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNotOrderedFactor - - - 1 - - - ucrChkMinimum - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNotOrderedFactor - - - 2 - - - 10, 108 + + 10, 301 - - 393, 77 + + 393, 56 - - 1 + + 3 - - All but (unordered) Factor + + Quartiles - - grpNotOrderedFactor + + grpQuartiles - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tbsum - - 2 + + 1 7, 49 @@ -4035,89 +2562,29 @@ 2 - - ucrChkVariance - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 0 - - - ucrChkMedian - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + 10, 108 - - grpNumeric + + 393, 77 - + 1 - - ucrChkStdDev - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 2 - - - ucrChkSum - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 3 - - - ucrChkMean - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpNumeric - - - 4 - - - 10, 204 - - - 393, 78 - - - 2 - - - Numeric + + All but (unordered) Factor - - grpNumeric + + grpNotOrderedFactor - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tbsum - - 3 + + 2 172, 51 @@ -4239,6 +2706,57 @@ 4 + + 10, 204 + + + 393, 78 + + + 2 + + + Numeric + + + grpNumeric + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbsum + + + 3 + + + 4, 22 + + + 3, 3, 3, 3 + + + 409, 383 + + + 0 + + + Summaries + + + tbsum + + + System.Windows.Forms.TabPage, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tbSummaries + + + 0 + 6, 7 diff --git a/instat/sdgSummaries.vb b/instat/sdgSummaries.vb index c4d0aab0385..0c777f98630 100644 --- a/instat/sdgSummaries.vb +++ b/instat/sdgSummaries.vb @@ -17,7 +17,6 @@ Imports instat.Translations Public Class sdgSummaries Public clsListFunction, clsDefaultFunction, clsConcFunction As New RFunction - Public bFirstLoad As Boolean = True Public bControlsInitialised As Boolean = False Private lstCheckboxes As New List(Of ucrCheck) Private lstVerifCheckboxes As New List(Of ucrCheck) @@ -174,10 +173,6 @@ Public Class sdgSummaries ucrChkProportion.AddToLinkedControls(ucrChkPercentage, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkCount.AddToLinkedControls(ucrInputComboCountTest, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:="==") ucrChkCount.AddToLinkedControls(ucrInputCountValue, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) - ucrChkMaxNumMissing.AddToLinkedControls({ucrNudNumber}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) - ucrChkMaxPercMissing.AddToLinkedControls({ucrInputPercentage}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) - ucrChkMinNumNonMissing.AddToLinkedControls({ucrNudNumberNotMissing}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=340) - ucrChkConsecutiveMissing.AddToLinkedControls({ucrNudConsecutive}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=4) ucrChkQuantile.AddToLinkedControls(ucrInputQuantile, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0) ucrInputN.SetLinkedDisplayControl(lblInputN) @@ -235,29 +230,6 @@ Public Class sdgSummaries ucrChkCount.SetParameter(New RParameter("count_calc", 29), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "count_calc" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkCount.SetText("Count") - ucrChkMaxNumMissing.SetParameter(New RParameter("n", 1, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'n'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) - ucrChkMaxNumMissing.SetText("Maximum number of missing allowed") - - ucrChkMinNumNonMissing.SetParameter(New RParameter("n_non_miss", 2, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'n_non_miss'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) - ucrChkMinNumNonMissing.SetText("Minimum number of non missing required") - - ucrChkMaxPercMissing.SetParameter(New RParameter("prop", 3, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'prop'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) - ucrChkMaxPercMissing.SetText("Maximum percentage of missing allowed") - - ucrChkConsecutiveMissing.SetParameter(New RParameter("con", 4, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'con'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) - ucrChkConsecutiveMissing.SetText("Maximum number of consecutive missing allowed") - - ucrInputPercentage.SetParameter(New RParameter("na_max_prop", 10)) - ucrInputPercentage.SetValidationTypeAsNumeric(dcmMin:=0, dcmMax:=100) - ucrInputPercentage.SetLinkedDisplayControl(lblPercentage) - - ucrNudNumber.SetParameter(New RParameter("na_max_n", 11)) - - ucrNudNumberNotMissing.SetParameter(New RParameter("na_min_n", 12)) - ucrNudNumberNotMissing.SetMinMax(0, iNewMax:=Integer.MaxValue) - - ucrNudConsecutive.SetParameter(New RParameter("na_consecutive_n", 13)) - ucrChkStandardErrorOfMean.SetParameter(New RParameter("standard_error_mean", 30), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "standard_error_mean" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkStandardErrorOfMean.SetText("Standard Error of the Mean") @@ -349,7 +321,7 @@ Public Class sdgSummaries lstVerifCheckboxes.AddRange({ucrChkCorrelations, ucrChkCoefDetermination, ucrChkCoefPersistence, ucrChkIndexOfAgreement, ucrChkKlingGuptaEfficiency, ucrChkMeanAbsoluteError, ucrChkModifiedIndexOfAgreement, ucrChkMeanError, ucrChkModNashSutcliffeEff, ucrChkMeanSquaredError, ucrChkNormRootMeanSquaredError, ucrChkNashSutcliffeEfficiency, ucrChkPercentBias, ucrChkRelativeIndexOfAgreement, ucrChkRootMeanSquaredError, ucrChkRelativeNashSutcliffeEff, ucrChkRatioOfStandardDeviation, ucrChkRatioOfRootMeanSquaredError, ucrChkSumOfSquaredResiduals, ucrChkVolumetricEfficiency}) - lstCheckboxes.AddRange({ucrChkNTotal, ucrChkNonMissing, ucrChkNMissing, ucrChkMean, ucrChkMinimum, ucrChkMode, ucrChkMaximum, ucrChkMedian, ucrChkStdDev, ucrChkVariance, ucrChkRange, ucrChkSum, ucrChkUpperQuartile, ucrChkLowerQuartile, ucrChkMedianAbsoluteDeviation, ucrChkKurtosis, ucrChkCoefficientOfVariation, ucrChkSkewness, ucrChkMc, ucrChkQn, ucrChkSn, ucrChkCorrelations, ucrChkCovariance, ucrChkFirst, ucrChkLast, ucrChknth, ucrChkn_distinct, ucrChkTrimmedMean, ucrChkPercentile, ucrChkProportion, ucrChkCount, ucrChkStandardErrorOfMean, ucrChkMaxNumMissing, ucrChkMinNumNonMissing, ucrChkMaxPercMissing, ucrChkConsecutiveMissing, ucrChkCircMean, ucrChkCircMedian, ucrChkMin, ucrChkMedianH, ucrChkMax, ucrChkQ1, ucrChkQ3, ucrChkQuantile, ucrChkSd, ucrChkVar, ucrChkAngVar, ucrChkAngDev, ucrChkrho, ucrChkCircRange, ucrChkCoefDetermination, ucrChkCoefPersistence, ucrChkIndexOfAgreement, ucrChkKlingGuptaEfficiency, ucrChkMeanAbsoluteError, ucrChkModifiedIndexOfAgreement, ucrChkMeanError, ucrChkModNashSutcliffeEff, ucrChkMeanSquaredError, ucrChkNormRootMeanSquaredError, ucrChkNashSutcliffeEfficiency, ucrChkPercentBias, ucrChkRelativeIndexOfAgreement, ucrChkRootMeanSquaredError, ucrChkRelativeNashSutcliffeEff, ucrChkRatioOfStandardDeviation, ucrChkRatioOfRootMeanSquaredError, ucrChkSumOfSquaredResiduals, ucrChkVolumetricEfficiency}) + lstCheckboxes.AddRange({ucrChkNTotal, ucrChkNonMissing, ucrChkNMissing, ucrChkMean, ucrChkMinimum, ucrChkMode, ucrChkMaximum, ucrChkMedian, ucrChkStdDev, ucrChkVariance, ucrChkRange, ucrChkSum, ucrChkUpperQuartile, ucrChkLowerQuartile, ucrChkMedianAbsoluteDeviation, ucrChkKurtosis, ucrChkCoefficientOfVariation, ucrChkSkewness, ucrChkMc, ucrChkQn, ucrChkSn, ucrChkCorrelations, ucrChkCovariance, ucrChkFirst, ucrChkLast, ucrChknth, ucrChkn_distinct, ucrChkTrimmedMean, ucrChkPercentile, ucrChkProportion, ucrChkCount, ucrChkStandardErrorOfMean, ucrChkCircMean, ucrChkCircMedian, ucrChkMin, ucrChkMedianH, ucrChkMax, ucrChkQ1, ucrChkQ3, ucrChkQuantile, ucrChkSd, ucrChkVar, ucrChkAngVar, ucrChkAngDev, ucrChkrho, ucrChkCircRange, ucrChkCoefDetermination, ucrChkCoefPersistence, ucrChkIndexOfAgreement, ucrChkKlingGuptaEfficiency, ucrChkMeanAbsoluteError, ucrChkModifiedIndexOfAgreement, ucrChkMeanError, ucrChkModNashSutcliffeEff, ucrChkMeanSquaredError, ucrChkNormRootMeanSquaredError, ucrChkNashSutcliffeEfficiency, ucrChkPercentBias, ucrChkRelativeIndexOfAgreement, ucrChkRootMeanSquaredError, ucrChkRelativeNashSutcliffeEff, ucrChkRatioOfStandardDeviation, ucrChkRatioOfRootMeanSquaredError, ucrChkSumOfSquaredResiduals, ucrChkVolumetricEfficiency}) For Each ctrTemp As ucrCheck In lstCheckboxes ctrTemp.SetParameterIncludeArgumentName(False) ctrTemp.SetRDefault(Chr(34) & Chr(34)) @@ -365,7 +337,6 @@ Public Class sdgSummaries If Not bControlsInitialised Then InitialiseControls() - End If clsListFunction = clsNewRFunction clsDefaultFunction = clsNewDefaultFunction @@ -397,10 +368,6 @@ Public Class sdgSummaries ucrSelectorOrderBy.SetDataframe(strDataFrame, False) End If - ucrInputPercentage.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) - ucrNudNumber.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) - ucrNudNumberNotMissing.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) - ucrNudConsecutive.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) ucrChkPercentage.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) ucrInputPropValue.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) ucrInputComboPropTest.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) @@ -412,11 +379,6 @@ Public Class sdgSummaries ucrInputQuantile.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) ucrInputJmia.SetRCode(clsDefaultFunction, bReset, bCloneIfNeeded:=True) - ucrChkMaxNumMissing.SetRCode(clsConcFunction, bReset, bCloneIfNeeded:=True) - ucrChkMaxPercMissing.SetRCode(clsConcFunction, bReset, bCloneIfNeeded:=True) - ucrChkConsecutiveMissing.SetRCode(clsConcFunction, bReset, bCloneIfNeeded:=True) - ucrChkMinNumNonMissing.SetRCode(clsConcFunction, bReset, bCloneIfNeeded:=True) - ucrChkCount.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) ucrChkProportion.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) ucrChkPercentile.SetRCode(clsListFunction, bReset, bCloneIfNeeded:=True) @@ -602,14 +564,6 @@ Public Class sdgSummaries OrderByCheckEnabled() End Sub - Private Sub ucrChkConsecutiveMissing_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkConsecutiveMissing.ControlValueChanged, ucrChkMaxNumMissing.ControlValueChanged, ucrChkMaxPercMissing.ControlValueChanged, ucrChkMaxNumMissing.ControlValueChanged, ucrChkMinNumNonMissing.ControlValueChanged - If ucrChkConsecutiveMissing.Checked OrElse ucrChkMinNumNonMissing.Checked OrElse ucrChkMaxNumMissing.Checked OrElse ucrChkMaxPercMissing.Checked Then - clsDefaultFunction.AddParameter("na_type", clsRFunctionParameter:=clsConcFunction, iPosition:=9) - Else - clsDefaultFunction.RemoveParameterByName("na_type") - End If - End Sub - Private Sub ucrChkSelectAll_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSelectAll.ControlValueChanged If ucrChkSelectAll.Checked Then For Each ctrTemp As ucrCheck In lstVerifCheckboxes From 3bb1e8dcb2e81d6ee8811a5a0fb83220236ca781 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 12 Oct 2020 22:31:24 +0300 Subject: [PATCH 194/277] moved daily precip 0.25deg to the bottom --- instat/dlgImportGriddedData.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 70ab287864f..964111d62e6 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -173,10 +173,10 @@ Public Class dlgImportGriddedData ucrDtpMaxDate.MinDate = New Date(1983, 1, 1) Case "UCSB_CHIRPS" dctFiles = New Dictionary(Of String, String) - dctFiles.Add("Daily Precipitation 0.25 degree", Chr(34) & "daily_improved_global_0p25_prcp" & Chr(34)) dctFiles.Add("Daily Precipitation 0.05 degree", Chr(34) & "daily_improved_global_0p05_prcp" & Chr(34)) dctFiles.Add("Dekad Precipitation 0.05 degree", Chr(34) & "dekad_prcp" & Chr(34)) dctFiles.Add("Monthly Precipitation 0.05 degree", Chr(34) & "monthly_global_prcp" & Chr(34)) + dctFiles.Add("Daily Precipitation 0.25 degree", Chr(34) & "daily_improved_global_0p25_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "Daily Precipitation 0.25 degree" ucrDtpMinDate.MinDate = New Date(1981, 1, 1) From bb05963e382eb87f73f245d5758355866bbcea66 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 12 Oct 2020 22:55:58 +0300 Subject: [PATCH 195/277] review comments --- instat/dlgImportGriddedData.vb | 2 ++ instat/static/InstatObject/R/instat_object_R6.R | 17 ++++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 964111d62e6..53362c18f71 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -155,6 +155,8 @@ Public Class dlgImportGriddedData dctFiles = New Dictionary(Of String, String) dctFiles.Add("RFE2 Daily Precipitation", Chr(34) & "daily_rfev2_est_prcp" & Chr(34)) dctFiles.Add("RFE2 10-day Precipitation", Chr(34) & "10day_rfev2_est_prcp" & Chr(34)) + dctFiles.Add("Daily estimated Precipitation", Chr(34) & "daily_est_prcp" & Chr(34)) + dctFiles.Add("Monthly estimated Precipitation", Chr(34) & "monthly_est_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "RFE2 Daily Precipitation" ucrDtpMinDate.MinDate = New Date(2000, 10, 31) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 59ee6ec53d3..4e384544b04 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2130,17 +2130,6 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi else { stop("Data file does not exist for TAMSAT data") } - } else if (source == "NOAA_ARC2") { - prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa/.DAILY/.ARC2") - if (data == "daily_est_prcp") { - extension <- ".daily/.est_prcp" - } # (days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) - else if (data == "monthly_est_prcp") { - extension <- ".monthly/.est_prcp" - } # (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) - else { - stop("Data file does not exist for NOAA ARC2 data") - } } else if (source == "NOAA") { prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa") if (data == "daily_rfev2_est_prcp") { @@ -2149,6 +2138,12 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi else if (data == "10day_rfev2_est_prcp") { extension <- ".TEN-DAY/.RFEv2/.est_prcp" } # grid: /T (days since 1960-01-01) ordered [ (1-10 Dec 1999) (11-20 Dec 1999) (21-31 Dec 1999) ... (1-10 Sep 2020)] N= 748 pts :grid + else if (data == "daily_est_prcp") { + extension <- ".DAILY/.ARC2/.daily/.est_prcp" + } # (days since 1960-01-01 12:00:00) ordered (1 Jan 1983) to (12 Sep 2020) + else if (data == "monthly_est_prcp") { + extension <- ".DAILY/.ARC2/.monthly/.est_prcp" + } # (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) else { stop("Data file does not exist for NOAA RFE2 data") } From 6b819e07027a2d75b8a954e865e2ae3e909454b5 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 12 Oct 2020 22:59:05 +0300 Subject: [PATCH 196/277] minor edit --- instat/static/InstatObject/R/instat_object_R6.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 4e384544b04..431fb772c64 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2145,7 +2145,7 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi extension <- ".DAILY/.ARC2/.monthly/.est_prcp" } # (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) else { - stop("Data file does not exist for NOAA RFE2 data") + stop("Data file does not exist for NOAA data") } } else if (source == "NOAA_CMORPH_DAILY" || source == "NOAA_CMORPH_3HOURLY" || source == "NOAA_CMORPH_DAILY_CALCULATED") { if (source == "NOAA_CMORPH_DAILY") { From ee29c19f5f25cb7809ad0a78c1b1225eedadaed0 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 13 Oct 2020 08:40:48 +0300 Subject: [PATCH 197/277] addming toolstrip to frmMain --- instat/frmMain.Designer.vb | 16 +- instat/frmMain.resx | 979 +++++++++++++++++++------------------ instat/frmMain.vb | 6 + 3 files changed, 521 insertions(+), 480 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index 35ad5a09639..dca8b416647 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -184,7 +184,9 @@ Partial Class frmMain Me.mnuClimaticFileOpenGriddedData = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticFileImportandTidyNetCDF = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticFileOpenandTidyShapefile = New System.Windows.Forms.ToolStripMenuItem() + Me.ToolStripSeparator20 = New System.Windows.Forms.ToolStripSeparator() Me.mnuClimateFileImportFromClimSoft = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimateFileImportFromClimSoftWizard = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticFileImportFromCliData = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator15 = New System.Windows.Forms.ToolStripSeparator() Me.mnuClimaticFileExportToCPT = New System.Windows.Forms.ToolStripMenuItem() @@ -1446,7 +1448,7 @@ Partial Class frmMain ' 'mnuClimaticFile ' - Me.mnuClimaticFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFileOpensst, Me.mnuClimaticFileOpenGriddedData, Me.mnuClimaticFileImportandTidyNetCDF, Me.mnuClimaticFileOpenandTidyShapefile, Me.mnuClimateFileImportFromClimSoft, Me.mnuClimaticFileImportFromCliData, Me.ToolStripSeparator15, Me.mnuClimaticFileExportToCPT}) + Me.mnuClimaticFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFileOpensst, Me.mnuClimaticFileOpenGriddedData, Me.mnuClimaticFileImportandTidyNetCDF, Me.mnuClimaticFileOpenandTidyShapefile, Me.ToolStripSeparator20, Me.mnuClimateFileImportFromClimSoft, Me.mnuClimateFileImportFromClimSoftWizard, Me.mnuClimaticFileImportFromCliData, Me.ToolStripSeparator15, Me.mnuClimaticFileExportToCPT}) Me.mnuClimaticFile.Name = "mnuClimaticFile" resources.ApplyResources(Me.mnuClimaticFile, "mnuClimaticFile") ' @@ -1470,11 +1472,21 @@ Partial Class frmMain Me.mnuClimaticFileOpenandTidyShapefile.Name = "mnuClimaticFileOpenandTidyShapefile" resources.ApplyResources(Me.mnuClimaticFileOpenandTidyShapefile, "mnuClimaticFileOpenandTidyShapefile") ' + 'ToolStripSeparator20 + ' + Me.ToolStripSeparator20.Name = "ToolStripSeparator20" + resources.ApplyResources(Me.ToolStripSeparator20, "ToolStripSeparator20") + ' 'mnuClimateFileImportFromClimSoft ' Me.mnuClimateFileImportFromClimSoft.Name = "mnuClimateFileImportFromClimSoft" resources.ApplyResources(Me.mnuClimateFileImportFromClimSoft, "mnuClimateFileImportFromClimSoft") ' + 'mnuClimateFileImportFromClimSoftWizard + ' + Me.mnuClimateFileImportFromClimSoftWizard.Name = "mnuClimateFileImportFromClimSoftWizard" + resources.ApplyResources(Me.mnuClimateFileImportFromClimSoftWizard, "mnuClimateFileImportFromClimSoftWizard") + ' 'mnuClimaticFileImportFromCliData ' resources.ApplyResources(Me.mnuClimaticFileImportFromCliData, "mnuClimaticFileImportFromCliData") @@ -4703,4 +4715,6 @@ Partial Class frmMain Friend WithEvents mnuStructuredCircularOtherRosePlots As ToolStripMenuItem Friend WithEvents ToolStripSeparator68 As ToolStripSeparator Friend WithEvents mnuStructuredCircularCirclize As ToolStripMenuItem + Friend WithEvents ToolStripSeparator20 As ToolStripSeparator + Friend WithEvents mnuClimateFileImportFromClimSoftWizard As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 1e67e459feb..e09bf612b45 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -118,6 +118,18 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 64, 20 + + + Describe + + + 172, 22 + + + One Variable + 146, 22 @@ -145,11 +157,11 @@ Rating Data... - + 172, 22 - - One Variable + + Two Variables 146, 22 @@ -172,11 +184,11 @@ Frequencies... - + 172, 22 - - Two Variables + + Three Variables @@ -206,11 +218,11 @@ Frequencies - + 172, 22 - - Three Variables + + Specific 209, 22 @@ -299,11 +311,11 @@ Mosaic Plot... - + 172, 22 - - Specific + + General 188, 22 @@ -335,15 +347,15 @@ Use Summaries... - - 172, 22 - - - General - 169, 6 + + 172, 22 + + + Multivariate + 203, 22 @@ -362,12 +374,6 @@ Canonical Correlations... - - 172, 22 - - - Multivariate - 169, 6 @@ -398,11 +404,17 @@ View Graph... - - 64, 20 + + 53, 20 - - Describe + + Model + + + 201, 22 + + + Probability Distributions 242, 22 @@ -425,15 +437,15 @@ Random Samples (Use Model)... - - 201, 22 - - - Probability Distributions - 198, 6 + + 201, 22 + + + Fit Model + 223, 22 @@ -482,11 +494,11 @@ Fit Model Keyboard... - + 201, 22 - - Fit Model + + Compare Models 149, 22 @@ -494,11 +506,11 @@ One Variable... - + 201, 22 - - Compare Models + + Use Model 192, 22 @@ -542,11 +554,14 @@ Use Model Keyboard... - + + False + + 201, 22 - - Use Model + + Other (One Variable) 166, 22 @@ -581,14 +596,14 @@ Goodness of Fit... - + False - + 201, 22 - - Other (One Variable) + + Other (Two Variables) False @@ -635,14 +650,14 @@ Non Parameteric One Way ANOVA... - + False - + 201, 22 - - Other (Two Variables) + + Other (Three Variable) False @@ -665,14 +680,14 @@ Chi-square Test... - + False - + 201, 22 - - Other (Three Variable) + + Other (General) False @@ -701,21 +716,6 @@ Log Linear... - - False - - - 201, 22 - - - Other (General) - - - 53, 20 - - - Model - False @@ -740,6 +740,15 @@ False + + 212, 22 + + + Evaporation + + + False + False @@ -758,13 +767,13 @@ Penman... - + 212, 22 - - Evaporation + + Crop - + False @@ -785,15 +794,6 @@ Water Satisfaction Index... - - 212, 22 - - - Crop - - - False - False @@ -806,6 +806,12 @@ False + + 44, 20 + + + View + 211, 22 @@ -872,11 +878,11 @@ Reset to Default Layout - + 44, 20 - - View + + Help 221, 22 @@ -938,6 +944,12 @@ 218, 6 + + 221, 22 + + + Guides + 166, 22 @@ -959,12 +971,6 @@ More... - - 221, 22 - - - Guides - False @@ -986,12 +992,6 @@ Acknowlegments - - 44, 20 - - - Help - 538, 56 @@ -1002,49 +1002,58 @@ 638, 56 - 211, 22 + 247, 22 Open SST... - 211, 22 + 247, 22 Open Gridded Data (IRI)... - 211, 22 + 247, 22 Import and Tidy NetCDF... - 211, 22 + 247, 22 Open and Tidy Shapefile... + + 244, 6 + - 211, 22 + 247, 22 Import From CLIMSOFT... + + 247, 22 + + + Import From CLIMSOFT Wizard... + False - 211, 22 + 247, 22 Import From CLIDATA... - 208, 6 + 244, 6 - 211, 22 + 247, 22 Export to CPT... @@ -1058,6 +1067,99 @@ 209, 6 + + 212, 22 + + + Tidy and Examine + + + 212, 22 + + + Dates + + + 212, 22 + + + Define Climatic Data... + + + 212, 22 + + + Check Data + + + 212, 22 + + + Prepare + + + 209, 6 + + + 212, 22 + + + Describe + + + 212, 22 + + + PICSA + + + 212, 22 + + + CM SAF + + + 212, 22 + + + Compare + + + 212, 22 + + + Mapping... + + + 212, 22 + + + Model + + + 209, 6 + + + 212, 22 + + + Seasonal Forecast Support + + + 212, 22 + + + Climate Methods + + + False + + + 63, 20 + + + Climatic + 211, 22 @@ -1136,12 +1238,6 @@ One Variable Frequencies - - 212, 22 - - - Tidy and Examine - 162, 22 @@ -1184,18 +1280,6 @@ Use Time... - - 212, 22 - - - Dates - - - 212, 22 - - - Define Climatic Data... - 178, 22 @@ -1241,12 +1325,6 @@ Homogenization... - - 212, 22 - - - Check Data - 189, 22 @@ -1406,15 +1484,6 @@ False - - 212, 22 - - - Prepare - - - 209, 6 - False @@ -1433,18 +1502,18 @@ Temperature... - - 139, 22 - - - Wind Rose... - 199, 22 Wind Speed/Direction... + + 139, 22 + + + Wind Rose... + False @@ -1469,12 +1538,6 @@ 196, 6 - - 212, 22 - - - Describe - 246, 22 @@ -1502,12 +1565,6 @@ Crops... - - 212, 22 - - - PICSA - 231, 22 @@ -1520,12 +1577,6 @@ Export to CM SAF R Toolbox... - - 212, 22 - - - CM SAF - 198, 22 @@ -1583,18 +1634,6 @@ Taylor Diagram... - - 212, 22 - - - Compare - - - 212, 22 - - - Mapping... - 180, 22 @@ -1616,15 +1655,6 @@ Markov Modelling... - - 212, 22 - - - Model - - - 209, 6 - 246, 22 @@ -1664,11 +1694,11 @@ Cumulative/Exceedance Graph... - - 212, 22 + + 199, 22 - - Seasonal Forecast Support + + Data Manipulation False @@ -1805,11 +1835,11 @@ Output for CDT... - + 199, 22 - - Data Manipulation + + Graphics False @@ -1928,12 +1958,6 @@ Three Summaries... - - 199, 22 - - - Graphics - False @@ -1943,6 +1967,12 @@ Model... + + 199, 22 + + + Additional + False @@ -1988,12 +2018,6 @@ Water Balance... - - 199, 22 - - - Additional - False @@ -2003,21 +2027,6 @@ Create Climate Object... - - 212, 22 - - - Climate Methods - - - False - - - 63, 20 - - - Climatic - Ctrl+S @@ -2028,6 +2037,12 @@ Save... + + 232, 22 + + + Save As + 164, 22 @@ -2052,12 +2067,6 @@ Save Script As... - - 232, 22 - - - Save As - False @@ -2088,6 +2097,12 @@ Exit + + 39, 20 + + + Edit + False @@ -2172,24 +2187,12 @@ Select All - - 39, 20 - - - Edit - 775, 56 946, 56 - - 119, 17 - - - No worksheet loaded - 0, 460 @@ -2214,9 +2217,42 @@ 1 + + 119, 17 + + + No worksheet loaded + 17, 95 + + 0, 24 + + + No + + + 834, 37 + + + 7 + + + Tool + + + Tool_strip + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + Magenta @@ -2280,18 +2316,6 @@ Edit Last Dialog - - 57, 6 - - - False - - - 57, 6 - - - False - Magenta @@ -2301,17 +2325,17 @@ Last 10 Dialogs - - 128, 22 + + 57, 6 - - R Viewer... + + False - - 128, 22 + + 57, 6 - - Plotly... + + False @@ -2351,6 +2375,18 @@ View Last Graph + + 128, 22 + + + R Viewer... + + + 128, 22 + + + Plotly... + 6, 37 @@ -2372,18 +2408,6 @@ Output Window - - 196, 22 - - - Column Metadata... - - - 196, 22 - - - Data Frame Metadata... - iVBORw0KGgoAAAANSUhEUgAAAG8AAABvCAYAAADixZ5gAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -2440,17 +2464,17 @@ Column Metadata - - 160, 22 + + 196, 22 - - Log Window... + + Column Metadata... - - 160, 22 + + 196, 22 - - Script Window... + + Data Frame Metadata... @@ -2580,6 +2604,18 @@ Log Window + + 160, 22 + + + Log Window... + + + 160, 22 + + + Script Window... + Magenta @@ -2601,38 +2637,71 @@ He&lp - - 0, 24 + + 122, 95 + + + On - - No + + 37, 20 - - 834, 37 + + File - - 7 + + 59, 20 - - Tool + + Prepare - - Tool_strip + + 74, 20 - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Structured - - $this + + 88, 20 - - 2 + + Procurement - - 122, 95 - - - On + + 122, 20 + + + Options by Context + + + 46, 20 + + + Tools + + + 0, 0 + + + 834, 24 + + + 6 + + + Menu_strip + + + mnuBar + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 Ctrl+N @@ -2706,6 +2775,12 @@ 229, 6 + + 232, 22 + + + Export + 204, 22 @@ -2730,12 +2805,6 @@ Export Graph As Image... - - 232, 22 - - - Export - 232, 22 @@ -2745,11 +2814,11 @@ 229, 6 - - 37, 20 + + 172, 22 - - File + + Data Frame 200, 22 @@ -2859,11 +2928,11 @@ Colour by Property... - + 172, 22 - - Data Frame + + Check Data 245, 22 @@ -2958,12 +3027,6 @@ Anonymise ID Column... - - 172, 22 - - - Check Data - 169, 6 @@ -2973,6 +3036,12 @@ Calculator... + + 172, 22 + + + Column: Calculate + 179, 22 @@ -3027,11 +3096,11 @@ Permute Columns... - + 172, 22 - - Column: Calculate + + Column: Factor 179, 22 @@ -3120,11 +3189,11 @@ Factor Data Frame... - + 172, 22 - - Column: Factor + + Column: Text 152, 22 @@ -3165,11 +3234,11 @@ Distance... - + 172, 22 - - Column: Text + + Column: Date 162, 22 @@ -3213,11 +3282,11 @@ Use Time... - + 172, 22 - - Column: Date + + Column: Define 176, 22 @@ -3234,15 +3303,15 @@ Circular... - - 172, 22 - - - Column: Define - 169, 6 + + 172, 22 + + + Data Reshape + 193, 22 @@ -3303,15 +3372,15 @@ Transpose... - - 172, 22 - - - Data Reshape - 169, 6 + + 172, 22 + + + Keys and Links + 207, 22 @@ -3342,11 +3411,11 @@ Add Comment... - + 172, 22 - - Keys and Links + + Data Object False @@ -3426,11 +3495,11 @@ Delete Metadata... - + 172, 22 - - Data Object + + R Objects 126, 22 @@ -3456,17 +3525,11 @@ Delete... - - 172, 22 - - - R Objects - - - 59, 20 + + 186, 22 - - Prepare + + Circular 192, 22 @@ -3555,11 +3618,11 @@ Circlize... - + 186, 22 - - Circular + + Low_Flow 117, 22 @@ -3567,11 +3630,11 @@ Define... - + 186, 22 - - Low_Flow + + Survival 117, 22 @@ -3579,11 +3642,11 @@ Define... - + 186, 22 - - Survival + + Time Series 119, 22 @@ -3594,6 +3657,12 @@ 116, 6 + + 119, 22 + + + Describe + 149, 22 @@ -3606,15 +3675,15 @@ General... - - 119, 22 - - - Describe - 116, 6 + + 119, 22 + + + Model + 149, 22 @@ -3627,21 +3696,9 @@ General... - - 119, 22 - - - Model - 116, 6 - - 186, 22 - - - Time Series - 183, 6 @@ -3663,12 +3720,6 @@ Options by Context... - - 74, 20 - - - Structured - 216, 22 @@ -3681,6 +3732,12 @@ Define Procurement Data... + + 216, 22 + + + Prepare + 358, 22 @@ -3735,11 +3792,11 @@ Merge Additional Data... - + 216, 22 - - Prepare + + Describe 211, 22 @@ -3756,6 +3813,12 @@ 208, 6 + + 211, 22 + + + Categorical + 319, 22 @@ -3795,11 +3858,11 @@ Display Top N... - + 211, 22 - - Categorical + + Numeric 258, 22 @@ -3822,17 +3885,11 @@ Correlations (Red Flags or others)... - - 211, 22 - - - Numeric - - + 216, 22 - - Describe + + Mapping 189, 22 @@ -3840,11 +3897,11 @@ Map Country Values... - + 216, 22 - - Mapping + + Model 292, 22 @@ -3858,12 +3915,6 @@ Fit Model... - - 216, 22 - - - Model - 213, 6 @@ -3873,6 +3924,12 @@ Define Red Flag Variables... + + 216, 22 + + + Corruption Risk Index + 278, 22 @@ -3885,17 +3942,11 @@ Summarise CRI by Country (or other)... - - 216, 22 - - - Corruption Risk Index - - - 88, 20 + + 250, 22 - - Procurement + + Check Data 215, 22 @@ -3930,18 +3981,18 @@ One Variable Frequencies... - - 250, 22 - - - Check Data - 250, 22 Define Options by Context Data... + + 250, 22 + + + Prepare + 282, 22 @@ -3969,11 +4020,11 @@ Unstack... - + 250, 22 - - Prepare + + Describe 224, 22 @@ -3996,11 +4047,11 @@ Boxplot... - + 250, 22 - - Describe + + Model 176, 22 @@ -4014,18 +4065,6 @@ General Fit Model... - - 250, 22 - - - Model - - - 122, 20 - - - Options by Context - False @@ -4092,36 +4131,6 @@ Options... - - 46, 20 - - - Tools - - - 0, 0 - - - 834, 24 - - - 6 - - - Menu_strip - - - mnuBar - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - 126, 22 @@ -7230,12 +7239,24 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ToolStripSeparator20 + + + System.Windows.Forms.ToolStripSeparator, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + mnuClimateFileImportFromClimSoft System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuClimateFileImportFromClimSoftWizard + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + mnuClimaticFileImportFromCliData diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 6aa5240c957..71a9c8cecba 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -1199,6 +1199,10 @@ Public Class frmMain dlgClimSoft.ShowDialog() End Sub + Private Sub mnuClimateFileImportFromClimSoftWizard_Click(sender As Object, e As EventArgs) Handles mnuClimateFileImportFromClimSoftWizard.Click + dlgClimsoftWizard.ShowDialog() + End Sub + Private Sub mnuClimaticFileImportFromCliData_Click(sender As Object, e As EventArgs) Handles mnuClimaticFileImportFromCliData.Click dlgCliData.ShowDialog() End Sub @@ -2210,4 +2214,6 @@ Public Class frmMain Private Sub mnuClimaticCompareConditionalQuantiles_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareConditionalQuantiles.Click dlgConditionalQuantilePlot.ShowDialog() End Sub + + End Class \ No newline at end of file From e5850bb9bf43e6828978fa1169060500c7b8d28f Mon Sep 17 00:00:00 2001 From: patowhiz Date: Tue, 13 Oct 2020 08:49:20 +0300 Subject: [PATCH 198/277] removed empty lines --- instat/frmMain.vb | 2 -- 1 file changed, 2 deletions(-) diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 71a9c8cecba..33da8ff0992 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2214,6 +2214,4 @@ Public Class frmMain Private Sub mnuClimaticCompareConditionalQuantiles_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareConditionalQuantiles.Click dlgConditionalQuantilePlot.ShowDialog() End Sub - - End Class \ No newline at end of file From 2777224b888a756f5269c2fae878720303c049d2 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 13 Oct 2020 09:45:11 +0100 Subject: [PATCH 199/277] Update instat/dlgSeasonalPlot.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgSeasonalPlot.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index b8fceaca69e..e0fa0d7b868 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -506,7 +506,8 @@ Public Class dlgSeasonalPlot End Sub ''' - ''' Sets the R Code for ucrInputReferenceSummary. This is done manually by this Sub instead of through conditions because of the complex checks on multiple functions required. + ''' Sets the R Code for ucrInputReferenceSummary. This is done manually by this sub instead of + ''' through conditions because of the complex checks on multiple functions required. ''' ''' True if the dialog is being reset. Private Sub ReferenceSummarySetRCode(bReset As Boolean) From 66e212a0357a371b0ab82b3cf62e5b81025f1d52 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 13 Oct 2020 09:45:21 +0100 Subject: [PATCH 200/277] Update instat/dlgSeasonalPlot.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgSeasonalPlot.vb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index e0fa0d7b868..055d44f7897 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -32,7 +32,10 @@ Public Class dlgSeasonalPlot Private clsGreaterOperator As ROperator Private clsEst2GreaterOperator As ROperator Private clsEst2LessOperator As ROperator - ''' Dummy ROperator set to either clsRefGreaterOperator or clsRefLessOperator depending on summary option. This is used in SetRCode for ucrInputReferenceSummary. + ''' + ''' Dummy ROperator set to either clsRefGreaterOperator or clsRefLessOperator depending on + ''' summary option. This is used in SetRCode for ucrInputReferenceSummary. + ''' Private clsRefGreaterOrLessOperator As ROperator Private clsMissingFilterFunction As RFunction From 572988892f92d6894d498d6aedf9029915abfb42 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 13 Oct 2020 09:57:07 +0100 Subject: [PATCH 201/277] removed unnecessary string assignment --- instat/dlgSeasonalPlot.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index b8fceaca69e..2e5934213a8 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -583,8 +583,8 @@ Public Class dlgSeasonalPlot End Sub Private Sub UpdateSummaryParameters() - Dim strReferenceName As String = "" - Dim strEstimatesName As String = "" + Dim strReferenceName As String + Dim strEstimatesName As String strReferenceName = ucrReceiverReference.GetVariableNames(False) strEstimatesName = ucrReceiverEstimates.GetVariableNames(False) From 6390840060fc8f8b788c57701392718c0e3b02a0 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 13 Oct 2020 09:57:46 +0100 Subject: [PATCH 202/277] Update instat/dlgSeasonalPlot.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgSeasonalPlot.vb | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index c285bca0f95..f087bd4523a 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -693,11 +693,8 @@ Public Class dlgSeasonalPlot End Sub Private Sub ucrInputReferenceThreshold_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputReferenceThreshold.ControlContentsChanged - UpdateEstimatesThresholdParameter() - End Sub - - Private Sub UpdateEstimatesThresholdParameter() - ' By default estimates has the same threshold as reference values, unless the user has already typed in ucrInputEstimatesThreshold to make them different. + ' By default estimates has the same threshold as reference values, unless the user has + ' already typed in ucrInputEstimatesThreshold to make them different. If Not ucrInputEstimatesThreshold.UserTyped Then ucrInputEstimatesThreshold.SetName(ucrInputReferenceThreshold.GetText()) End If From b3b759271d0e26a8c626657d39c11574fad68ec7 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 13 Oct 2020 09:58:06 +0100 Subject: [PATCH 203/277] Update instat/dlgSeasonalPlot.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/dlgSeasonalPlot.vb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/dlgSeasonalPlot.vb b/instat/dlgSeasonalPlot.vb index f087bd4523a..3d138eda452 100644 --- a/instat/dlgSeasonalPlot.vb +++ b/instat/dlgSeasonalPlot.vb @@ -729,8 +729,9 @@ Public Class dlgSeasonalPlot End Sub Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged - ' Facets are handles manually since they could also be managed on a sub dialog. - ' The check for clsFacetWrapTildeOperator.clsParameters.Count = 0 ensures that facets added on a subdialog are not removed when ucrReceiverStation is empty. + ' Facets are handled manually since they could also be managed on a sub dialog. + ' The check for clsFacetWrapTildeOperator.clsParameters.Count = 0 ensures that facets added + ' on a subdialog are not removed when ucrReceiverStation is empty. If ucrReceiverStation.IsEmpty AndAlso clsFacetWrapTildeOperator.clsParameters.Count = 0 Then clsPlusOperator.RemoveParameterByName("facets") Else From afb8baa74ffd6ddfb1de8cfdf7aa06a8bc139aae Mon Sep 17 00:00:00 2001 From: haward ketoyo Date: Tue, 13 Oct 2020 10:08:11 +0000 Subject: [PATCH 204/277] Added four empty forms to formmain under Structured > Circular > Other Rose Plots Menu --- instat/dlgPolarAnnulus.Designer.vb | 52 +++ instat/dlgPolarAnnulus.resx | 120 ++++++ instat/dlgPolarAnnulus.vb | 3 + instat/dlgPolarCluster.Designer.vb | 52 +++ instat/dlgPolarCluster.resx | 120 ++++++ instat/dlgPolarCluster.vb | 3 + instat/dlgPolarFrequency.Designer.vb | 52 +++ instat/dlgPolarFrequency.resx | 120 ++++++ instat/dlgPolarFrequency.vb | 3 + instat/dlgPolarPlot.Designer.vb | 52 +++ instat/dlgPolarPlot.resx | 120 ++++++ instat/dlgPolarPlot.vb | 3 + instat/frmMain.Designer.vb | 38 +- instat/frmMain.resx | 522 +++++++++++++++------------ instat/frmMain.vb | 20 +- instat/instat.vbproj | 36 ++ 16 files changed, 1086 insertions(+), 230 deletions(-) create mode 100644 instat/dlgPolarAnnulus.Designer.vb create mode 100644 instat/dlgPolarAnnulus.resx create mode 100644 instat/dlgPolarAnnulus.vb create mode 100644 instat/dlgPolarCluster.Designer.vb create mode 100644 instat/dlgPolarCluster.resx create mode 100644 instat/dlgPolarCluster.vb create mode 100644 instat/dlgPolarFrequency.Designer.vb create mode 100644 instat/dlgPolarFrequency.resx create mode 100644 instat/dlgPolarFrequency.vb create mode 100644 instat/dlgPolarPlot.Designer.vb create mode 100644 instat/dlgPolarPlot.resx create mode 100644 instat/dlgPolarPlot.vb diff --git a/instat/dlgPolarAnnulus.Designer.vb b/instat/dlgPolarAnnulus.Designer.vb new file mode 100644 index 00000000000..2e9c04d54b1 --- /dev/null +++ b/instat/dlgPolarAnnulus.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class dlgPolarAnnulus + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.UcrButtons1 = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'UcrButtons1 + ' + Me.UcrButtons1.Location = New System.Drawing.Point(3, 262) + Me.UcrButtons1.Name = "UcrButtons1" + Me.UcrButtons1.Size = New System.Drawing.Size(410, 52) + Me.UcrButtons1.TabIndex = 0 + ' + 'dlgPolarAnnulus + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(410, 349) + Me.Controls.Add(Me.UcrButtons1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgPolarAnnulus" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Polar Annulus" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents UcrButtons1 As ucrButtons +End Class diff --git a/instat/dlgPolarAnnulus.resx b/instat/dlgPolarAnnulus.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgPolarAnnulus.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgPolarAnnulus.vb b/instat/dlgPolarAnnulus.vb new file mode 100644 index 00000000000..727dc6b0a1e --- /dev/null +++ b/instat/dlgPolarAnnulus.vb @@ -0,0 +1,3 @@ +Public Class dlgPolarAnnulus + +End Class \ No newline at end of file diff --git a/instat/dlgPolarCluster.Designer.vb b/instat/dlgPolarCluster.Designer.vb new file mode 100644 index 00000000000..1010785394e --- /dev/null +++ b/instat/dlgPolarCluster.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class dlgPolarCluster + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.UcrButtons1 = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'UcrButtons1 + ' + Me.UcrButtons1.Location = New System.Drawing.Point(6, 282) + Me.UcrButtons1.Name = "UcrButtons1" + Me.UcrButtons1.Size = New System.Drawing.Size(410, 52) + Me.UcrButtons1.TabIndex = 0 + ' + 'dlgPolarCluster + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(422, 363) + Me.Controls.Add(Me.UcrButtons1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgPolarCluster" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Polar Cluster" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents UcrButtons1 As ucrButtons +End Class diff --git a/instat/dlgPolarCluster.resx b/instat/dlgPolarCluster.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgPolarCluster.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgPolarCluster.vb b/instat/dlgPolarCluster.vb new file mode 100644 index 00000000000..7d5ad26321a --- /dev/null +++ b/instat/dlgPolarCluster.vb @@ -0,0 +1,3 @@ +Public Class dlgPolarCluster + +End Class \ No newline at end of file diff --git a/instat/dlgPolarFrequency.Designer.vb b/instat/dlgPolarFrequency.Designer.vb new file mode 100644 index 00000000000..e1441c40771 --- /dev/null +++ b/instat/dlgPolarFrequency.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class dlgPolarFrequency + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.UcrButtons1 = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'UcrButtons1 + ' + Me.UcrButtons1.Location = New System.Drawing.Point(10, 329) + Me.UcrButtons1.Name = "UcrButtons1" + Me.UcrButtons1.Size = New System.Drawing.Size(410, 52) + Me.UcrButtons1.TabIndex = 0 + ' + 'dlgPolarFrequency + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(426, 396) + Me.Controls.Add(Me.UcrButtons1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgPolarFrequency" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Polar Frequency" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents UcrButtons1 As ucrButtons +End Class diff --git a/instat/dlgPolarFrequency.resx b/instat/dlgPolarFrequency.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgPolarFrequency.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgPolarFrequency.vb b/instat/dlgPolarFrequency.vb new file mode 100644 index 00000000000..248672bdab6 --- /dev/null +++ b/instat/dlgPolarFrequency.vb @@ -0,0 +1,3 @@ +Public Class dlgPolarFrequency + +End Class \ No newline at end of file diff --git a/instat/dlgPolarPlot.Designer.vb b/instat/dlgPolarPlot.Designer.vb new file mode 100644 index 00000000000..762c22fcc8f --- /dev/null +++ b/instat/dlgPolarPlot.Designer.vb @@ -0,0 +1,52 @@ + +Partial Class dlgPolarPlot + Inherits System.Windows.Forms.Form + + 'Form overrides dispose to clean up the component list. + + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + Try + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + Finally + MyBase.Dispose(disposing) + End Try + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + + Private Sub InitializeComponent() + Me.UcrButtons1 = New instat.ucrButtons() + Me.SuspendLayout() + ' + 'UcrButtons1 + ' + Me.UcrButtons1.Location = New System.Drawing.Point(7, 316) + Me.UcrButtons1.Name = "UcrButtons1" + Me.UcrButtons1.Size = New System.Drawing.Size(410, 52) + Me.UcrButtons1.TabIndex = 0 + ' + 'dlgPolarPlot + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(411, 397) + Me.Controls.Add(Me.UcrButtons1) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgPolarPlot" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Text = "Polar Plot" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents UcrButtons1 As ucrButtons +End Class diff --git a/instat/dlgPolarPlot.resx b/instat/dlgPolarPlot.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/instat/dlgPolarPlot.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/instat/dlgPolarPlot.vb b/instat/dlgPolarPlot.vb new file mode 100644 index 00000000000..881e75e2a44 --- /dev/null +++ b/instat/dlgPolarPlot.vb @@ -0,0 +1,3 @@ +Public Class dlgPolarPlot + +End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index dca8b416647..bc0bbb2c4d0 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -530,6 +530,11 @@ Partial Class frmMain Me.mnuStructuredCircularWindRose = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructuredCircularWindPollutionRose = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructuredCircularOtherRosePlots = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularOtherRosePlotsPercentileRose = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularOtherRosePlotsPolarPlot = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularOtherRosePlotsPolarFrequency = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularOtherRosePlotsPolarCluster = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuStructuredCircularOtherRosePlotsPolarAnnulus = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator68 = New System.Windows.Forms.ToolStripSeparator() Me.mnuStructuredCircularCirclize = New System.Windows.Forms.ToolStripMenuItem() Me.mnuStructuredLow_Flow = New System.Windows.Forms.ToolStripMenuItem() @@ -3416,8 +3421,34 @@ Partial Class frmMain ' 'mnuStructuredCircularOtherRosePlots ' - resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlots, "mnuStructuredCircularOtherRosePlots") + Me.mnuStructuredCircularOtherRosePlots.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuStructuredCircularOtherRosePlotsPercentileRose, Me.mnuStructuredCircularOtherRosePlotsPolarPlot, Me.mnuStructuredCircularOtherRosePlotsPolarFrequency, Me.mnuStructuredCircularOtherRosePlotsPolarCluster, Me.mnuStructuredCircularOtherRosePlotsPolarAnnulus}) Me.mnuStructuredCircularOtherRosePlots.Name = "mnuStructuredCircularOtherRosePlots" + resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlots, "mnuStructuredCircularOtherRosePlots") + ' + 'mnuStructuredCircularOtherRosePlotsPercentileRose + ' + resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlotsPercentileRose, "mnuStructuredCircularOtherRosePlotsPercentileRose") + Me.mnuStructuredCircularOtherRosePlotsPercentileRose.Name = "mnuStructuredCircularOtherRosePlotsPercentileRose" + ' + 'mnuStructuredCircularOtherRosePlotsPolarPlot + ' + resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlotsPolarPlot, "mnuStructuredCircularOtherRosePlotsPolarPlot") + Me.mnuStructuredCircularOtherRosePlotsPolarPlot.Name = "mnuStructuredCircularOtherRosePlotsPolarPlot" + ' + 'mnuStructuredCircularOtherRosePlotsPolarFrequency + ' + resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlotsPolarFrequency, "mnuStructuredCircularOtherRosePlotsPolarFrequency") + Me.mnuStructuredCircularOtherRosePlotsPolarFrequency.Name = "mnuStructuredCircularOtherRosePlotsPolarFrequency" + ' + 'mnuStructuredCircularOtherRosePlotsPolarCluster + ' + resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlotsPolarCluster, "mnuStructuredCircularOtherRosePlotsPolarCluster") + Me.mnuStructuredCircularOtherRosePlotsPolarCluster.Name = "mnuStructuredCircularOtherRosePlotsPolarCluster" + ' + 'mnuStructuredCircularOtherRosePlotsPolarAnnulus + ' + resources.ApplyResources(Me.mnuStructuredCircularOtherRosePlotsPolarAnnulus, "mnuStructuredCircularOtherRosePlotsPolarAnnulus") + Me.mnuStructuredCircularOtherRosePlotsPolarAnnulus.Name = "mnuStructuredCircularOtherRosePlotsPolarAnnulus" ' 'ToolStripSeparator68 ' @@ -4717,4 +4748,9 @@ Partial Class frmMain Friend WithEvents mnuStructuredCircularCirclize As ToolStripMenuItem Friend WithEvents ToolStripSeparator20 As ToolStripSeparator Friend WithEvents mnuClimateFileImportFromClimSoftWizard As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularOtherRosePlotsPercentileRose As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularOtherRosePlotsPolarPlot As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularOtherRosePlotsPolarFrequency As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularOtherRosePlotsPolarCluster As ToolStripMenuItem + Friend WithEvents mnuStructuredCircularOtherRosePlotsPolarAnnulus As ToolStripMenuItem End Class diff --git a/instat/frmMain.resx b/instat/frmMain.resx index e09bf612b45..fd4bcfed5ef 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -1001,6 +1001,18 @@ 638, 56 + + 63, 20 + + + Climatic + + + 212, 22 + + + File + 247, 22 @@ -1058,12 +1070,6 @@ Export to CPT... - - 212, 22 - - - File - 209, 6 @@ -1073,93 +1079,6 @@ Tidy and Examine - - 212, 22 - - - Dates - - - 212, 22 - - - Define Climatic Data... - - - 212, 22 - - - Check Data - - - 212, 22 - - - Prepare - - - 209, 6 - - - 212, 22 - - - Describe - - - 212, 22 - - - PICSA - - - 212, 22 - - - CM SAF - - - 212, 22 - - - Compare - - - 212, 22 - - - Mapping... - - - 212, 22 - - - Model - - - 209, 6 - - - 212, 22 - - - Seasonal Forecast Support - - - 212, 22 - - - Climate Methods - - - False - - - 63, 20 - - - Climatic - 211, 22 @@ -1238,6 +1157,12 @@ One Variable Frequencies + + 212, 22 + + + Dates + 162, 22 @@ -1280,6 +1205,18 @@ Use Time... + + 212, 22 + + + Define Climatic Data... + + + 212, 22 + + + Check Data + 178, 22 @@ -1325,6 +1262,12 @@ Homogenization... + + 212, 22 + + + Prepare + 189, 22 @@ -1484,6 +1427,15 @@ False + + 209, 6 + + + 212, 22 + + + Describe + False @@ -1538,6 +1490,12 @@ 196, 6 + + 212, 22 + + + PICSA + 246, 22 @@ -1565,6 +1523,12 @@ Crops... + + 212, 22 + + + CM SAF + 231, 22 @@ -1577,6 +1541,12 @@ Export to CM SAF R Toolbox... + + 212, 22 + + + Compare + 198, 22 @@ -1634,6 +1604,18 @@ Taylor Diagram... + + 212, 22 + + + Mapping... + + + 212, 22 + + + Model + 180, 22 @@ -1655,6 +1637,15 @@ Markov Modelling... + + 209, 6 + + + 212, 22 + + + Seasonal Forecast Support + 246, 22 @@ -1694,6 +1685,15 @@ Cumulative/Exceedance Graph... + + 212, 22 + + + Climate Methods + + + False + 199, 22 @@ -2655,6 +2655,180 @@ Prepare + + 192, 22 + + + Define... + + + 192, 22 + + + Calculator... + + + 192, 22 + + + Summaries... + + + 189, 6 + + + False + + + 192, 22 + + + Scatter Plot... + + + False + + + 192, 22 + + + Density Plot... + + + False + + + 192, 22 + + + Rose Plot... + + + 189, 6 + + + 192, 22 + + + Wind Rose... + + + False + + + 192, 22 + + + Wind/Pollution Rose... + + + False + + + 180, 22 + + + Percentile Rose... + + + False + + + 180, 22 + + + Polar Plot... + + + False + + + 180, 22 + + + Polar Frequency... + + + False + + + 180, 22 + + + Polar Cluster... + + + False + + + 180, 22 + + + Polar Annulus... + + + 192, 22 + + + Other Rose Plots + + + 189, 6 + + + False + + + 192, 22 + + + Circlize... + + + 186, 22 + + + Circular + + + 186, 22 + + + Low_Flow + + + 186, 22 + + + Survival + + + 186, 22 + + + Time Series + + + 183, 6 + + + 186, 22 + + + Climatic... + + + 186, 22 + + + Procurement... + + + 186, 22 + + + Options by Context... + 74, 20 @@ -3525,129 +3699,18 @@ Delete... - - 186, 22 - - - Circular - - - 192, 22 - - - Define... - - - 192, 22 - - - Calculator... - - - 192, 22 - - - Summaries... - - - 189, 6 - - - False - - - 192, 22 - - - Scatter Plot... - - - False - - - 192, 22 - - - Density Plot... - - - False - - - 192, 22 - - - Rose Plot... - - - 189, 6 - - - 192, 22 - - - Wind Rose... - - - False - - - 192, 22 - - - Wind/Pollution Rose... - - - False - - - 192, 22 - - - Other Rose Plots... - - - 189, 6 - - - False - - - 192, 22 - - - Circlize... - - - 186, 22 - - - Low_Flow - 117, 22 Define... - - 186, 22 - - - Survival - 117, 22 Define... - - 186, 22 - - - Time Series - 119, 22 @@ -3699,27 +3762,6 @@ 116, 6 - - 183, 6 - - - 186, 22 - - - Climatic... - - - 186, 22 - - - Procurement... - - - 186, 22 - - - Options by Context... - 216, 22 @@ -9297,6 +9339,36 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + mnuStructuredCircularOtherRosePlotsPercentileRose + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularOtherRosePlotsPolarPlot + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularOtherRosePlotsPolarFrequency + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularOtherRosePlotsPolarCluster + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + mnuStructuredCircularOtherRosePlotsPolarAnnulus + + + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + ToolStripSeparator68 diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 33da8ff0992..056de3c66cb 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -2199,10 +2199,6 @@ Public Class frmMain dlgWindPollutionRose.ShowDialog() End Sub - Private Sub mnuStructuredCircularOtherRosePlots_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularOtherRosePlots.Click - dlgOtherRosePlots.ShowDialog() - End Sub - Private Sub mnuClimaticCompareTimeSeriesPlot_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareTimeSeriesPlot.Click dlgTimeSeriesPlot.ShowDialog() End Sub @@ -2214,4 +2210,20 @@ Public Class frmMain Private Sub mnuClimaticCompareConditionalQuantiles_Click(sender As Object, e As EventArgs) Handles mnuClimaticCompareConditionalQuantiles.Click dlgConditionalQuantilePlot.ShowDialog() End Sub + + Private Sub mnuStructuredCircularOtherRosePlotsPolarPlot_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularOtherRosePlotsPolarPlot.Click + dlgPolarPlot.ShowDialog() + End Sub + + Private Sub mnuStructuredCircularOtherRosePlotsPolarFrequency_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularOtherRosePlotsPolarFrequency.Click + dlgPolarFrequency.ShowDialog() + End Sub + + Private Sub mnuStructuredCircularOtherRosePlotsPolarCluster_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularOtherRosePlotsPolarCluster.Click + dlgPolarCluster.ShowDialog() + End Sub + + Private Sub mnuStructuredCircularOtherRosePlotsPolarAnnulus_Click(sender As Object, e As EventArgs) Handles mnuStructuredCircularOtherRosePlotsPolarAnnulus.Click + dlgPolarAnnulus.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/instat/instat.vbproj b/instat/instat.vbproj index 717e4f1d762..05f5a98ddd9 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -238,6 +238,30 @@ Form + + dlgPolarAnnulus.vb + + + Form + + + dlgPolarCluster.vb + + + Form + + + dlgPolarFrequency.vb + + + Form + + + dlgPolarPlot.vb + + + Form + dlgSeasonalPlot.vb @@ -2609,6 +2633,18 @@ dlgOtherRosePlots.vb + + dlgPolarAnnulus.vb + + + dlgPolarCluster.vb + + + dlgPolarFrequency.vb + + + dlgPolarPlot.vb + dlgSeasonalPlot.vb From 27630ff2c9ae6dcce29e027cc3379cafa1badc4b Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 13 Oct 2020 17:07:03 +0300 Subject: [PATCH 205/277] Improving the width for some of the keyboard options --- instat/dlgCalculator.vb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index d263c20f85b..055538f06e7 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -137,9 +137,9 @@ Public Class dlgCalculator Case "Logical and Symbols" Me.Width = iBasicWidth * 1.4 Case "Summary" - Me.Width = iBasicWidth * 1.43 + Me.Width = iBasicWidth * 1.46 Case "Strings (Character Columns)" - Me.Width = iBasicWidth * 1.47 + Me.Width = iBasicWidth * 1.49 Case "Factor" Me.Width = iBasicWidth * 1.4 Case "Probability" @@ -147,11 +147,11 @@ Public Class dlgCalculator Case "Dates" Me.Width = iBasicWidth * 1.3 Case "Transform" - Me.Width = iBasicWidth * 1.35 + Me.Width = iBasicWidth * 1.37 Case "Circular" Me.Width = iBasicWidth * 1.36 Case "Wakefield" - Me.Width = iBasicWidth * 1.7 + Me.Width = iBasicWidth * 1.73 Case "Modifier" Me.Width = iBasicWidth * 1.39 Case "Symbols" From 1af63b129449d0b49c8bb4f986f293ad7feedce7 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 14:12:44 +0300 Subject: [PATCH 206/277] Added Sort Variables checkbox --- instat/dlgVisualizeData.Designer.vb | 17 ++++++++++++++--- instat/dlgVisualizeData.vb | 4 ++++ 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index bee99d8964d..c0d8182677a 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -33,11 +33,12 @@ Partial Class dlgVisualizeData Me.rdoWholeDataFrame = New System.Windows.Forms.RadioButton() Me.rdoSelectedColumn = New System.Windows.Forms.RadioButton() Me.ucrReceiverVisualizeData = New instat.ucrReceiverMultiple() + Me.UcrCheck1 = New instat.ucrCheck() Me.SuspendLayout() ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(10, 267) + Me.ucrBase.Location = New System.Drawing.Point(4, 359) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 10 @@ -55,7 +56,7 @@ Partial Class dlgVisualizeData ' 'ucrSaveGraph ' - Me.ucrSaveGraph.Location = New System.Drawing.Point(10, 238) + Me.ucrSaveGraph.Location = New System.Drawing.Point(4, 330) Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveGraph.Name = "ucrSaveGraph" Me.ucrSaveGraph.Size = New System.Drawing.Size(264, 24) @@ -157,11 +158,20 @@ Partial Class dlgVisualizeData Me.ucrReceiverVisualizeData.TabIndex = 8 Me.ucrReceiverVisualizeData.ucrSelector = Nothing ' + 'UcrCheck1 + ' + Me.UcrCheck1.Checked = False + Me.UcrCheck1.Location = New System.Drawing.Point(10, 243) + Me.UcrCheck1.Name = "UcrCheck1" + Me.UcrCheck1.Size = New System.Drawing.Size(125, 20) + Me.UcrCheck1.TabIndex = 11 + ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(417, 324) + Me.ClientSize = New System.Drawing.Size(417, 415) + Me.Controls.Add(Me.UcrCheck1) Me.Controls.Add(Me.ucrReceiverVisualizeData) Me.Controls.Add(Me.rdoSelectedColumn) Me.Controls.Add(Me.rdoWholeDataFrame) @@ -195,4 +205,5 @@ Partial Class dlgVisualizeData Friend WithEvents rdoWholeDataFrame As RadioButton Friend WithEvents rdoSelectedColumn As RadioButton Friend WithEvents ucrReceiverVisualizeData As ucrReceiverMultiple + Friend WithEvents UcrCheck1 As ucrCheck End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index ca8b4a3e21b..f36f355b680 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -172,4 +172,8 @@ Public Class dlgVisualizeData Private Sub ucrControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSelectData.ControlValueChanged, ucrSelectorVisualizeData.ControlValueChanged, ucrReceiverVisualizeData.ControlValueChanged AddRemoveDataHideOptionsButtons() End Sub + + Private Sub rdoVisDat_CheckedChanged(sender As Object, e As EventArgs) Handles rdoVisDat.CheckedChanged + + End Sub End Class \ No newline at end of file From cfd6516ba606cad34934660ff6af0bf566201463 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 14:22:44 +0300 Subject: [PATCH 207/277] Added a combobox for palette options --- instat/dlgVisualizeData.Designer.vb | 43 +++++++++++++++++++++++------ instat/dlgVisualizeData.vb | 4 --- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index c0d8182677a..4297e6795a0 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -33,7 +33,9 @@ Partial Class dlgVisualizeData Me.rdoWholeDataFrame = New System.Windows.Forms.RadioButton() Me.rdoSelectedColumn = New System.Windows.Forms.RadioButton() Me.ucrReceiverVisualizeData = New instat.ucrReceiverMultiple() - Me.UcrCheck1 = New instat.ucrCheck() + Me.ucrChkSortValues = New instat.ucrCheck() + Me.ucrInputComboboxPalette = New instat.ucrInputComboBox() + Me.lblPalette = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'ucrBase @@ -158,20 +160,41 @@ Partial Class dlgVisualizeData Me.ucrReceiverVisualizeData.TabIndex = 8 Me.ucrReceiverVisualizeData.ucrSelector = Nothing ' - 'UcrCheck1 + 'ucrChkSortValues ' - Me.UcrCheck1.Checked = False - Me.UcrCheck1.Location = New System.Drawing.Point(10, 243) - Me.UcrCheck1.Name = "UcrCheck1" - Me.UcrCheck1.Size = New System.Drawing.Size(125, 20) - Me.UcrCheck1.TabIndex = 11 + Me.ucrChkSortValues.Checked = False + Me.ucrChkSortValues.Location = New System.Drawing.Point(10, 243) + Me.ucrChkSortValues.Name = "ucrChkSortValues" + Me.ucrChkSortValues.Size = New System.Drawing.Size(125, 20) + Me.ucrChkSortValues.TabIndex = 11 + ' + 'ucrInputComboboxPalette + ' + Me.ucrInputComboboxPalette.AddQuotesIfUnrecognised = True + Me.ucrInputComboboxPalette.GetSetSelectedIndex = -1 + Me.ucrInputComboboxPalette.IsReadOnly = False + Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(52, 273) + Me.ucrInputComboboxPalette.Name = "ucrInputComboboxPalette" + Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(103, 21) + Me.ucrInputComboboxPalette.TabIndex = 12 + ' + 'lblPalette + ' + Me.lblPalette.AutoSize = True + Me.lblPalette.Location = New System.Drawing.Point(4, 276) + Me.lblPalette.Name = "lblPalette" + Me.lblPalette.Size = New System.Drawing.Size(43, 13) + Me.lblPalette.TabIndex = 13 + Me.lblPalette.Text = "Palette:" ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(417, 415) - Me.Controls.Add(Me.UcrCheck1) + Me.Controls.Add(Me.lblPalette) + Me.Controls.Add(Me.ucrInputComboboxPalette) + Me.Controls.Add(Me.ucrChkSortValues) Me.Controls.Add(Me.ucrReceiverVisualizeData) Me.Controls.Add(Me.rdoSelectedColumn) Me.Controls.Add(Me.rdoWholeDataFrame) @@ -205,5 +228,7 @@ Partial Class dlgVisualizeData Friend WithEvents rdoWholeDataFrame As RadioButton Friend WithEvents rdoSelectedColumn As RadioButton Friend WithEvents ucrReceiverVisualizeData As ucrReceiverMultiple - Friend WithEvents UcrCheck1 As ucrCheck + Friend WithEvents ucrChkSortValues As ucrCheck + Friend WithEvents ucrInputComboboxPalette As ucrInputComboBox + Friend WithEvents lblPalette As Label End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index f36f355b680..ca8b4a3e21b 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -172,8 +172,4 @@ Public Class dlgVisualizeData Private Sub ucrControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSelectData.ControlValueChanged, ucrSelectorVisualizeData.ControlValueChanged, ucrReceiverVisualizeData.ControlValueChanged AddRemoveDataHideOptionsButtons() End Sub - - Private Sub rdoVisDat_CheckedChanged(sender As Object, e As EventArgs) Handles rdoVisDat.CheckedChanged - - End Sub End Class \ No newline at end of file From 09ccbbc8434154e28a386ca54c8223ca3efbbd79 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 15:31:30 +0300 Subject: [PATCH 208/277] Linking controls --- instat/dlgVisualizeData.Designer.vb | 72 ++++++++++++++++++++++++----- instat/dlgVisualizeData.vb | 5 ++ 2 files changed, 65 insertions(+), 12 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 4297e6795a0..9c2dea2c948 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -33,14 +33,20 @@ Partial Class dlgVisualizeData Me.rdoWholeDataFrame = New System.Windows.Forms.RadioButton() Me.rdoSelectedColumn = New System.Windows.Forms.RadioButton() Me.ucrReceiverVisualizeData = New instat.ucrReceiverMultiple() - Me.ucrChkSortValues = New instat.ucrCheck() + Me.ucrChkSortVariables = New instat.ucrCheck() Me.ucrInputComboboxPalette = New instat.ucrInputComboBox() Me.lblPalette = New System.Windows.Forms.Label() + Me.ucrNudMaximumSize = New System.Windows.Forms.NumericUpDown() + Me.lblMaximumSize = New System.Windows.Forms.Label() + Me.lblMillionDataPoints = New System.Windows.Forms.Label() + Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown() + CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(4, 359) + Me.ucrBase.Location = New System.Drawing.Point(4, 374) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 10 @@ -58,7 +64,7 @@ Partial Class dlgVisualizeData ' 'ucrSaveGraph ' - Me.ucrSaveGraph.Location = New System.Drawing.Point(4, 330) + Me.ucrSaveGraph.Location = New System.Drawing.Point(4, 346) Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveGraph.Name = "ucrSaveGraph" Me.ucrSaveGraph.Size = New System.Drawing.Size(264, 24) @@ -160,13 +166,13 @@ Partial Class dlgVisualizeData Me.ucrReceiverVisualizeData.TabIndex = 8 Me.ucrReceiverVisualizeData.ucrSelector = Nothing ' - 'ucrChkSortValues + 'ucrChkSortVariables ' - Me.ucrChkSortValues.Checked = False - Me.ucrChkSortValues.Location = New System.Drawing.Point(10, 243) - Me.ucrChkSortValues.Name = "ucrChkSortValues" - Me.ucrChkSortValues.Size = New System.Drawing.Size(125, 20) - Me.ucrChkSortValues.TabIndex = 11 + Me.ucrChkSortVariables.Checked = False + Me.ucrChkSortVariables.Location = New System.Drawing.Point(10, 243) + Me.ucrChkSortVariables.Name = "ucrChkSortVariables" + Me.ucrChkSortVariables.Size = New System.Drawing.Size(125, 20) + Me.ucrChkSortVariables.TabIndex = 11 ' 'ucrInputComboboxPalette ' @@ -187,14 +193,50 @@ Partial Class dlgVisualizeData Me.lblPalette.TabIndex = 13 Me.lblPalette.Text = "Palette:" ' + 'ucrNudMaximumSize + ' + Me.ucrNudMaximumSize.Location = New System.Drawing.Point(87, 300) + Me.ucrNudMaximumSize.Name = "ucrNudMaximumSize" + Me.ucrNudMaximumSize.Size = New System.Drawing.Size(58, 20) + Me.ucrNudMaximumSize.TabIndex = 14 + ' + 'lblMaximumSize + ' + Me.lblMaximumSize.AutoSize = True + Me.lblMaximumSize.Location = New System.Drawing.Point(4, 304) + Me.lblMaximumSize.Name = "lblMaximumSize" + Me.lblMaximumSize.Size = New System.Drawing.Size(77, 13) + Me.lblMaximumSize.TabIndex = 15 + Me.lblMaximumSize.Text = "Maximum Size:" + ' + 'lblMillionDataPoints + ' + Me.lblMillionDataPoints.AutoSize = True + Me.lblMillionDataPoints.Location = New System.Drawing.Point(71, 328) + Me.lblMillionDataPoints.Name = "lblMillionDataPoints" + Me.lblMillionDataPoints.Size = New System.Drawing.Size(97, 13) + Me.lblMillionDataPoints.TabIndex = 16 + Me.lblMillionDataPoints.Text = "Million Data Points:" + ' + 'NumericUpDown1 + ' + Me.NumericUpDown1.Location = New System.Drawing.Point(7, 323) + Me.NumericUpDown1.Name = "NumericUpDown1" + Me.NumericUpDown1.Size = New System.Drawing.Size(58, 20) + Me.NumericUpDown1.TabIndex = 17 + ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(417, 415) + Me.ClientSize = New System.Drawing.Size(417, 427) + Me.Controls.Add(Me.NumericUpDown1) + Me.Controls.Add(Me.lblMillionDataPoints) + Me.Controls.Add(Me.lblMaximumSize) + Me.Controls.Add(Me.ucrNudMaximumSize) Me.Controls.Add(Me.lblPalette) Me.Controls.Add(Me.ucrInputComboboxPalette) - Me.Controls.Add(Me.ucrChkSortValues) + Me.Controls.Add(Me.ucrChkSortVariables) Me.Controls.Add(Me.ucrReceiverVisualizeData) Me.Controls.Add(Me.rdoSelectedColumn) Me.Controls.Add(Me.rdoWholeDataFrame) @@ -212,6 +254,8 @@ Partial Class dlgVisualizeData Me.Name = "dlgVisualizeData" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Visualise Data" + CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -228,7 +272,11 @@ Partial Class dlgVisualizeData Friend WithEvents rdoWholeDataFrame As RadioButton Friend WithEvents rdoSelectedColumn As RadioButton Friend WithEvents ucrReceiverVisualizeData As ucrReceiverMultiple - Friend WithEvents ucrChkSortValues As ucrCheck + Friend WithEvents ucrChkSortVariables As ucrCheck Friend WithEvents ucrInputComboboxPalette As ucrInputComboBox Friend WithEvents lblPalette As Label + Friend WithEvents NumericUpDown1 As NumericUpDown + Friend WithEvents lblMillionDataPoints As Label + Friend WithEvents lblMaximumSize As Label + Friend WithEvents ucrNudMaximumSize As NumericUpDown End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index ca8b4a3e21b..2f7637a238e 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -50,12 +50,17 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisMiss, "vis_miss") ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisGuess, "vis_guess") + ucrPnlVisualizeData.AddToLinkedControls(({ucrChkSortVariables, ucrInputComboboxPalette, ucrNudMaximumSize}), {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(({ucrChkSortVariables, ucrNudMaximumSize}), {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) ucrPnlSelectData.AddRadioButton(rdoSelectedColumn) ucrPnlSelectData.AddParameterPresentCondition(rdoWholeDataFrame, "data") ucrPnlSelectData.AddParameterPresentCondition(rdoSelectedColumn, "x") + ucrChkSortVariables.SetText("Sort Variables:") + ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() ucrReceiverVisualizeData.Selector = ucrSelectorVisualizeData From 9c9133f06f680c8788cd4b1084c547ecbc03f2be Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 16:13:10 +0300 Subject: [PATCH 209/277] Linking controls --- instat/dlgVisualizeData.Designer.vb | 160 ++++++++++++++-------------- instat/dlgVisualizeData.vb | 5 +- 2 files changed, 84 insertions(+), 81 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 9c2dea2c948..75da6e8fb1f 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -22,61 +22,28 @@ Partial Class dlgVisualizeData 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.ucrBase = New instat.ucrButtons() - Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() - Me.ucrSaveGraph = New instat.ucrSave() - Me.ucrPnlVisualizeData = New instat.UcrPanel() Me.rdoVisDat = New System.Windows.Forms.RadioButton() Me.rdoVisMiss = New System.Windows.Forms.RadioButton() Me.rdoVisGuess = New System.Windows.Forms.RadioButton() - Me.ucrPnlSelectData = New instat.UcrPanel() Me.rdoWholeDataFrame = New System.Windows.Forms.RadioButton() Me.rdoSelectedColumn = New System.Windows.Forms.RadioButton() - Me.ucrReceiverVisualizeData = New instat.ucrReceiverMultiple() - Me.ucrChkSortVariables = New instat.ucrCheck() - Me.ucrInputComboboxPalette = New instat.ucrInputComboBox() Me.lblPalette = New System.Windows.Forms.Label() Me.ucrNudMaximumSize = New System.Windows.Forms.NumericUpDown() Me.lblMaximumSize = New System.Windows.Forms.Label() Me.lblMillionDataPoints = New System.Windows.Forms.Label() Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown() + Me.ucrInputComboboxPalette = New instat.ucrInputComboBox() + Me.ucrReceiverVisualizeData = New instat.ucrReceiverMultiple() + Me.ucrPnlSelectData = New instat.UcrPanel() + Me.ucrPnlVisualizeData = New instat.UcrPanel() + Me.ucrSaveGraph = New instat.ucrSave() + Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() + Me.ucrBase = New instat.ucrButtons() + Me.ucrChkSortVariables = New instat.ucrCheck() CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' - 'ucrBase - ' - Me.ucrBase.Location = New System.Drawing.Point(4, 374) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(410, 52) - Me.ucrBase.TabIndex = 10 - ' - 'ucrSelectorVisualizeData - ' - Me.ucrSelectorVisualizeData.bDropUnusedFilterLevels = False - Me.ucrSelectorVisualizeData.bShowHiddenColumns = False - Me.ucrSelectorVisualizeData.bUseCurrentFilter = True - Me.ucrSelectorVisualizeData.Location = New System.Drawing.Point(10, 50) - Me.ucrSelectorVisualizeData.Margin = New System.Windows.Forms.Padding(0) - Me.ucrSelectorVisualizeData.Name = "ucrSelectorVisualizeData" - Me.ucrSelectorVisualizeData.Size = New System.Drawing.Size(210, 180) - Me.ucrSelectorVisualizeData.TabIndex = 4 - ' - 'ucrSaveGraph - ' - Me.ucrSaveGraph.Location = New System.Drawing.Point(4, 346) - Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) - Me.ucrSaveGraph.Name = "ucrSaveGraph" - Me.ucrSaveGraph.Size = New System.Drawing.Size(264, 24) - Me.ucrSaveGraph.TabIndex = 9 - ' - 'ucrPnlVisualizeData - ' - Me.ucrPnlVisualizeData.Location = New System.Drawing.Point(44, 1) - Me.ucrPnlVisualizeData.Name = "ucrPnlVisualizeData" - Me.ucrPnlVisualizeData.Size = New System.Drawing.Size(324, 46) - Me.ucrPnlVisualizeData.TabIndex = 0 - ' 'rdoVisDat ' Me.rdoVisDat.Appearance = System.Windows.Forms.Appearance.Button @@ -125,13 +92,6 @@ Partial Class dlgVisualizeData Me.rdoVisGuess.TextAlign = System.Drawing.ContentAlignment.MiddleCenter Me.rdoVisGuess.UseVisualStyleBackColor = True ' - 'ucrPnlSelectData - ' - Me.ucrPnlSelectData.Location = New System.Drawing.Point(235, 80) - Me.ucrPnlSelectData.Name = "ucrPnlSelectData" - Me.ucrPnlSelectData.Size = New System.Drawing.Size(133, 40) - Me.ucrPnlSelectData.TabIndex = 5 - ' 'rdoWholeDataFrame ' Me.rdoWholeDataFrame.AutoSize = True @@ -154,36 +114,6 @@ Partial Class dlgVisualizeData Me.rdoSelectedColumn.Text = "Selected Variables" Me.rdoSelectedColumn.UseVisualStyleBackColor = True ' - 'ucrReceiverVisualizeData - ' - Me.ucrReceiverVisualizeData.frmParent = Me - Me.ucrReceiverVisualizeData.Location = New System.Drawing.Point(243, 130) - Me.ucrReceiverVisualizeData.Margin = New System.Windows.Forms.Padding(0) - Me.ucrReceiverVisualizeData.Name = "ucrReceiverVisualizeData" - Me.ucrReceiverVisualizeData.Selector = Nothing - Me.ucrReceiverVisualizeData.Size = New System.Drawing.Size(120, 100) - Me.ucrReceiverVisualizeData.strNcFilePath = "" - Me.ucrReceiverVisualizeData.TabIndex = 8 - Me.ucrReceiverVisualizeData.ucrSelector = Nothing - ' - 'ucrChkSortVariables - ' - Me.ucrChkSortVariables.Checked = False - Me.ucrChkSortVariables.Location = New System.Drawing.Point(10, 243) - Me.ucrChkSortVariables.Name = "ucrChkSortVariables" - Me.ucrChkSortVariables.Size = New System.Drawing.Size(125, 20) - Me.ucrChkSortVariables.TabIndex = 11 - ' - 'ucrInputComboboxPalette - ' - Me.ucrInputComboboxPalette.AddQuotesIfUnrecognised = True - Me.ucrInputComboboxPalette.GetSetSelectedIndex = -1 - Me.ucrInputComboboxPalette.IsReadOnly = False - Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(52, 273) - Me.ucrInputComboboxPalette.Name = "ucrInputComboboxPalette" - Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(103, 21) - Me.ucrInputComboboxPalette.TabIndex = 12 - ' 'lblPalette ' Me.lblPalette.AutoSize = True @@ -225,18 +155,88 @@ Partial Class dlgVisualizeData Me.NumericUpDown1.Size = New System.Drawing.Size(58, 20) Me.NumericUpDown1.TabIndex = 17 ' + 'ucrInputComboboxPalette + ' + Me.ucrInputComboboxPalette.AddQuotesIfUnrecognised = True + Me.ucrInputComboboxPalette.GetSetSelectedIndex = -1 + Me.ucrInputComboboxPalette.IsReadOnly = False + Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(52, 273) + Me.ucrInputComboboxPalette.Name = "ucrInputComboboxPalette" + Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(103, 21) + Me.ucrInputComboboxPalette.TabIndex = 12 + ' + 'ucrReceiverVisualizeData + ' + Me.ucrReceiverVisualizeData.frmParent = Me + Me.ucrReceiverVisualizeData.Location = New System.Drawing.Point(243, 130) + Me.ucrReceiverVisualizeData.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverVisualizeData.Name = "ucrReceiverVisualizeData" + Me.ucrReceiverVisualizeData.Selector = Nothing + Me.ucrReceiverVisualizeData.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverVisualizeData.strNcFilePath = "" + Me.ucrReceiverVisualizeData.TabIndex = 8 + Me.ucrReceiverVisualizeData.ucrSelector = Nothing + ' + 'ucrPnlSelectData + ' + Me.ucrPnlSelectData.Location = New System.Drawing.Point(235, 80) + Me.ucrPnlSelectData.Name = "ucrPnlSelectData" + Me.ucrPnlSelectData.Size = New System.Drawing.Size(133, 40) + Me.ucrPnlSelectData.TabIndex = 5 + ' + 'ucrPnlVisualizeData + ' + Me.ucrPnlVisualizeData.Location = New System.Drawing.Point(44, 1) + Me.ucrPnlVisualizeData.Name = "ucrPnlVisualizeData" + Me.ucrPnlVisualizeData.Size = New System.Drawing.Size(324, 46) + Me.ucrPnlVisualizeData.TabIndex = 0 + ' + 'ucrSaveGraph + ' + Me.ucrSaveGraph.Location = New System.Drawing.Point(4, 346) + Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) + Me.ucrSaveGraph.Name = "ucrSaveGraph" + Me.ucrSaveGraph.Size = New System.Drawing.Size(264, 24) + Me.ucrSaveGraph.TabIndex = 9 + ' + 'ucrSelectorVisualizeData + ' + Me.ucrSelectorVisualizeData.bDropUnusedFilterLevels = False + Me.ucrSelectorVisualizeData.bShowHiddenColumns = False + Me.ucrSelectorVisualizeData.bUseCurrentFilter = True + Me.ucrSelectorVisualizeData.Location = New System.Drawing.Point(10, 50) + Me.ucrSelectorVisualizeData.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorVisualizeData.Name = "ucrSelectorVisualizeData" + Me.ucrSelectorVisualizeData.Size = New System.Drawing.Size(210, 180) + Me.ucrSelectorVisualizeData.TabIndex = 4 + ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(4, 374) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 10 + ' + 'ucrChkSortVariables + ' + Me.ucrChkSortVariables.Checked = False + Me.ucrChkSortVariables.Location = New System.Drawing.Point(10, 247) + Me.ucrChkSortVariables.Name = "ucrChkSortVariables" + Me.ucrChkSortVariables.Size = New System.Drawing.Size(100, 20) + Me.ucrChkSortVariables.TabIndex = 18 + ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(417, 427) + Me.Controls.Add(Me.ucrChkSortVariables) Me.Controls.Add(Me.NumericUpDown1) Me.Controls.Add(Me.lblMillionDataPoints) Me.Controls.Add(Me.lblMaximumSize) Me.Controls.Add(Me.ucrNudMaximumSize) Me.Controls.Add(Me.lblPalette) Me.Controls.Add(Me.ucrInputComboboxPalette) - Me.Controls.Add(Me.ucrChkSortVariables) Me.Controls.Add(Me.ucrReceiverVisualizeData) Me.Controls.Add(Me.rdoSelectedColumn) Me.Controls.Add(Me.rdoWholeDataFrame) @@ -272,11 +272,11 @@ Partial Class dlgVisualizeData Friend WithEvents rdoWholeDataFrame As RadioButton Friend WithEvents rdoSelectedColumn As RadioButton Friend WithEvents ucrReceiverVisualizeData As ucrReceiverMultiple - Friend WithEvents ucrChkSortVariables As ucrCheck Friend WithEvents ucrInputComboboxPalette As ucrInputComboBox Friend WithEvents lblPalette As Label Friend WithEvents NumericUpDown1 As NumericUpDown Friend WithEvents lblMillionDataPoints As Label Friend WithEvents lblMaximumSize As Label Friend WithEvents ucrNudMaximumSize As NumericUpDown + Friend WithEvents ucrChkSortVariables As ucrCheck End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 2f7637a238e..e91e03c8dfc 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -50,8 +50,9 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisMiss, "vis_miss") ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisGuess, "vis_guess") - ucrPnlVisualizeData.AddToLinkedControls(({ucrChkSortVariables, ucrInputComboboxPalette, ucrNudMaximumSize}), {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + 'ucrPnlVisualizeData.AddToLinkedControls(({ucrChkSortVariables, ucrInputComboboxPalette, ucrNudMaximumSize}), {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(({ucrChkSortVariables, ucrNudMaximumSize}), {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(({ucrInputComboboxPalette, ucrNudMaximumSize}), {rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) ucrPnlSelectData.AddRadioButton(rdoSelectedColumn) @@ -67,6 +68,8 @@ Public Class dlgVisualizeData ucrReceiverVisualizeData.bForceAsDataFrame = True ucrReceiverVisualizeData.SetMeAsReceiver() + ucrInputComboboxPalette.SetLinkedDisplayControl(lblPalette) + ucrPnlSelectData.AddToLinkedControls(ucrReceiverVisualizeData, {rdoSelectedColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrSaveGraph.SetIsComboBox() From 2e63850276980732a2b816e0e26b2c717a4ca478 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 16:14:28 +0300 Subject: [PATCH 210/277] Linking controls --- instat/dlgVisualizeData.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index e91e03c8dfc..4719a5898eb 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -50,8 +50,8 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisMiss, "vis_miss") ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisGuess, "vis_guess") - 'ucrPnlVisualizeData.AddToLinkedControls(({ucrChkSortVariables, ucrInputComboboxPalette, ucrNudMaximumSize}), {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(({ucrChkSortVariables, ucrNudMaximumSize}), {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, ucrInputComboboxPalette, ucrNudMaximumSize, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, ucrNudMaximumSize, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(({ucrInputComboboxPalette, ucrNudMaximumSize}), {rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) From 6af30ecfe7c67b0e89a837aa847d1b9af5d80290 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 17:31:21 +0300 Subject: [PATCH 211/277] Implementing the sort checkbox control --- instat/dlgVisualizeData.Designer.vb | 51 ++++++++++++++--------------- instat/dlgVisualizeData.vb | 13 +++++--- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 75da6e8fb1f..c2fa408c1c1 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -31,7 +31,7 @@ Partial Class dlgVisualizeData Me.ucrNudMaximumSize = New System.Windows.Forms.NumericUpDown() Me.lblMaximumSize = New System.Windows.Forms.Label() Me.lblMillionDataPoints = New System.Windows.Forms.Label() - Me.NumericUpDown1 = New System.Windows.Forms.NumericUpDown() + Me.ucrChkSortVariables = New instat.ucrCheck() Me.ucrInputComboboxPalette = New instat.ucrInputComboBox() Me.ucrReceiverVisualizeData = New instat.ucrReceiverMultiple() Me.ucrPnlSelectData = New instat.UcrPanel() @@ -39,9 +39,8 @@ Partial Class dlgVisualizeData Me.ucrSaveGraph = New instat.ucrSave() Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrChkSortVariables = New instat.ucrCheck() + Me.ucrChkSortMiss = New instat.ucrCheck() CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' 'rdoVisDat @@ -125,7 +124,7 @@ Partial Class dlgVisualizeData ' 'ucrNudMaximumSize ' - Me.ucrNudMaximumSize.Location = New System.Drawing.Point(87, 300) + Me.ucrNudMaximumSize.Location = New System.Drawing.Point(86, 301) Me.ucrNudMaximumSize.Name = "ucrNudMaximumSize" Me.ucrNudMaximumSize.Size = New System.Drawing.Size(58, 20) Me.ucrNudMaximumSize.TabIndex = 14 @@ -142,27 +141,28 @@ Partial Class dlgVisualizeData 'lblMillionDataPoints ' Me.lblMillionDataPoints.AutoSize = True - Me.lblMillionDataPoints.Location = New System.Drawing.Point(71, 328) + Me.lblMillionDataPoints.Location = New System.Drawing.Point(148, 304) Me.lblMillionDataPoints.Name = "lblMillionDataPoints" - Me.lblMillionDataPoints.Size = New System.Drawing.Size(97, 13) + Me.lblMillionDataPoints.Size = New System.Drawing.Size(94, 13) Me.lblMillionDataPoints.TabIndex = 16 - Me.lblMillionDataPoints.Text = "Million Data Points:" + Me.lblMillionDataPoints.Text = "Million Data Points" ' - 'NumericUpDown1 + 'ucrChkSortVariables ' - Me.NumericUpDown1.Location = New System.Drawing.Point(7, 323) - Me.NumericUpDown1.Name = "NumericUpDown1" - Me.NumericUpDown1.Size = New System.Drawing.Size(58, 20) - Me.NumericUpDown1.TabIndex = 17 + Me.ucrChkSortVariables.Checked = False + Me.ucrChkSortVariables.Location = New System.Drawing.Point(10, 247) + Me.ucrChkSortVariables.Name = "ucrChkSortVariables" + Me.ucrChkSortVariables.Size = New System.Drawing.Size(145, 20) + Me.ucrChkSortVariables.TabIndex = 18 ' 'ucrInputComboboxPalette ' Me.ucrInputComboboxPalette.AddQuotesIfUnrecognised = True Me.ucrInputComboboxPalette.GetSetSelectedIndex = -1 Me.ucrInputComboboxPalette.IsReadOnly = False - Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(52, 273) + Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(51, 272) Me.ucrInputComboboxPalette.Name = "ucrInputComboboxPalette" - Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(103, 21) + Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(72, 21) Me.ucrInputComboboxPalette.TabIndex = 12 ' 'ucrReceiverVisualizeData @@ -193,7 +193,7 @@ Partial Class dlgVisualizeData ' 'ucrSaveGraph ' - Me.ucrSaveGraph.Location = New System.Drawing.Point(4, 346) + Me.ucrSaveGraph.Location = New System.Drawing.Point(4, 330) Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveGraph.Name = "ucrSaveGraph" Me.ucrSaveGraph.Size = New System.Drawing.Size(264, 24) @@ -212,26 +212,26 @@ Partial Class dlgVisualizeData ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(4, 374) + Me.ucrBase.Location = New System.Drawing.Point(4, 358) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 10 ' - 'ucrChkSortVariables + 'ucrChkSortMiss ' - Me.ucrChkSortVariables.Checked = False - Me.ucrChkSortVariables.Location = New System.Drawing.Point(10, 247) - Me.ucrChkSortVariables.Name = "ucrChkSortVariables" - Me.ucrChkSortVariables.Size = New System.Drawing.Size(100, 20) - Me.ucrChkSortVariables.TabIndex = 18 + Me.ucrChkSortMiss.Checked = False + Me.ucrChkSortMiss.Location = New System.Drawing.Point(10, 247) + Me.ucrChkSortMiss.Name = "ucrChkSortMiss" + Me.ucrChkSortMiss.Size = New System.Drawing.Size(145, 20) + Me.ucrChkSortMiss.TabIndex = 19 ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(417, 427) + Me.ClientSize = New System.Drawing.Size(417, 413) + Me.Controls.Add(Me.ucrChkSortMiss) Me.Controls.Add(Me.ucrChkSortVariables) - Me.Controls.Add(Me.NumericUpDown1) Me.Controls.Add(Me.lblMillionDataPoints) Me.Controls.Add(Me.lblMaximumSize) Me.Controls.Add(Me.ucrNudMaximumSize) @@ -255,7 +255,6 @@ Partial Class dlgVisualizeData Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Visualise Data" CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.NumericUpDown1, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -274,9 +273,9 @@ Partial Class dlgVisualizeData Friend WithEvents ucrReceiverVisualizeData As ucrReceiverMultiple Friend WithEvents ucrInputComboboxPalette As ucrInputComboBox Friend WithEvents lblPalette As Label - Friend WithEvents NumericUpDown1 As NumericUpDown Friend WithEvents lblMillionDataPoints As Label Friend WithEvents lblMaximumSize As Label Friend WithEvents ucrNudMaximumSize As NumericUpDown Friend WithEvents ucrChkSortVariables As ucrCheck + Friend WithEvents ucrChkSortMiss As ucrCheck End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 4719a5898eb..75f4510e667 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -50,9 +50,9 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisMiss, "vis_miss") ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisGuess, "vis_guess") - ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, ucrInputComboboxPalette, ucrNudMaximumSize, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, ucrNudMaximumSize, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(({ucrInputComboboxPalette, ucrNudMaximumSize}), {rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat, rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortMiss, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) ucrPnlSelectData.AddRadioButton(rdoSelectedColumn) @@ -60,7 +60,10 @@ Public Class dlgVisualizeData ucrPnlSelectData.AddParameterPresentCondition(rdoWholeDataFrame, "data") ucrPnlSelectData.AddParameterPresentCondition(rdoSelectedColumn, "x") + ucrChkSortVariables.SetParameter(New RParameter("sort_type", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=False) ucrChkSortVariables.SetText("Sort Variables:") + ucrChkSortVariables.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() @@ -92,7 +95,7 @@ Public Class dlgVisualizeData clsVisDatFunction.SetPackageName("visdat") clsVisDatFunction.SetRCommand("vis_dat") clsVisDatFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorVisualizeData.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) - clsVisDatFunction.AddParameter("sort_type", "TRUE", iPosition:=1) + clsVisDatFunction.AddParameter("sort_type", "FALSE", iPosition:=1) clsVisDatFunction.AddParameter("palette", Chr(34) & "default" & Chr(34), iPosition:=2) clsVisDatFunction.AddParameter("warn_large_data", "TRUE", iPosition:=3) clsVisDatFunction.AddParameter("large_data_size", 900000, iPosition:=4) @@ -119,6 +122,7 @@ Public Class dlgVisualizeData Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("x", 0), 1) ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisGuessFunction, New RParameter("x", 0), 2) + ucrChkSortVariables.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("sort_miss", 2), 1) ucrSaveGraph.AddAdditionalRCode(clsVisMissFunction, iAdditionalPairNo:=1) ucrSaveGraph.AddAdditionalRCode(clsVisGuessFunction, iAdditionalPairNo:=2) @@ -126,6 +130,7 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.SetRCode(clsCurrBaseFunction, bReset) ucrReceiverVisualizeData.SetRCode(clsVisDatFunction, bReset) ucrSaveGraph.SetRCode(clsVisDatFunction, bReset) + ucrChkSortVariables.SetRCode(clsVisDatFunction, bReset) End Sub Private Sub TestOkEnabled() From 2dd8e3bdbbcf9a0baca1002bf69c49980184b4ba Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 19:31:18 +0300 Subject: [PATCH 212/277] Adding the functionality of the checkbox --- instat/dlgVisualizeData.Designer.vb | 13 +++++++++++++ instat/dlgVisualizeData.vb | 3 ++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index c2fa408c1c1..54b7ccaeaf2 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -40,6 +40,7 @@ Partial Class dlgVisualizeData Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.ucrChkSortMiss = New instat.ucrCheck() + Me.ucrInputComboboxPaletteGuess = New instat.ucrInputComboBox() CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' @@ -225,11 +226,22 @@ Partial Class dlgVisualizeData Me.ucrChkSortMiss.Size = New System.Drawing.Size(145, 20) Me.ucrChkSortMiss.TabIndex = 19 ' + 'ucrInputComboboxPaletteGuess + ' + Me.ucrInputComboboxPaletteGuess.AddQuotesIfUnrecognised = True + Me.ucrInputComboboxPaletteGuess.GetSetSelectedIndex = -1 + Me.ucrInputComboboxPaletteGuess.IsReadOnly = False + Me.ucrInputComboboxPaletteGuess.Location = New System.Drawing.Point(51, 272) + Me.ucrInputComboboxPaletteGuess.Name = "ucrInputComboboxPaletteGuess" + Me.ucrInputComboboxPaletteGuess.Size = New System.Drawing.Size(72, 21) + Me.ucrInputComboboxPaletteGuess.TabIndex = 20 + ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(417, 413) + Me.Controls.Add(Me.ucrInputComboboxPaletteGuess) Me.Controls.Add(Me.ucrChkSortMiss) Me.Controls.Add(Me.ucrChkSortVariables) Me.Controls.Add(Me.lblMillionDataPoints) @@ -278,4 +290,5 @@ Partial Class dlgVisualizeData Friend WithEvents ucrNudMaximumSize As NumericUpDown Friend WithEvents ucrChkSortVariables As ucrCheck Friend WithEvents ucrChkSortMiss As ucrCheck + Friend WithEvents ucrInputComboboxPaletteGuess As ucrInputComboBox End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 75f4510e667..63e190d886e 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -51,8 +51,9 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisGuess, "vis_guess") ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat, rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortMiss, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPaletteGuess, {rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) ucrPnlSelectData.AddRadioButton(rdoSelectedColumn) From c47b1439cadb393963689fe2bfb73ae218dfc69e Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 20:55:35 +0300 Subject: [PATCH 213/277] Added functionality for the checkbox control --- instat/dlgVisualizeData.Designer.vb | 48 ++++++++++++++++++----------- instat/dlgVisualizeData.vb | 8 ++++- 2 files changed, 37 insertions(+), 19 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 54b7ccaeaf2..befe76e94b5 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -31,6 +31,8 @@ Partial Class dlgVisualizeData Me.ucrNudMaximumSize = New System.Windows.Forms.NumericUpDown() Me.lblMaximumSize = New System.Windows.Forms.Label() Me.lblMillionDataPoints = New System.Windows.Forms.Label() + Me.ucrInputComboboxPaletteGuess = New instat.ucrInputComboBox() + Me.ucrChkSortMiss = New instat.ucrCheck() Me.ucrChkSortVariables = New instat.ucrCheck() Me.ucrInputComboboxPalette = New instat.ucrInputComboBox() Me.ucrReceiverVisualizeData = New instat.ucrReceiverMultiple() @@ -39,8 +41,7 @@ Partial Class dlgVisualizeData Me.ucrSaveGraph = New instat.ucrSave() Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrChkSortMiss = New instat.ucrCheck() - Me.ucrInputComboboxPaletteGuess = New instat.ucrInputComboBox() + Me.lblPaltte = New System.Windows.Forms.Label() CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' @@ -148,6 +149,24 @@ Partial Class dlgVisualizeData Me.lblMillionDataPoints.TabIndex = 16 Me.lblMillionDataPoints.Text = "Million Data Points" ' + 'ucrInputComboboxPaletteGuess + ' + Me.ucrInputComboboxPaletteGuess.AddQuotesIfUnrecognised = True + Me.ucrInputComboboxPaletteGuess.GetSetSelectedIndex = -1 + Me.ucrInputComboboxPaletteGuess.IsReadOnly = False + Me.ucrInputComboboxPaletteGuess.Location = New System.Drawing.Point(51, 272) + Me.ucrInputComboboxPaletteGuess.Name = "ucrInputComboboxPaletteGuess" + Me.ucrInputComboboxPaletteGuess.Size = New System.Drawing.Size(72, 21) + Me.ucrInputComboboxPaletteGuess.TabIndex = 20 + ' + 'ucrChkSortMiss + ' + Me.ucrChkSortMiss.Checked = False + Me.ucrChkSortMiss.Location = New System.Drawing.Point(10, 247) + Me.ucrChkSortMiss.Name = "ucrChkSortMiss" + Me.ucrChkSortMiss.Size = New System.Drawing.Size(145, 20) + Me.ucrChkSortMiss.TabIndex = 19 + ' 'ucrChkSortVariables ' Me.ucrChkSortVariables.Checked = False @@ -218,29 +237,21 @@ Partial Class dlgVisualizeData Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 10 ' - 'ucrChkSortMiss - ' - Me.ucrChkSortMiss.Checked = False - Me.ucrChkSortMiss.Location = New System.Drawing.Point(10, 247) - Me.ucrChkSortMiss.Name = "ucrChkSortMiss" - Me.ucrChkSortMiss.Size = New System.Drawing.Size(145, 20) - Me.ucrChkSortMiss.TabIndex = 19 + 'lblPaltte ' - 'ucrInputComboboxPaletteGuess - ' - Me.ucrInputComboboxPaletteGuess.AddQuotesIfUnrecognised = True - Me.ucrInputComboboxPaletteGuess.GetSetSelectedIndex = -1 - Me.ucrInputComboboxPaletteGuess.IsReadOnly = False - Me.ucrInputComboboxPaletteGuess.Location = New System.Drawing.Point(51, 272) - Me.ucrInputComboboxPaletteGuess.Name = "ucrInputComboboxPaletteGuess" - Me.ucrInputComboboxPaletteGuess.Size = New System.Drawing.Size(72, 21) - Me.ucrInputComboboxPaletteGuess.TabIndex = 20 + Me.lblPaltte.AutoSize = True + Me.lblPaltte.Location = New System.Drawing.Point(4, 277) + Me.lblPaltte.Name = "lblPaltte" + Me.lblPaltte.Size = New System.Drawing.Size(43, 13) + Me.lblPaltte.TabIndex = 21 + Me.lblPaltte.Text = "Palette:" ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(417, 413) + Me.Controls.Add(Me.lblPaltte) Me.Controls.Add(Me.ucrInputComboboxPaletteGuess) Me.Controls.Add(Me.ucrChkSortMiss) Me.Controls.Add(Me.ucrChkSortVariables) @@ -291,4 +302,5 @@ Partial Class dlgVisualizeData Friend WithEvents ucrChkSortVariables As ucrCheck Friend WithEvents ucrChkSortMiss As ucrCheck Friend WithEvents ucrInputComboboxPaletteGuess As ucrInputComboBox + Friend WithEvents lblPaltte As Label End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 63e190d886e..8bd61159f1b 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -23,6 +23,7 @@ Public Class dlgVisualizeData Private clsVisMissFunction As New RFunction Private clsVisGuessFunction As New RFunction Private clsCurrBaseFunction As New RFunction + Private dctPalette As Dictionary(Of String, String) Private Sub dlgVisualizeData_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -65,6 +66,10 @@ Public Class dlgVisualizeData ucrChkSortVariables.SetText("Sort Variables:") ucrChkSortVariables.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkSortMiss.SetParameter(New RParameter("sort_miss", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=False) + ucrChkSortMiss.SetText("Sort Variables:") + ucrChkSortMiss.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() @@ -73,6 +78,7 @@ Public Class dlgVisualizeData ucrReceiverVisualizeData.SetMeAsReceiver() ucrInputComboboxPalette.SetLinkedDisplayControl(lblPalette) + ucrInputComboboxPaletteGuess.SetLinkedDisplayControl(lblPaltte) ucrPnlSelectData.AddToLinkedControls(ucrReceiverVisualizeData, {rdoSelectedColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -123,7 +129,6 @@ Public Class dlgVisualizeData Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("x", 0), 1) ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisGuessFunction, New RParameter("x", 0), 2) - ucrChkSortVariables.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("sort_miss", 2), 1) ucrSaveGraph.AddAdditionalRCode(clsVisMissFunction, iAdditionalPairNo:=1) ucrSaveGraph.AddAdditionalRCode(clsVisGuessFunction, iAdditionalPairNo:=2) @@ -132,6 +137,7 @@ Public Class dlgVisualizeData ucrReceiverVisualizeData.SetRCode(clsVisDatFunction, bReset) ucrSaveGraph.SetRCode(clsVisDatFunction, bReset) ucrChkSortVariables.SetRCode(clsVisDatFunction, bReset) + ucrChkSortMiss.SetRCode(clsVisMissFunction, bReset) End Sub Private Sub TestOkEnabled() From 41e0198ce9e00ae7cb7d171df265d194e07f2c12 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 21:11:47 +0300 Subject: [PATCH 214/277] Added a dictionary for the palette options --- instat/dlgVisualizeData.vb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 8bd61159f1b..6964a29e57c 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -70,6 +70,15 @@ Public Class dlgVisualizeData ucrChkSortMiss.SetText("Sort Variables:") ucrChkSortMiss.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrInputComboboxPalette.SetParameter(New RParameter("palette", 2)) + dctPalette.Add("default", Chr(34) & "default" & Chr(34)) + dctPalette.Add("qual", Chr(34) & "qual" & Chr(34)) + dctPalette.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) + + ucrInputComboboxPaletteGuess.SetParameter(New RParameter("palette", 1)) + dctPaletteGuess.Add("default", Chr(34) & "default" & Chr(34)) + dctPaletteGuess.Add("qual", Chr(34) & "qual" & Chr(34)) + dctPaletteGuess.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() From 3c8ae83df60132820f29f3305df07ede0e12aa25 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 21:49:16 +0300 Subject: [PATCH 215/277] Adding Palette items in the dictionary --- instat/dlgVisualizeData.vb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 6964a29e57c..5fe58f2e538 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -23,7 +23,8 @@ Public Class dlgVisualizeData Private clsVisMissFunction As New RFunction Private clsVisGuessFunction As New RFunction Private clsCurrBaseFunction As New RFunction - Private dctPalette As Dictionary(Of String, String) + Dim dctPalette As New Dictionary(Of String, String) + Dim dctPaletteGuess As New Dictionary(Of String, String) Private Sub dlgVisualizeData_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -74,11 +75,15 @@ Public Class dlgVisualizeData dctPalette.Add("default", Chr(34) & "default" & Chr(34)) dctPalette.Add("qual", Chr(34) & "qual" & Chr(34)) dctPalette.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) + ucrInputComboboxPalette.SetDropDownStyleAsNonEditable() + ucrInputComboboxPalette.SetItems(dctPalette) ucrInputComboboxPaletteGuess.SetParameter(New RParameter("palette", 1)) dctPaletteGuess.Add("default", Chr(34) & "default" & Chr(34)) dctPaletteGuess.Add("qual", Chr(34) & "qual" & Chr(34)) dctPaletteGuess.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) + ucrInputComboboxPaletteGuess.SetDropDownStyleAsNonEditable() + ucrInputComboboxPaletteGuess.SetItems(dctPaletteGuess) ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() @@ -147,6 +152,8 @@ Public Class dlgVisualizeData ucrSaveGraph.SetRCode(clsVisDatFunction, bReset) ucrChkSortVariables.SetRCode(clsVisDatFunction, bReset) ucrChkSortMiss.SetRCode(clsVisMissFunction, bReset) + ucrInputComboboxPalette.SetRCode(clsVisDatFunction, bReset) + ucrInputComboboxPaletteGuess.SetRCode(clsVisGuessFunction, bReset) End Sub Private Sub TestOkEnabled() From 0bfedcf4eee6a67a584c169979c87db514566ff8 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Wed, 14 Oct 2020 22:36:29 +0300 Subject: [PATCH 216/277] Code implementation for an updown --- instat/dlgVisualizeData.Designer.vb | 43 +++++++++++++++-------------- instat/dlgVisualizeData.vb | 10 +++++-- 2 files changed, 31 insertions(+), 22 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index befe76e94b5..67f8062412f 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -28,9 +28,9 @@ Partial Class dlgVisualizeData Me.rdoWholeDataFrame = New System.Windows.Forms.RadioButton() Me.rdoSelectedColumn = New System.Windows.Forms.RadioButton() Me.lblPalette = New System.Windows.Forms.Label() - Me.ucrNudMaximumSize = New System.Windows.Forms.NumericUpDown() Me.lblMaximumSize = New System.Windows.Forms.Label() Me.lblMillionDataPoints = New System.Windows.Forms.Label() + Me.lblPaltte = New System.Windows.Forms.Label() Me.ucrInputComboboxPaletteGuess = New instat.ucrInputComboBox() Me.ucrChkSortMiss = New instat.ucrCheck() Me.ucrChkSortVariables = New instat.ucrCheck() @@ -41,8 +41,7 @@ Partial Class dlgVisualizeData Me.ucrSaveGraph = New instat.ucrSave() Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.lblPaltte = New System.Windows.Forms.Label() - CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).BeginInit() + Me.ucrNudMaximumSize = New instat.ucrNud() Me.SuspendLayout() ' 'rdoVisDat @@ -124,13 +123,6 @@ Partial Class dlgVisualizeData Me.lblPalette.TabIndex = 13 Me.lblPalette.Text = "Palette:" ' - 'ucrNudMaximumSize - ' - Me.ucrNudMaximumSize.Location = New System.Drawing.Point(86, 301) - Me.ucrNudMaximumSize.Name = "ucrNudMaximumSize" - Me.ucrNudMaximumSize.Size = New System.Drawing.Size(58, 20) - Me.ucrNudMaximumSize.TabIndex = 14 - ' 'lblMaximumSize ' Me.lblMaximumSize.AutoSize = True @@ -149,6 +141,15 @@ Partial Class dlgVisualizeData Me.lblMillionDataPoints.TabIndex = 16 Me.lblMillionDataPoints.Text = "Million Data Points" ' + 'lblPaltte + ' + Me.lblPaltte.AutoSize = True + Me.lblPaltte.Location = New System.Drawing.Point(4, 277) + Me.lblPaltte.Name = "lblPaltte" + Me.lblPaltte.Size = New System.Drawing.Size(43, 13) + Me.lblPaltte.TabIndex = 21 + Me.lblPaltte.Text = "Palette:" + ' 'ucrInputComboboxPaletteGuess ' Me.ucrInputComboboxPaletteGuess.AddQuotesIfUnrecognised = True @@ -237,27 +238,30 @@ Partial Class dlgVisualizeData Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 10 ' - 'lblPaltte + 'ucrNudMaximumSize ' - Me.lblPaltte.AutoSize = True - Me.lblPaltte.Location = New System.Drawing.Point(4, 277) - Me.lblPaltte.Name = "lblPaltte" - Me.lblPaltte.Size = New System.Drawing.Size(43, 13) - Me.lblPaltte.TabIndex = 21 - Me.lblPaltte.Text = "Palette:" + Me.ucrNudMaximumSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaximumSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMaximumSize.Location = New System.Drawing.Point(79, 302) + Me.ucrNudMaximumSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMaximumSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaximumSize.Name = "ucrNudMaximumSize" + Me.ucrNudMaximumSize.Size = New System.Drawing.Size(63, 20) + Me.ucrNudMaximumSize.TabIndex = 22 + Me.ucrNudMaximumSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(417, 413) + Me.Controls.Add(Me.ucrNudMaximumSize) Me.Controls.Add(Me.lblPaltte) Me.Controls.Add(Me.ucrInputComboboxPaletteGuess) Me.Controls.Add(Me.ucrChkSortMiss) Me.Controls.Add(Me.ucrChkSortVariables) Me.Controls.Add(Me.lblMillionDataPoints) Me.Controls.Add(Me.lblMaximumSize) - Me.Controls.Add(Me.ucrNudMaximumSize) Me.Controls.Add(Me.lblPalette) Me.Controls.Add(Me.ucrInputComboboxPalette) Me.Controls.Add(Me.ucrReceiverVisualizeData) @@ -277,7 +281,6 @@ Partial Class dlgVisualizeData Me.Name = "dlgVisualizeData" Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Text = "Visualise Data" - CType(Me.ucrNudMaximumSize, System.ComponentModel.ISupportInitialize).EndInit() Me.ResumeLayout(False) Me.PerformLayout() @@ -298,9 +301,9 @@ Partial Class dlgVisualizeData Friend WithEvents lblPalette As Label Friend WithEvents lblMillionDataPoints As Label Friend WithEvents lblMaximumSize As Label - Friend WithEvents ucrNudMaximumSize As NumericUpDown Friend WithEvents ucrChkSortVariables As ucrCheck Friend WithEvents ucrChkSortMiss As ucrCheck Friend WithEvents ucrInputComboboxPaletteGuess As ucrInputComboBox Friend WithEvents lblPaltte As Label + Friend WithEvents ucrNudMaximumSize As ucrNud End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 5fe58f2e538..eedf4097f5a 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -67,6 +67,7 @@ Public Class dlgVisualizeData ucrChkSortVariables.SetText("Sort Variables:") ucrChkSortVariables.SetValuesCheckedAndUnchecked("TRUE", "FALSE") + ucrChkSortMiss.SetParameter(New RParameter("sort_miss", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=False) ucrChkSortMiss.SetText("Sort Variables:") ucrChkSortMiss.SetValuesCheckedAndUnchecked("TRUE", "FALSE") @@ -85,14 +86,16 @@ Public Class dlgVisualizeData ucrInputComboboxPaletteGuess.SetDropDownStyleAsNonEditable() ucrInputComboboxPaletteGuess.SetItems(dctPaletteGuess) + ucrNudMaximumSize.SetParameter(New RParameter("large_data_size", 4)) + ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() ucrReceiverVisualizeData.Selector = ucrSelectorVisualizeData ucrReceiverVisualizeData.bForceAsDataFrame = True ucrReceiverVisualizeData.SetMeAsReceiver() - ucrInputComboboxPalette.SetLinkedDisplayControl(lblPalette) - ucrInputComboboxPaletteGuess.SetLinkedDisplayControl(lblPaltte) + ucrInputComboboxPalette.SetLinkedDisplayControl(lblPaltte) + ucrInputComboboxPaletteGuess.SetLinkedDisplayControl(lblPalette) ucrPnlSelectData.AddToLinkedControls(ucrReceiverVisualizeData, {rdoSelectedColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -143,6 +146,8 @@ Public Class dlgVisualizeData Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("x", 0), 1) ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisGuessFunction, New RParameter("x", 0), 2) + ucrNudMaximumSize.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("large_data_size", 5), iAdditionalPairNo:=1) + ucrNudMaximumSize.AddAdditionalCodeParameterPair(clsVisGuessFunction, New RParameter("large_data_size")) ucrSaveGraph.AddAdditionalRCode(clsVisMissFunction, iAdditionalPairNo:=1) ucrSaveGraph.AddAdditionalRCode(clsVisGuessFunction, iAdditionalPairNo:=2) @@ -154,6 +159,7 @@ Public Class dlgVisualizeData ucrChkSortMiss.SetRCode(clsVisMissFunction, bReset) ucrInputComboboxPalette.SetRCode(clsVisDatFunction, bReset) ucrInputComboboxPaletteGuess.SetRCode(clsVisGuessFunction, bReset) + ucrNudMaximumSize.SetRCode(clsVisDatFunction, bReset) End Sub Private Sub TestOkEnabled() From e1cee11e47c756bbfb04a2c39412c763e485c468 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 15 Oct 2020 09:37:13 +0300 Subject: [PATCH 217/277] Implementing large data size control(an updown) --- instat/dlgVisualizeData.Designer.vb | 63 +++++++++++++++++++++++------ instat/dlgVisualizeData.vb | 8 +++- 2 files changed, 58 insertions(+), 13 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 67f8062412f..7359eb19c76 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -31,6 +31,9 @@ Partial Class dlgVisualizeData Me.lblMaximumSize = New System.Windows.Forms.Label() Me.lblMillionDataPoints = New System.Windows.Forms.Label() Me.lblPaltte = New System.Windows.Forms.Label() + Me.lblMaximum = New System.Windows.Forms.Label() + Me.ucrNudMaximum = New instat.ucrNud() + Me.ucrNudMaximumSize = New instat.ucrNud() Me.ucrInputComboboxPaletteGuess = New instat.ucrInputComboBox() Me.ucrChkSortMiss = New instat.ucrCheck() Me.ucrChkSortVariables = New instat.ucrCheck() @@ -41,7 +44,7 @@ Partial Class dlgVisualizeData Me.ucrSaveGraph = New instat.ucrSave() Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrNudMaximumSize = New instat.ucrNud() + Me.lblDataPoints = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'rdoVisDat @@ -135,7 +138,7 @@ Partial Class dlgVisualizeData 'lblMillionDataPoints ' Me.lblMillionDataPoints.AutoSize = True - Me.lblMillionDataPoints.Location = New System.Drawing.Point(148, 304) + Me.lblMillionDataPoints.Location = New System.Drawing.Point(159, 304) Me.lblMillionDataPoints.Name = "lblMillionDataPoints" Me.lblMillionDataPoints.Size = New System.Drawing.Size(94, 13) Me.lblMillionDataPoints.TabIndex = 16 @@ -150,6 +153,39 @@ Partial Class dlgVisualizeData Me.lblPaltte.TabIndex = 21 Me.lblPaltte.Text = "Palette:" ' + 'lblMaximum + ' + Me.lblMaximum.AutoSize = True + Me.lblMaximum.Location = New System.Drawing.Point(5, 302) + Me.lblMaximum.Name = "lblMaximum" + Me.lblMaximum.Size = New System.Drawing.Size(77, 13) + Me.lblMaximum.TabIndex = 24 + Me.lblMaximum.Text = "Maximum Size:" + ' + 'ucrNudMaximum + ' + Me.ucrNudMaximum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaximum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMaximum.Location = New System.Drawing.Point(88, 302) + Me.ucrNudMaximum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMaximum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaximum.Name = "ucrNudMaximum" + Me.ucrNudMaximum.Size = New System.Drawing.Size(63, 20) + Me.ucrNudMaximum.TabIndex = 23 + Me.ucrNudMaximum.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'ucrNudMaximumSize + ' + Me.ucrNudMaximumSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaximumSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudMaximumSize.Location = New System.Drawing.Point(88, 302) + Me.ucrNudMaximumSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudMaximumSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudMaximumSize.Name = "ucrNudMaximumSize" + Me.ucrNudMaximumSize.Size = New System.Drawing.Size(63, 20) + Me.ucrNudMaximumSize.TabIndex = 22 + Me.ucrNudMaximumSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'ucrInputComboboxPaletteGuess ' Me.ucrInputComboboxPaletteGuess.AddQuotesIfUnrecognised = True @@ -238,23 +274,23 @@ Partial Class dlgVisualizeData Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 10 ' - 'ucrNudMaximumSize + 'lblDataPoints ' - Me.ucrNudMaximumSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaximumSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaximumSize.Location = New System.Drawing.Point(79, 302) - Me.ucrNudMaximumSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMaximumSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaximumSize.Name = "ucrNudMaximumSize" - Me.ucrNudMaximumSize.Size = New System.Drawing.Size(63, 20) - Me.ucrNudMaximumSize.TabIndex = 22 - Me.ucrNudMaximumSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.lblDataPoints.AutoSize = True + Me.lblDataPoints.Location = New System.Drawing.Point(159, 304) + Me.lblDataPoints.Name = "lblDataPoints" + Me.lblDataPoints.Size = New System.Drawing.Size(94, 13) + Me.lblDataPoints.TabIndex = 25 + Me.lblDataPoints.Text = "Million Data Points" ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(417, 413) + Me.Controls.Add(Me.lblDataPoints) + Me.Controls.Add(Me.lblMaximum) + Me.Controls.Add(Me.ucrNudMaximum) Me.Controls.Add(Me.ucrNudMaximumSize) Me.Controls.Add(Me.lblPaltte) Me.Controls.Add(Me.ucrInputComboboxPaletteGuess) @@ -306,4 +342,7 @@ Partial Class dlgVisualizeData Friend WithEvents ucrInputComboboxPaletteGuess As ucrInputComboBox Friend WithEvents lblPaltte As Label Friend WithEvents ucrNudMaximumSize As ucrNud + Friend WithEvents ucrNudMaximum As ucrNud + Friend WithEvents lblMaximum As Label + Friend WithEvents lblDataPoints As Label End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index eedf4097f5a..adaf3ca1997 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -56,7 +56,8 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortMiss, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPaletteGuess, {rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - + ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximumSize, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximum, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) ucrPnlSelectData.AddRadioButton(rdoSelectedColumn) @@ -88,6 +89,7 @@ Public Class dlgVisualizeData ucrNudMaximumSize.SetParameter(New RParameter("large_data_size", 4)) + ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() ucrReceiverVisualizeData.Selector = ucrSelectorVisualizeData @@ -96,6 +98,10 @@ Public Class dlgVisualizeData ucrInputComboboxPalette.SetLinkedDisplayControl(lblPaltte) ucrInputComboboxPaletteGuess.SetLinkedDisplayControl(lblPalette) + ucrNudMaximum.SetLinkedDisplayControl(lblMaximum) + ucrNudMaximumSize.SetLinkedDisplayControl(lblMaximumSize) + ucrNudMaximumSize.SetLinkedDisplayControl(lblMillionDataPoints) + ucrNudMaximum.SetLinkedDisplayControl(lblDataPoints) ucrPnlSelectData.AddToLinkedControls(ucrReceiverVisualizeData, {rdoSelectedColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) From 03fe45b6ca76a638c0b9efe7491feff8e5d52ab2 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 15 Oct 2020 13:03:30 +0300 Subject: [PATCH 218/277] Implementing large_data_size function from updown control --- instat/dlgVisualizeData.vb | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index adaf3ca1997..70e1c37ad6f 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -56,7 +56,7 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortMiss, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPaletteGuess, {rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximumSize, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximumSize, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.9) ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximum, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) ucrPnlSelectData.AddRadioButton(rdoSelectedColumn) @@ -87,7 +87,15 @@ Public Class dlgVisualizeData ucrInputComboboxPaletteGuess.SetDropDownStyleAsNonEditable() ucrInputComboboxPaletteGuess.SetItems(dctPaletteGuess) - ucrNudMaximumSize.SetParameter(New RParameter("large_data_size", 4)) + ucrNudMaximumSize.DecimalPlaces = 1 + ucrNudMaximumSize.Increment = 0.1 + ucrNudMaximumSize.SetMinMax(0.1, Integer.MaxValue) + + ucrNudMaximum.SetParameter(New RParameter("large_data_size", 5)) + ucrNudMaximum.DecimalPlaces = 1 + ucrNudMaximum.Increment = 0.1 + ucrNudMaximum.Minimum = 0.1 + ucrNudMaximum.SetRDefault(0.9) ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) @@ -116,10 +124,10 @@ Public Class dlgVisualizeData clsVisDatFunction = New RFunction clsVisMissFunction = New RFunction clsVisGuessFunction = New RFunction - ucrSelectorVisualizeData.Reset() ucrSaveGraph.Reset() + clsCurrBaseFunction = clsVisDatFunction clsVisDatFunction.SetPackageName("visdat") @@ -128,7 +136,6 @@ Public Class dlgVisualizeData clsVisDatFunction.AddParameter("sort_type", "FALSE", iPosition:=1) clsVisDatFunction.AddParameter("palette", Chr(34) & "default" & Chr(34), iPosition:=2) clsVisDatFunction.AddParameter("warn_large_data", "TRUE", iPosition:=3) - clsVisDatFunction.AddParameter("large_data_size", 900000, iPosition:=4) clsVisMissFunction.SetPackageName("visdat") clsVisMissFunction.SetRCommand("vis_miss") @@ -152,8 +159,6 @@ Public Class dlgVisualizeData Private Sub SetRCodeForControls(bReset As Boolean) ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("x", 0), 1) ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisGuessFunction, New RParameter("x", 0), 2) - ucrNudMaximumSize.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("large_data_size", 5), iAdditionalPairNo:=1) - ucrNudMaximumSize.AddAdditionalCodeParameterPair(clsVisGuessFunction, New RParameter("large_data_size")) ucrSaveGraph.AddAdditionalRCode(clsVisMissFunction, iAdditionalPairNo:=1) ucrSaveGraph.AddAdditionalRCode(clsVisGuessFunction, iAdditionalPairNo:=2) @@ -165,7 +170,6 @@ Public Class dlgVisualizeData ucrChkSortMiss.SetRCode(clsVisMissFunction, bReset) ucrInputComboboxPalette.SetRCode(clsVisDatFunction, bReset) ucrInputComboboxPaletteGuess.SetRCode(clsVisGuessFunction, bReset) - ucrNudMaximumSize.SetRCode(clsVisDatFunction, bReset) End Sub Private Sub TestOkEnabled() @@ -220,4 +224,11 @@ Public Class dlgVisualizeData Private Sub ucrControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSelectData.ControlValueChanged, ucrSelectorVisualizeData.ControlValueChanged, ucrReceiverVisualizeData.ControlValueChanged AddRemoveDataHideOptionsButtons() End Sub + + Private Sub ucrNudMaximumSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaximumSize.ControlValueChanged + Dim Value As Decimal = System.Convert.ToDecimal(ucrNudMaximumSize.GetText()) + Dim strLargeDataSizeParamVal As Integer = Value * 1000000 + + clsVisDatFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=4) + End Sub End Class \ No newline at end of file From 214bf12957f0773ccd9edbd0690d74d1fec49a37 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Thu, 15 Oct 2020 13:50:12 +0300 Subject: [PATCH 219/277] helpful information at start-up of R-Instat --- instat/clsRecentFiles.vb | 88 ++++++++- instat/frmMain.vb | 1 + instat/ucrDataView.Designer.vb | 349 +++++++++++++++++++++++++-------- instat/ucrDataView.vb | 57 +++++- 4 files changed, 404 insertions(+), 91 deletions(-) diff --git a/instat/clsRecentFiles.vb b/instat/clsRecentFiles.vb index 98122d17b11..ab231f6524e 100644 --- a/instat/clsRecentFiles.vb +++ b/instat/clsRecentFiles.vb @@ -24,7 +24,13 @@ Public Class clsRecentFiles Private sepStart As ToolStripSeparator Private sepEnd As ToolStripSeparator ' declare a variable to contain the most recent opened items - Private strListMRU As New List(Of String) + Private strListMRU As New List(Of String) + + ''' + ''' stores reference to the the data view window used in frmMain. + ''' will be used to add recent files menu items to to it. + ''' + Private ucrDataViewWindow As ucrDataView Public Sub setToolStripItems(dfMnuFile As ToolStripMenuItem, dfMnuFileIcon As ToolStripSplitButton, dfMnuToolStripDropdown As ToolStripDropDownItem, dfSepStart As ToolStripSeparator, dfSepEnd As ToolStripSeparator) mnuFile = dfMnuFile @@ -36,6 +42,10 @@ Public Class clsRecentFiles sepEnd.Visible = False End Sub + Public Sub SetDataViewWindow(ucrDataViewWindow As ucrDataView) + Me.ucrDataViewWindow = ucrDataViewWindow + End Sub + Public Sub checkOnLoad() 'Checks for the existence of the file on form load ' load recently opened files @@ -90,9 +100,9 @@ Public Class clsRecentFiles If strListMRU.Contains(path) Then strListMRU.Remove(path) ' add to MRU list.. strListMRU.Add(path) - ' make sure there are only ever 5 items... - 'To add this to the general options on the number of recently files to show - While strListMRU.Count > 5 + 'make sure there are only ever 30 items... + 'todo. add this to the general options on the number of recently files to show + While strListMRU.Count > 30 strListMRU.RemoveAt(0) End While End If @@ -137,7 +147,10 @@ Public Class clsRecentFiles mnuFileIcon.DropDownItems.Remove(clsMenu) Next - 'displays items (_in reverse order) for dialogs + 'removes all the data view window recent file menu items + ucrDataViewWindow.ClearRecentFileMenuItems() + + 'displays items (_in reverse order) for dialogs For icounter As Integer = mnuItems.Count - 1 To 0 Step -1 Dim dialog As Form = mnuItems(icounter) 'creates new toolstripitem, displaying name of the dialog @@ -171,6 +184,25 @@ Public Class clsRecentFiles ' insert into DropDownItems list... mnuFile.DropDownItems.Insert(mnuFile.DropDownItems.Count - 1, clsItem) mnuFileIcon.DropDownItems.Insert(mnuFileIcon.DropDownItems.Count, clsItemIcon) + + 'set and insert the data view window recent files menu items + Dim linkMenuItem As New LinkLabel + linkMenuItem.Text = strFileName + linkMenuItem.Tag = strPath 'path used when the link is clicked + + ucrDataViewWindow.InsertRecentFileMenuItems(linkMenuItem) + 'attach link click event handler for opening the file + AddHandler linkMenuItem.Click, AddressOf mnuFileMRU_Click + + 'if recent files are more than 5 then just the "more" link label and exit loop + If strListMRU.Count - iCounter >= 5 Then + linkMenuItem = New LinkLabel + linkMenuItem.Text = "More ..." + linkMenuItem.Tag = "" + ucrDataViewWindow.InsertRecentFileMenuItems(linkMenuItem) + AddHandler linkMenuItem.Click, AddressOf mnuFileMRU_Click + Exit For + End If Catch ex As Exception 'TODO it would be good to remove the invalid line from the file in this case End Try @@ -184,18 +216,29 @@ Public Class clsRecentFiles End Sub Private Sub mnuFileMRU_Click(ByVal sender As Object, ByVal e As EventArgs) - Dim iResult As Integer + Dim strFilePath As String = "" - If File.Exists(DirectCast(sender, ToolStripItem).Tag.ToString().Substring(4)) Then + If TypeOf sender Is ToolStripItem Then + strFilePath = DirectCast(sender, ToolStripItem).Tag.ToString().Substring(4) + ElseIf TypeOf sender Is LinkLabel Then + 'if tag is empty then its more link that was clicked + If String.IsNullOrEmpty(DirectCast(sender, LinkLabel).Tag.ToString()) Then + ShowAllRecentFiles() + Exit Sub + Else + strFilePath = DirectCast(sender, LinkLabel).Tag.ToString() + End If + End If + + If File.Exists(strFilePath) Then 'dlgImportDataset.SetFilePath(DirectCast(sender, ToolStripItem).Tag.ToString().Substring(4)) 'dlgImportDataset.SetDataName(Path.GetFileNameWithoutExtension(sender.ToString)) 'Not working as I would like because of the changes made to the Import Dataset - dlgImportDataset.strFileToOpenOn = DirectCast(sender, ToolStripItem).Tag.ToString().Substring(4) + dlgImportDataset.strFileToOpenOn = strFilePath dlgImportDataset.ShowDialog() Else - iResult = MessageBox.Show(frmMain, "File not accessible. It may have been renamed, moved or deleted." & Environment.NewLine & Environment.NewLine & "Would you like to remove this file from the list?", "Cannot access file", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) 'removes the path to the non existent file - If iResult = DialogResult.Yes Then + If DialogResult.Yes = MessageBox.Show(frmMain, "File not accessible. It may have been renamed, moved or deleted." & Environment.NewLine & Environment.NewLine & "Would you like to remove this file from the list?", "Cannot access file", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) Then strListMRU.RemoveAt(strListMRU.FindLastIndex(Function(value As String) Return value.Contains(sender.ToString) End Function)) @@ -212,5 +255,30 @@ Public Class clsRecentFiles Exit Sub End If Next + End Sub + + ''' + ''' shows all the recent files menu items in the data view window + ''' + Private Sub ShowAllRecentFiles() + 'clear all menu items previously added + ucrDataViewWindow.ClearRecentFileMenuItems() + 'displays items (_in reverse order) for recent files + Dim strPath As String + For iCounter As Integer = strListMRU.Count - 1 To 0 Step -1 + strPath = strListMRU(iCounter) + Try + Dim linkMenuItem As New LinkLabel + linkMenuItem.Text = Path.GetFileName(strPath) + linkMenuItem.Tag = strPath 'path used when the link is clicked + + ucrDataViewWindow.InsertRecentFileMenuItems(linkMenuItem) + + 'attach link event handler for opening the file + AddHandler linkMenuItem.Click, AddressOf mnuFileMRU_Click + Catch ex As Exception + 'TODO it would be good to remove the invalid line from the file in this case + End Try + Next End Sub End Class diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 056de3c66cb..c551a521471 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -122,6 +122,7 @@ Public Class frmMain 'Sets up the Recent items clsRecentItems.setToolStripItems(mnuFile, mnuTbOpen, mnuTbLast10Dialogs, sepStart, sepEnd) + clsRecentItems.SetDataViewWindow(ucrDataViewer) 'checks existence of MRU list clsRecentItems.checkOnLoad() Cursor = Cursors.Default diff --git a/instat/ucrDataView.Designer.vb b/instat/ucrDataView.Designer.vb index de381959e2e..843ab12344c 100644 --- a/instat/ucrDataView.Designer.vb +++ b/instat/ucrDataView.Designer.vb @@ -103,12 +103,26 @@ Partial Class ucrDataView Me.lblHeader = New System.Windows.Forms.Label() Me.tlpTableContainer = New System.Windows.Forms.TableLayoutPanel() Me.pnlDataContainer = New System.Windows.Forms.Panel() + Me.panelAllMenuItems = New System.Windows.Forms.Panel() + Me.linkNewsletter = New System.Windows.Forms.LinkLabel() + Me.linkGithub = New System.Windows.Forms.LinkLabel() + Me.linkProductDoc = New System.Windows.Forms.LinkLabel() + Me.linkHelpTipsTricks = New System.Windows.Forms.LinkLabel() + Me.linkHelpVideos = New System.Windows.Forms.LinkLabel() + Me.panelRecentMenuItems = New System.Windows.Forms.Panel() + Me.linkStartOpenLibrary = New System.Windows.Forms.LinkLabel() + Me.linkStartOpenFile = New System.Windows.Forms.LinkLabel() + Me.linkStartNewDataFrame = New System.Windows.Forms.LinkLabel() + Me.lblHelp = New System.Windows.Forms.Label() + Me.lblRecent = New System.Windows.Forms.Label() + Me.lblStart = New System.Windows.Forms.Label() Me.columnContextMenuStrip.SuspendLayout() Me.cellContextMenuStrip.SuspendLayout() Me.rowContextMenuStrip.SuspendLayout() Me.statusColumnMenu.SuspendLayout() Me.tlpTableContainer.SuspendLayout() Me.pnlDataContainer.SuspendLayout() + Me.panelAllMenuItems.SuspendLayout() Me.SuspendLayout() ' 'grdData @@ -119,16 +133,15 @@ Partial Class ucrDataView Me.grdData.Dock = System.Windows.Forms.DockStyle.Fill Me.grdData.LeadHeaderContextMenuStrip = Nothing Me.grdData.Location = New System.Drawing.Point(0, 0) - Me.grdData.Margin = New System.Windows.Forms.Padding(4) Me.grdData.Name = "grdData" Me.grdData.RowHeaderContextMenuStrip = Me.rowContextMenuStrip Me.grdData.Script = Nothing Me.grdData.SheetTabContextMenuStrip = Me.statusColumnMenu Me.grdData.SheetTabNewButtonVisible = False Me.grdData.SheetTabVisible = True - Me.grdData.SheetTabWidth = 205 + Me.grdData.SheetTabWidth = 154 Me.grdData.ShowScrollEndSpacing = True - Me.grdData.Size = New System.Drawing.Size(584, 292) + Me.grdData.Size = New System.Drawing.Size(438, 454) Me.grdData.TabIndex = 0 ' 'columnContextMenuStrip @@ -136,111 +149,111 @@ Partial Class ucrDataView Me.columnContextMenuStrip.ImageScalingSize = New System.Drawing.Size(20, 20) Me.columnContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuColumnRename, Me.mnuDuplicateColumn, Me.mnuReorderColumns, Me.mnuInsertColsBefore, Me.mnuInsertColsAfter, Me.mnuDeleteCol, Me.toolStripMenuItem2, Me.mnuConvertToFactor, Me.mnuCovertToOrderedFactors, Me.mnuConvertText, Me.mnuConvertToLogical, Me.mnuConvertVariate, Me.ToolStripSeparator1, Me.mnuLevelsLabels, Me.toolStripMenuItem21, Me.mnuSort, Me.mnuColumnFilter, Me.mnuClearColumnFilter}) Me.columnContextMenuStrip.Name = "columnContextMenuStrip" - Me.columnContextMenuStrip.Size = New System.Drawing.Size(251, 382) + Me.columnContextMenuStrip.Size = New System.Drawing.Size(213, 352) ' 'mnuColumnRename ' Me.mnuColumnRename.Name = "mnuColumnRename" - Me.mnuColumnRename.Size = New System.Drawing.Size(250, 24) + Me.mnuColumnRename.Size = New System.Drawing.Size(212, 22) Me.mnuColumnRename.Text = "Rename Column..." ' 'mnuDuplicateColumn ' Me.mnuDuplicateColumn.Name = "mnuDuplicateColumn" - Me.mnuDuplicateColumn.Size = New System.Drawing.Size(250, 24) + Me.mnuDuplicateColumn.Size = New System.Drawing.Size(212, 22) Me.mnuDuplicateColumn.Text = "Duplicate Column..." ' 'mnuReorderColumns ' Me.mnuReorderColumns.Name = "mnuReorderColumns" - Me.mnuReorderColumns.Size = New System.Drawing.Size(250, 24) + Me.mnuReorderColumns.Size = New System.Drawing.Size(212, 22) Me.mnuReorderColumns.Text = "Reorder Column(s)..." ' 'mnuInsertColsBefore ' Me.mnuInsertColsBefore.Name = "mnuInsertColsBefore" - Me.mnuInsertColsBefore.Size = New System.Drawing.Size(250, 24) + Me.mnuInsertColsBefore.Size = New System.Drawing.Size(212, 22) Me.mnuInsertColsBefore.Text = "Insert Column(s) Before" ' 'mnuInsertColsAfter ' Me.mnuInsertColsAfter.Name = "mnuInsertColsAfter" - Me.mnuInsertColsAfter.Size = New System.Drawing.Size(250, 24) + Me.mnuInsertColsAfter.Size = New System.Drawing.Size(212, 22) Me.mnuInsertColsAfter.Text = "Insert Column(s) After" ' 'mnuDeleteCol ' Me.mnuDeleteCol.Name = "mnuDeleteCol" - Me.mnuDeleteCol.Size = New System.Drawing.Size(250, 24) + Me.mnuDeleteCol.Size = New System.Drawing.Size(212, 22) Me.mnuDeleteCol.Text = "Delete Column(s)" ' 'toolStripMenuItem2 ' Me.toolStripMenuItem2.Name = "toolStripMenuItem2" - Me.toolStripMenuItem2.Size = New System.Drawing.Size(247, 6) + Me.toolStripMenuItem2.Size = New System.Drawing.Size(209, 6) ' 'mnuConvertToFactor ' Me.mnuConvertToFactor.Name = "mnuConvertToFactor" - Me.mnuConvertToFactor.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertToFactor.Size = New System.Drawing.Size(212, 22) Me.mnuConvertToFactor.Text = "Convert to Factor" ' 'mnuCovertToOrderedFactors ' Me.mnuCovertToOrderedFactors.Name = "mnuCovertToOrderedFactors" - Me.mnuCovertToOrderedFactors.Size = New System.Drawing.Size(250, 24) + Me.mnuCovertToOrderedFactors.Size = New System.Drawing.Size(212, 22) Me.mnuCovertToOrderedFactors.Text = "Convert to Ordered Factor" ' 'mnuConvertText ' Me.mnuConvertText.Name = "mnuConvertText" - Me.mnuConvertText.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertText.Size = New System.Drawing.Size(212, 22) Me.mnuConvertText.Text = "Convert to Character" ' 'mnuConvertToLogical ' Me.mnuConvertToLogical.Name = "mnuConvertToLogical" - Me.mnuConvertToLogical.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertToLogical.Size = New System.Drawing.Size(212, 22) Me.mnuConvertToLogical.Text = "Convert to Logical" ' 'mnuConvertVariate ' Me.mnuConvertVariate.Name = "mnuConvertVariate" - Me.mnuConvertVariate.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertVariate.Size = New System.Drawing.Size(212, 22) Me.mnuConvertVariate.Text = "Convert to Numeric" ' 'ToolStripSeparator1 ' Me.ToolStripSeparator1.Name = "ToolStripSeparator1" - Me.ToolStripSeparator1.Size = New System.Drawing.Size(247, 6) + Me.ToolStripSeparator1.Size = New System.Drawing.Size(209, 6) ' 'mnuLevelsLabels ' Me.mnuLevelsLabels.Name = "mnuLevelsLabels" - Me.mnuLevelsLabels.Size = New System.Drawing.Size(250, 24) + Me.mnuLevelsLabels.Size = New System.Drawing.Size(212, 22) Me.mnuLevelsLabels.Text = "Levels/Labels..." ' 'toolStripMenuItem21 ' Me.toolStripMenuItem21.Name = "toolStripMenuItem21" - Me.toolStripMenuItem21.Size = New System.Drawing.Size(247, 6) + Me.toolStripMenuItem21.Size = New System.Drawing.Size(209, 6) ' 'mnuSort ' Me.mnuSort.Name = "mnuSort" - Me.mnuSort.Size = New System.Drawing.Size(250, 24) + Me.mnuSort.Size = New System.Drawing.Size(212, 22) Me.mnuSort.Text = "Sort..." ' 'mnuColumnFilter ' Me.mnuColumnFilter.Name = "mnuColumnFilter" - Me.mnuColumnFilter.Size = New System.Drawing.Size(250, 24) + Me.mnuColumnFilter.Size = New System.Drawing.Size(212, 22) Me.mnuColumnFilter.Text = "Filter..." ' 'mnuClearColumnFilter ' Me.mnuClearColumnFilter.Name = "mnuClearColumnFilter" - Me.mnuClearColumnFilter.Size = New System.Drawing.Size(250, 24) + Me.mnuClearColumnFilter.Size = New System.Drawing.Size(212, 22) Me.mnuClearColumnFilter.Text = "Remove Current Filter" ' 'cellContextMenuStrip @@ -248,133 +261,133 @@ Partial Class ucrDataView Me.cellContextMenuStrip.ImageScalingSize = New System.Drawing.Size(20, 20) Me.cellContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuCell, Me.ToolStripSeparator3, Me.mnuRenameColumn, Me.mnuDuplColumn, Me.mnuReorderColumn, Me.ToolStripSeparator5, Me.mnuConvertToFact, Me.mnuConvertToOrderedFactor, Me.mnuConvertToCharacter, Me.mnuConvertToLogic, Me.mnuConvertToNumeric, Me.ToolStripSeparator6, Me.mnuLebelsLevel, Me.ToolStripSeparator7, Me.mnuSorts, Me.mnuFilters, Me.mnuRemoveCurrentFilters}) Me.cellContextMenuStrip.Name = "cellContextMenuStrip" - Me.cellContextMenuStrip.Size = New System.Drawing.Size(251, 368) + Me.cellContextMenuStrip.Size = New System.Drawing.Size(213, 314) ' 'mnuCell ' Me.mnuCell.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuCellCutRange, Me.mnuCellCopyRange, Me.mnuCellPasteRange, Me.mnuCellHelp}) Me.mnuCell.Name = "mnuCell" - Me.mnuCell.Size = New System.Drawing.Size(250, 24) + Me.mnuCell.Size = New System.Drawing.Size(212, 22) Me.mnuCell.Text = "Cell" ' 'mnuCellCutRange ' Me.mnuCellCutRange.Enabled = False Me.mnuCellCutRange.Name = "mnuCellCutRange" - Me.mnuCellCutRange.Size = New System.Drawing.Size(216, 26) + Me.mnuCellCutRange.Size = New System.Drawing.Size(102, 22) Me.mnuCellCutRange.Text = "Cut" Me.mnuCellCutRange.Visible = False ' 'mnuCellCopyRange ' Me.mnuCellCopyRange.Name = "mnuCellCopyRange" - Me.mnuCellCopyRange.Size = New System.Drawing.Size(216, 26) + Me.mnuCellCopyRange.Size = New System.Drawing.Size(102, 22) Me.mnuCellCopyRange.Text = "Copy" ' 'mnuCellPasteRange ' Me.mnuCellPasteRange.Enabled = False Me.mnuCellPasteRange.Name = "mnuCellPasteRange" - Me.mnuCellPasteRange.Size = New System.Drawing.Size(216, 26) + Me.mnuCellPasteRange.Size = New System.Drawing.Size(102, 22) Me.mnuCellPasteRange.Text = "Paste" Me.mnuCellPasteRange.Visible = False ' 'mnuCellHelp ' Me.mnuCellHelp.Name = "mnuCellHelp" - Me.mnuCellHelp.Size = New System.Drawing.Size(216, 26) + Me.mnuCellHelp.Size = New System.Drawing.Size(102, 22) Me.mnuCellHelp.Text = "Help" ' 'ToolStripSeparator3 ' Me.ToolStripSeparator3.Name = "ToolStripSeparator3" - Me.ToolStripSeparator3.Size = New System.Drawing.Size(247, 6) + Me.ToolStripSeparator3.Size = New System.Drawing.Size(209, 6) ' 'mnuRenameColumn ' Me.mnuRenameColumn.Name = "mnuRenameColumn" - Me.mnuRenameColumn.Size = New System.Drawing.Size(250, 24) + Me.mnuRenameColumn.Size = New System.Drawing.Size(212, 22) Me.mnuRenameColumn.Text = "Rename Column..." ' 'mnuDuplColumn ' Me.mnuDuplColumn.Name = "mnuDuplColumn" - Me.mnuDuplColumn.Size = New System.Drawing.Size(250, 24) + Me.mnuDuplColumn.Size = New System.Drawing.Size(212, 22) Me.mnuDuplColumn.Text = "Duplicate Column..." ' 'mnuReorderColumn ' Me.mnuReorderColumn.Name = "mnuReorderColumn" - Me.mnuReorderColumn.Size = New System.Drawing.Size(250, 24) + Me.mnuReorderColumn.Size = New System.Drawing.Size(212, 22) Me.mnuReorderColumn.Text = "Reorder Column(s)..." ' 'ToolStripSeparator5 ' Me.ToolStripSeparator5.Name = "ToolStripSeparator5" - Me.ToolStripSeparator5.Size = New System.Drawing.Size(247, 6) + Me.ToolStripSeparator5.Size = New System.Drawing.Size(209, 6) ' 'mnuConvertToFact ' Me.mnuConvertToFact.Name = "mnuConvertToFact" - Me.mnuConvertToFact.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertToFact.Size = New System.Drawing.Size(212, 22) Me.mnuConvertToFact.Text = "Convert to Factor" ' 'mnuConvertToOrderedFactor ' Me.mnuConvertToOrderedFactor.Name = "mnuConvertToOrderedFactor" - Me.mnuConvertToOrderedFactor.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertToOrderedFactor.Size = New System.Drawing.Size(212, 22) Me.mnuConvertToOrderedFactor.Text = "Convert to Ordered Factor" ' 'mnuConvertToCharacter ' Me.mnuConvertToCharacter.Name = "mnuConvertToCharacter" - Me.mnuConvertToCharacter.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertToCharacter.Size = New System.Drawing.Size(212, 22) Me.mnuConvertToCharacter.Text = "Convert to Character" ' 'mnuConvertToLogic ' Me.mnuConvertToLogic.Name = "mnuConvertToLogic" - Me.mnuConvertToLogic.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertToLogic.Size = New System.Drawing.Size(212, 22) Me.mnuConvertToLogic.Text = "Convert to Logical" ' 'mnuConvertToNumeric ' Me.mnuConvertToNumeric.Name = "mnuConvertToNumeric" - Me.mnuConvertToNumeric.Size = New System.Drawing.Size(250, 24) + Me.mnuConvertToNumeric.Size = New System.Drawing.Size(212, 22) Me.mnuConvertToNumeric.Text = "Convert to Numeric" ' 'ToolStripSeparator6 ' Me.ToolStripSeparator6.Name = "ToolStripSeparator6" - Me.ToolStripSeparator6.Size = New System.Drawing.Size(247, 6) + Me.ToolStripSeparator6.Size = New System.Drawing.Size(209, 6) ' 'mnuLebelsLevel ' Me.mnuLebelsLevel.Name = "mnuLebelsLevel" - Me.mnuLebelsLevel.Size = New System.Drawing.Size(250, 24) + Me.mnuLebelsLevel.Size = New System.Drawing.Size(212, 22) Me.mnuLebelsLevel.Text = "Levels/Labels..." ' 'ToolStripSeparator7 ' Me.ToolStripSeparator7.Name = "ToolStripSeparator7" - Me.ToolStripSeparator7.Size = New System.Drawing.Size(247, 6) + Me.ToolStripSeparator7.Size = New System.Drawing.Size(209, 6) ' 'mnuSorts ' Me.mnuSorts.Name = "mnuSorts" - Me.mnuSorts.Size = New System.Drawing.Size(250, 24) + Me.mnuSorts.Size = New System.Drawing.Size(212, 22) Me.mnuSorts.Text = "Sort..." ' 'mnuFilters ' Me.mnuFilters.Name = "mnuFilters" - Me.mnuFilters.Size = New System.Drawing.Size(250, 24) + Me.mnuFilters.Size = New System.Drawing.Size(212, 22) Me.mnuFilters.Text = "Filter..." ' 'mnuRemoveCurrentFilters ' Me.mnuRemoveCurrentFilters.Name = "mnuRemoveCurrentFilters" - Me.mnuRemoveCurrentFilters.Size = New System.Drawing.Size(250, 24) + Me.mnuRemoveCurrentFilters.Size = New System.Drawing.Size(212, 22) Me.mnuRemoveCurrentFilters.Text = "Remove Current Filter" ' 'rowContextMenuStrip @@ -382,53 +395,53 @@ Partial Class ucrDataView Me.rowContextMenuStrip.ImageScalingSize = New System.Drawing.Size(20, 20) Me.rowContextMenuStrip.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuInsertRowsBefore, Me.mnuInsertRowsAfter, Me.mnuDeleteRows, Me.ToolStripSeparator2, Me.mnuAddComment, Me.ToolStripSeparator4, Me.mnuFilter, Me.mnuRemoveCurrentFilter}) Me.rowContextMenuStrip.Name = "columnContextMenuStrip" - Me.rowContextMenuStrip.Size = New System.Drawing.Size(222, 160) + Me.rowContextMenuStrip.Size = New System.Drawing.Size(190, 148) ' 'mnuInsertRowsBefore ' Me.mnuInsertRowsBefore.Name = "mnuInsertRowsBefore" - Me.mnuInsertRowsBefore.Size = New System.Drawing.Size(221, 24) + Me.mnuInsertRowsBefore.Size = New System.Drawing.Size(189, 22) Me.mnuInsertRowsBefore.Text = "Insert Row(s) Before" ' 'mnuInsertRowsAfter ' Me.mnuInsertRowsAfter.Name = "mnuInsertRowsAfter" - Me.mnuInsertRowsAfter.Size = New System.Drawing.Size(221, 24) + Me.mnuInsertRowsAfter.Size = New System.Drawing.Size(189, 22) Me.mnuInsertRowsAfter.Text = "Insert Row(s) After" ' 'mnuDeleteRows ' Me.mnuDeleteRows.Name = "mnuDeleteRows" - Me.mnuDeleteRows.Size = New System.Drawing.Size(221, 24) + Me.mnuDeleteRows.Size = New System.Drawing.Size(189, 22) Me.mnuDeleteRows.Text = "Delete Row(s)" ' 'ToolStripSeparator2 ' Me.ToolStripSeparator2.Name = "ToolStripSeparator2" - Me.ToolStripSeparator2.Size = New System.Drawing.Size(218, 6) + Me.ToolStripSeparator2.Size = New System.Drawing.Size(186, 6) ' 'mnuAddComment ' Me.mnuAddComment.Name = "mnuAddComment" - Me.mnuAddComment.Size = New System.Drawing.Size(221, 24) + Me.mnuAddComment.Size = New System.Drawing.Size(189, 22) Me.mnuAddComment.Text = "Add Comment..." ' 'ToolStripSeparator4 ' Me.ToolStripSeparator4.Name = "ToolStripSeparator4" - Me.ToolStripSeparator4.Size = New System.Drawing.Size(218, 6) + Me.ToolStripSeparator4.Size = New System.Drawing.Size(186, 6) ' 'mnuFilter ' Me.mnuFilter.Name = "mnuFilter" - Me.mnuFilter.Size = New System.Drawing.Size(221, 24) + Me.mnuFilter.Size = New System.Drawing.Size(189, 22) Me.mnuFilter.Tag = "Filter..." Me.mnuFilter.Text = "Filter..." ' 'mnuRemoveCurrentFilter ' Me.mnuRemoveCurrentFilter.Name = "mnuRemoveCurrentFilter" - Me.mnuRemoveCurrentFilter.Size = New System.Drawing.Size(221, 24) + Me.mnuRemoveCurrentFilter.Size = New System.Drawing.Size(189, 22) Me.mnuRemoveCurrentFilter.Tag = "Remove_Current_Filter" Me.mnuRemoveCurrentFilter.Text = "Remove Current Filter" ' @@ -437,49 +450,49 @@ Partial Class ucrDataView Me.statusColumnMenu.ImageScalingSize = New System.Drawing.Size(20, 20) Me.statusColumnMenu.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.deleteDataFrame, Me.renameSheet, Me.HideSheet, Me.unhideSheet, Me.CopySheet, Me.reorderSheet, Me.ViewSheet}) Me.statusColumnMenu.Name = "statusColumnMenu" - Me.statusColumnMenu.Size = New System.Drawing.Size(192, 172) + Me.statusColumnMenu.Size = New System.Drawing.Size(163, 158) ' 'deleteDataFrame ' Me.deleteDataFrame.Name = "deleteDataFrame" - Me.deleteDataFrame.Size = New System.Drawing.Size(191, 24) + Me.deleteDataFrame.Size = New System.Drawing.Size(162, 22) Me.deleteDataFrame.Text = "Delete..." ' 'renameSheet ' Me.renameSheet.Name = "renameSheet" - Me.renameSheet.Size = New System.Drawing.Size(191, 24) + Me.renameSheet.Size = New System.Drawing.Size(162, 22) Me.renameSheet.Text = "Rename..." ' 'HideSheet ' Me.HideSheet.Name = "HideSheet" - Me.HideSheet.Size = New System.Drawing.Size(191, 24) + Me.HideSheet.Size = New System.Drawing.Size(162, 22) Me.HideSheet.Text = "Hide" ' 'unhideSheet ' Me.unhideSheet.Name = "unhideSheet" - Me.unhideSheet.Size = New System.Drawing.Size(191, 24) + Me.unhideSheet.Size = New System.Drawing.Size(162, 22) Me.unhideSheet.Text = "Unhide..." ' 'CopySheet ' Me.CopySheet.Name = "CopySheet" - Me.CopySheet.Size = New System.Drawing.Size(191, 24) + Me.CopySheet.Size = New System.Drawing.Size(162, 22) Me.CopySheet.Text = "Copy..." ' 'reorderSheet ' Me.reorderSheet.Enabled = False Me.reorderSheet.Name = "reorderSheet" - Me.reorderSheet.Size = New System.Drawing.Size(191, 24) + Me.reorderSheet.Size = New System.Drawing.Size(162, 22) Me.reorderSheet.Text = "Reorder..." ' 'ViewSheet ' Me.ViewSheet.Name = "ViewSheet" - Me.ViewSheet.Size = New System.Drawing.Size(191, 24) + Me.ViewSheet.Size = New System.Drawing.Size(162, 22) Me.ViewSheet.Text = "View Data Frame" ' 'lblNoData @@ -487,9 +500,8 @@ Partial Class ucrDataView Me.lblNoData.Dock = System.Windows.Forms.DockStyle.Fill Me.lblNoData.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!) Me.lblNoData.Location = New System.Drawing.Point(0, 0) - Me.lblNoData.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) Me.lblNoData.Name = "lblNoData" - Me.lblNoData.Size = New System.Drawing.Size(584, 292) + Me.lblNoData.Size = New System.Drawing.Size(438, 454) Me.lblNoData.TabIndex = 1 Me.lblNoData.Tag = "no_data_loaded" Me.lblNoData.Text = "No Data Loaded" @@ -499,10 +511,9 @@ Partial Class ucrDataView ' Me.lblRowDisplay.Dock = System.Windows.Forms.DockStyle.Fill Me.lblRowDisplay.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!) - Me.lblRowDisplay.Location = New System.Drawing.Point(4, 325) - Me.lblRowDisplay.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblRowDisplay.Location = New System.Drawing.Point(3, 480) Me.lblRowDisplay.Name = "lblRowDisplay" - Me.lblRowDisplay.Size = New System.Drawing.Size(584, 25) + Me.lblRowDisplay.Size = New System.Drawing.Size(438, 20) Me.lblRowDisplay.TabIndex = 4 Me.lblRowDisplay.Text = "Label1" Me.lblRowDisplay.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -513,10 +524,9 @@ Partial Class ucrDataView Me.lblHeader.Dock = System.Windows.Forms.DockStyle.Fill Me.lblHeader.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!) Me.lblHeader.ForeColor = System.Drawing.SystemColors.Control - Me.lblHeader.Location = New System.Drawing.Point(4, 0) - Me.lblHeader.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0) + Me.lblHeader.Location = New System.Drawing.Point(3, 0) Me.lblHeader.Name = "lblHeader" - Me.lblHeader.Size = New System.Drawing.Size(584, 25) + Me.lblHeader.Size = New System.Drawing.Size(438, 20) Me.lblHeader.TabIndex = 5 Me.lblHeader.Text = "Data View" Me.lblHeader.TextAlign = System.Drawing.ContentAlignment.MiddleCenter @@ -530,34 +540,200 @@ Partial Class ucrDataView Me.tlpTableContainer.Controls.Add(Me.pnlDataContainer, 0, 1) Me.tlpTableContainer.Dock = System.Windows.Forms.DockStyle.Fill Me.tlpTableContainer.Location = New System.Drawing.Point(0, 0) - Me.tlpTableContainer.Margin = New System.Windows.Forms.Padding(4) Me.tlpTableContainer.Name = "tlpTableContainer" Me.tlpTableContainer.RowCount = 3 - Me.tlpTableContainer.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!)) + Me.tlpTableContainer.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) Me.tlpTableContainer.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100.0!)) - Me.tlpTableContainer.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25.0!)) - Me.tlpTableContainer.Size = New System.Drawing.Size(592, 350) + Me.tlpTableContainer.RowStyles.Add(New System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20.0!)) + Me.tlpTableContainer.Size = New System.Drawing.Size(444, 500) Me.tlpTableContainer.TabIndex = 6 ' 'pnlDataContainer ' + Me.pnlDataContainer.Controls.Add(Me.panelAllMenuItems) Me.pnlDataContainer.Controls.Add(Me.grdData) Me.pnlDataContainer.Controls.Add(Me.lblNoData) Me.pnlDataContainer.Dock = System.Windows.Forms.DockStyle.Fill - Me.pnlDataContainer.Location = New System.Drawing.Point(4, 29) - Me.pnlDataContainer.Margin = New System.Windows.Forms.Padding(4) + Me.pnlDataContainer.Location = New System.Drawing.Point(3, 23) Me.pnlDataContainer.Name = "pnlDataContainer" - Me.pnlDataContainer.Size = New System.Drawing.Size(584, 292) + Me.pnlDataContainer.Size = New System.Drawing.Size(438, 454) Me.pnlDataContainer.TabIndex = 7 ' + 'panelAllMenuItems + ' + Me.panelAllMenuItems.Controls.Add(Me.linkNewsletter) + Me.panelAllMenuItems.Controls.Add(Me.linkGithub) + Me.panelAllMenuItems.Controls.Add(Me.linkProductDoc) + Me.panelAllMenuItems.Controls.Add(Me.linkHelpTipsTricks) + Me.panelAllMenuItems.Controls.Add(Me.linkHelpVideos) + Me.panelAllMenuItems.Controls.Add(Me.panelRecentMenuItems) + Me.panelAllMenuItems.Controls.Add(Me.linkStartOpenLibrary) + Me.panelAllMenuItems.Controls.Add(Me.linkStartOpenFile) + Me.panelAllMenuItems.Controls.Add(Me.linkStartNewDataFrame) + Me.panelAllMenuItems.Controls.Add(Me.lblHelp) + Me.panelAllMenuItems.Controls.Add(Me.lblRecent) + Me.panelAllMenuItems.Controls.Add(Me.lblStart) + Me.panelAllMenuItems.Dock = System.Windows.Forms.DockStyle.Fill + Me.panelAllMenuItems.Location = New System.Drawing.Point(0, 0) + Me.panelAllMenuItems.Name = "panelAllMenuItems" + Me.panelAllMenuItems.Size = New System.Drawing.Size(438, 454) + Me.panelAllMenuItems.TabIndex = 7 + Me.panelAllMenuItems.Visible = False + ' + 'linkNewsletter + ' + Me.linkNewsletter.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkNewsletter.AutoSize = True + Me.linkNewsletter.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkNewsletter.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkNewsletter.Location = New System.Drawing.Point(30, 409) + Me.linkNewsletter.Name = "linkNewsletter" + Me.linkNewsletter.Size = New System.Drawing.Size(95, 13) + Me.linkNewsletter.TabIndex = 11 + Me.linkNewsletter.TabStop = True + Me.linkNewsletter.Text = "Join our newsletter" + ' + 'linkGithub + ' + Me.linkGithub.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkGithub.AutoSize = True + Me.linkGithub.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkGithub.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkGithub.Location = New System.Drawing.Point(30, 390) + Me.linkGithub.Name = "linkGithub" + Me.linkGithub.Size = New System.Drawing.Size(88, 13) + Me.linkGithub.TabIndex = 10 + Me.linkGithub.TabStop = True + Me.linkGithub.Text = "GitHub repository" + ' + 'linkProductDoc + ' + Me.linkProductDoc.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkProductDoc.AutoSize = True + Me.linkProductDoc.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkProductDoc.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkProductDoc.Location = New System.Drawing.Point(30, 371) + Me.linkProductDoc.Name = "linkProductDoc" + Me.linkProductDoc.Size = New System.Drawing.Size(117, 13) + Me.linkProductDoc.TabIndex = 9 + Me.linkProductDoc.TabStop = True + Me.linkProductDoc.Text = "Product documentation" + ' + 'linkHelpTipsTricks + ' + Me.linkHelpTipsTricks.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkHelpTipsTricks.AutoSize = True + Me.linkHelpTipsTricks.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkHelpTipsTricks.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkHelpTipsTricks.Location = New System.Drawing.Point(30, 352) + Me.linkHelpTipsTricks.Name = "linkHelpTipsTricks" + Me.linkHelpTipsTricks.Size = New System.Drawing.Size(80, 13) + Me.linkHelpTipsTricks.TabIndex = 8 + Me.linkHelpTipsTricks.TabStop = True + Me.linkHelpTipsTricks.Text = "Tips and Tricks" + ' + 'linkHelpVideos + ' + Me.linkHelpVideos.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkHelpVideos.AutoSize = True + Me.linkHelpVideos.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkHelpVideos.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkHelpVideos.Location = New System.Drawing.Point(30, 333) + Me.linkHelpVideos.Name = "linkHelpVideos" + Me.linkHelpVideos.Size = New System.Drawing.Size(97, 13) + Me.linkHelpVideos.TabIndex = 7 + Me.linkHelpVideos.TabStop = True + Me.linkHelpVideos.Text = "Introductory videos" + ' + 'panelRecentMenuItems + ' + Me.panelRecentMenuItems.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.panelRecentMenuItems.AutoScroll = True + Me.panelRecentMenuItems.Location = New System.Drawing.Point(30, 160) + Me.panelRecentMenuItems.Name = "panelRecentMenuItems" + Me.panelRecentMenuItems.Size = New System.Drawing.Size(377, 138) + Me.panelRecentMenuItems.TabIndex = 6 + ' + 'linkStartOpenLibrary + ' + Me.linkStartOpenLibrary.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkStartOpenLibrary.AutoSize = True + Me.linkStartOpenLibrary.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkStartOpenLibrary.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkStartOpenLibrary.Location = New System.Drawing.Point(30, 87) + Me.linkStartOpenLibrary.Name = "linkStartOpenLibrary" + Me.linkStartOpenLibrary.Size = New System.Drawing.Size(98, 13) + Me.linkStartOpenLibrary.TabIndex = 5 + Me.linkStartOpenLibrary.TabStop = True + Me.linkStartOpenLibrary.Text = "Open from library ..." + ' + 'linkStartOpenFile + ' + Me.linkStartOpenFile.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkStartOpenFile.AutoSize = True + Me.linkStartOpenFile.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkStartOpenFile.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkStartOpenFile.Location = New System.Drawing.Point(30, 68) + Me.linkStartOpenFile.Name = "linkStartOpenFile" + Me.linkStartOpenFile.Size = New System.Drawing.Size(84, 13) + Me.linkStartOpenFile.TabIndex = 4 + Me.linkStartOpenFile.TabStop = True + Me.linkStartOpenFile.Text = "Open from file ..." + ' + 'linkStartNewDataFrame + ' + Me.linkStartNewDataFrame.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkStartNewDataFrame.AutoSize = True + Me.linkStartNewDataFrame.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkStartNewDataFrame.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkStartNewDataFrame.Location = New System.Drawing.Point(30, 49) + Me.linkStartNewDataFrame.Name = "linkStartNewDataFrame" + Me.linkStartNewDataFrame.Size = New System.Drawing.Size(87, 13) + Me.linkStartNewDataFrame.TabIndex = 3 + Me.linkStartNewDataFrame.TabStop = True + Me.linkStartNewDataFrame.Text = "New Data Frame" + ' + 'lblHelp + ' + Me.lblHelp.AutoSize = True + Me.lblHelp.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblHelp.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblHelp.Location = New System.Drawing.Point(28, 304) + Me.lblHelp.Name = "lblHelp" + Me.lblHelp.Size = New System.Drawing.Size(56, 25) + Me.lblHelp.TabIndex = 2 + Me.lblHelp.Text = "Help" + ' + 'lblRecent + ' + Me.lblRecent.AutoSize = True + Me.lblRecent.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblRecent.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblRecent.Location = New System.Drawing.Point(28, 132) + Me.lblRecent.Name = "lblRecent" + Me.lblRecent.Size = New System.Drawing.Size(80, 25) + Me.lblRecent.TabIndex = 1 + Me.lblRecent.Text = "Recent" + ' + 'lblStart + ' + Me.lblStart.AutoSize = True + Me.lblStart.Font = New System.Drawing.Font("Microsoft Sans Serif", 15.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lblStart.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.lblStart.Location = New System.Drawing.Point(28, 18) + Me.lblStart.Name = "lblStart" + Me.lblStart.Size = New System.Drawing.Size(57, 25) + Me.lblStart.TabIndex = 0 + Me.lblStart.Text = "Start" + ' 'ucrDataView ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!) + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.Controls.Add(Me.tlpTableContainer) - Me.Margin = New System.Windows.Forms.Padding(4) Me.Name = "ucrDataView" - Me.Size = New System.Drawing.Size(592, 350) + Me.Size = New System.Drawing.Size(444, 500) Me.Tag = "Data_View" Me.columnContextMenuStrip.ResumeLayout(False) Me.cellContextMenuStrip.ResumeLayout(False) @@ -565,6 +741,8 @@ Partial Class ucrDataView Me.statusColumnMenu.ResumeLayout(False) Me.tlpTableContainer.ResumeLayout(False) Me.pnlDataContainer.ResumeLayout(False) + Me.panelAllMenuItems.ResumeLayout(False) + Me.panelAllMenuItems.PerformLayout() Me.ResumeLayout(False) End Sub @@ -633,4 +811,17 @@ Partial Class ucrDataView Private WithEvents mnuCellCopyRange As ToolStripMenuItem Private WithEvents mnuCellPasteRange As ToolStripMenuItem Friend WithEvents mnuCellHelp As ToolStripMenuItem + Friend WithEvents panelAllMenuItems As Panel + Friend WithEvents linkStartOpenLibrary As LinkLabel + Friend WithEvents linkStartOpenFile As LinkLabel + Friend WithEvents linkStartNewDataFrame As LinkLabel + Friend WithEvents lblHelp As Label + Friend WithEvents lblRecent As Label + Friend WithEvents lblStart As Label + Friend WithEvents panelRecentMenuItems As Panel + Friend WithEvents linkNewsletter As LinkLabel + Friend WithEvents linkGithub As LinkLabel + Friend WithEvents linkProductDoc As LinkLabel + Friend WithEvents linkHelpTipsTricks As LinkLabel + Friend WithEvents linkHelpVideos As LinkLabel End Class diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index f7137193411..76ccdea35c5 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -344,10 +344,15 @@ Public Class ucrDataView If frmMain.clsRLink.RunInternalScriptGetValue(clsFilterApplied.ToScript()).AsLogical(0) Then lblRowDisplay.Text = lblRowDisplay.Text & " (" & frmMain.clsRLink.GetDataFrameLength(grdCurrSheet.Name, False) & ")" End If - lblRowDisplay.Text = lblRowDisplay.Text & " | Showing " & grdCurrSheet.ColumnCount & " of " & iColumnCount & " columns" + lblRowDisplay.Text = lblRowDisplay.Text & " | Showing " & grdCurrSheet.ColumnCount & " of " & iColumnCount & " columns" + 'hide startup menu items + panelAllMenuItems.Visible = False Else frmMain.tstatus.Text = "No data loaded" - lblRowDisplay.Text = "" + lblRowDisplay.Text = "" + 'show startup menu items + panelAllMenuItems.Visible = True + 'todo. set the recent files list?? End If End Sub @@ -864,4 +869,52 @@ Public Class ucrDataView Private Sub mnuRemoveCurrentFilters_Click(sender As Object, e As EventArgs) Handles mnuRemoveCurrentFilters.Click RunScriptFromDataView(clsRemoveFilter.ToScript(), strComment:="Right click menu: Remove Current Filter") End Sub + + Private Sub linkNewDataFrame_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkStartNewDataFrame.LinkClicked + dlgNewDataFrame.ShowDialog() + End Sub + + Private Sub linkOpenFile_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkStartOpenFile.LinkClicked + dlgImportDataset.ShowDialog() + End Sub + + Private Sub linkOpenLibrary_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkStartOpenLibrary.LinkClicked + dlgFromLibrary.ShowDialog() + End Sub + + ''' + ''' clears all the added links label menu items from the recents panel of the data view + ''' + Public Sub ClearRecentFileMenuItems() + panelRecentMenuItems.Controls.Clear() + End Sub + + ''' + ''' adds the link label as a menu item to the recents panel of the data view + ''' + ''' link label with file path set as its tag + Public Sub InsertRecentFileMenuItems(linkMenuItem As LinkLabel) + 'label used to display the path to the user + Dim lblMenuItemPath As New Label + Dim position As Integer = 1 + + 'add subsequent links after each other, separating them by 19 pixels on the Y axis + If panelRecentMenuItems.Controls.Count > 0 Then + 'get Y axis position of last control then add 19 pixels to be used as the new Y axis position. + position = panelRecentMenuItems.Controls.Item(panelRecentMenuItems.Controls.Count - 1).Location.Y + position = position + 19 + End If + + linkMenuItem.Location = New Point(0, position) + linkMenuItem.Height = 13 + linkMenuItem.LinkBehavior = LinkBehavior.NeverUnderline + + lblMenuItemPath.Text = linkMenuItem.Tag 'get file path from link tag + lblMenuItemPath.Location = New Point(linkMenuItem.Width + 10, position) + lblMenuItemPath.Height = 13 + + 'add the controls. The link and and the label will be besides each other on the same Y axis + panelRecentMenuItems.Controls.Add(linkMenuItem) + panelRecentMenuItems.Controls.Add(lblMenuItemPath) + End Sub End Class From 032c5afb326bfa1b3de1a59dfc5cd80426dc204e Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 15 Oct 2020 15:45:23 +0300 Subject: [PATCH 220/277] Implementation for the controls --- instat/dlgVisualizeData.Designer.vb | 59 +++++++++++++++++++++-------- instat/dlgVisualizeData.vb | 19 ++++++---- 2 files changed, 55 insertions(+), 23 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 7359eb19c76..0ff14de51af 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -45,6 +45,8 @@ Partial Class dlgVisualizeData Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() Me.lblDataPoints = New System.Windows.Forms.Label() + Me.ucrNudSamplingFunction = New instat.ucrNud() + Me.lblSampling = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'rdoVisDat @@ -120,7 +122,7 @@ Partial Class dlgVisualizeData 'lblPalette ' Me.lblPalette.AutoSize = True - Me.lblPalette.Location = New System.Drawing.Point(4, 276) + Me.lblPalette.Location = New System.Drawing.Point(22, 272) Me.lblPalette.Name = "lblPalette" Me.lblPalette.Size = New System.Drawing.Size(43, 13) Me.lblPalette.TabIndex = 13 @@ -129,7 +131,7 @@ Partial Class dlgVisualizeData 'lblMaximumSize ' Me.lblMaximumSize.AutoSize = True - Me.lblMaximumSize.Location = New System.Drawing.Point(4, 304) + Me.lblMaximumSize.Location = New System.Drawing.Point(5, 305) Me.lblMaximumSize.Name = "lblMaximumSize" Me.lblMaximumSize.Size = New System.Drawing.Size(77, 13) Me.lblMaximumSize.TabIndex = 15 @@ -138,7 +140,7 @@ Partial Class dlgVisualizeData 'lblMillionDataPoints ' Me.lblMillionDataPoints.AutoSize = True - Me.lblMillionDataPoints.Location = New System.Drawing.Point(159, 304) + Me.lblMillionDataPoints.Location = New System.Drawing.Point(154, 305) Me.lblMillionDataPoints.Name = "lblMillionDataPoints" Me.lblMillionDataPoints.Size = New System.Drawing.Size(94, 13) Me.lblMillionDataPoints.TabIndex = 16 @@ -147,7 +149,7 @@ Partial Class dlgVisualizeData 'lblPaltte ' Me.lblPaltte.AutoSize = True - Me.lblPaltte.Location = New System.Drawing.Point(4, 277) + Me.lblPaltte.Location = New System.Drawing.Point(22, 272) Me.lblPaltte.Name = "lblPaltte" Me.lblPaltte.Size = New System.Drawing.Size(43, 13) Me.lblPaltte.TabIndex = 21 @@ -156,7 +158,7 @@ Partial Class dlgVisualizeData 'lblMaximum ' Me.lblMaximum.AutoSize = True - Me.lblMaximum.Location = New System.Drawing.Point(5, 302) + Me.lblMaximum.Location = New System.Drawing.Point(5, 305) Me.lblMaximum.Name = "lblMaximum" Me.lblMaximum.Size = New System.Drawing.Size(77, 13) Me.lblMaximum.TabIndex = 24 @@ -166,11 +168,11 @@ Partial Class dlgVisualizeData ' Me.ucrNudMaximum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaximum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaximum.Location = New System.Drawing.Point(88, 302) + Me.ucrNudMaximum.Location = New System.Drawing.Point(98, 302) Me.ucrNudMaximum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaximum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaximum.Name = "ucrNudMaximum" - Me.ucrNudMaximum.Size = New System.Drawing.Size(63, 20) + Me.ucrNudMaximum.Size = New System.Drawing.Size(50, 20) Me.ucrNudMaximum.TabIndex = 23 Me.ucrNudMaximum.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -178,11 +180,11 @@ Partial Class dlgVisualizeData ' Me.ucrNudMaximumSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaximumSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaximumSize.Location = New System.Drawing.Point(88, 302) + Me.ucrNudMaximumSize.Location = New System.Drawing.Point(98, 302) Me.ucrNudMaximumSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaximumSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaximumSize.Name = "ucrNudMaximumSize" - Me.ucrNudMaximumSize.Size = New System.Drawing.Size(63, 20) + Me.ucrNudMaximumSize.Size = New System.Drawing.Size(50, 20) Me.ucrNudMaximumSize.TabIndex = 22 Me.ucrNudMaximumSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' @@ -191,15 +193,15 @@ Partial Class dlgVisualizeData Me.ucrInputComboboxPaletteGuess.AddQuotesIfUnrecognised = True Me.ucrInputComboboxPaletteGuess.GetSetSelectedIndex = -1 Me.ucrInputComboboxPaletteGuess.IsReadOnly = False - Me.ucrInputComboboxPaletteGuess.Location = New System.Drawing.Point(51, 272) + Me.ucrInputComboboxPaletteGuess.Location = New System.Drawing.Point(97, 268) Me.ucrInputComboboxPaletteGuess.Name = "ucrInputComboboxPaletteGuess" - Me.ucrInputComboboxPaletteGuess.Size = New System.Drawing.Size(72, 21) + Me.ucrInputComboboxPaletteGuess.Size = New System.Drawing.Size(52, 21) Me.ucrInputComboboxPaletteGuess.TabIndex = 20 ' 'ucrChkSortMiss ' Me.ucrChkSortMiss.Checked = False - Me.ucrChkSortMiss.Location = New System.Drawing.Point(10, 247) + Me.ucrChkSortMiss.Location = New System.Drawing.Point(6, 244) Me.ucrChkSortMiss.Name = "ucrChkSortMiss" Me.ucrChkSortMiss.Size = New System.Drawing.Size(145, 20) Me.ucrChkSortMiss.TabIndex = 19 @@ -207,7 +209,7 @@ Partial Class dlgVisualizeData 'ucrChkSortVariables ' Me.ucrChkSortVariables.Checked = False - Me.ucrChkSortVariables.Location = New System.Drawing.Point(10, 247) + Me.ucrChkSortVariables.Location = New System.Drawing.Point(6, 244) Me.ucrChkSortVariables.Name = "ucrChkSortVariables" Me.ucrChkSortVariables.Size = New System.Drawing.Size(145, 20) Me.ucrChkSortVariables.TabIndex = 18 @@ -217,9 +219,9 @@ Partial Class dlgVisualizeData Me.ucrInputComboboxPalette.AddQuotesIfUnrecognised = True Me.ucrInputComboboxPalette.GetSetSelectedIndex = -1 Me.ucrInputComboboxPalette.IsReadOnly = False - Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(51, 272) + Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(97, 268) Me.ucrInputComboboxPalette.Name = "ucrInputComboboxPalette" - Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(72, 21) + Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(52, 21) Me.ucrInputComboboxPalette.TabIndex = 12 ' 'ucrReceiverVisualizeData @@ -277,17 +279,40 @@ Partial Class dlgVisualizeData 'lblDataPoints ' Me.lblDataPoints.AutoSize = True - Me.lblDataPoints.Location = New System.Drawing.Point(159, 304) + Me.lblDataPoints.Location = New System.Drawing.Point(154, 305) Me.lblDataPoints.Name = "lblDataPoints" Me.lblDataPoints.Size = New System.Drawing.Size(94, 13) Me.lblDataPoints.TabIndex = 25 Me.lblDataPoints.Text = "Million Data Points" ' + 'ucrNudSamplingFunction + ' + Me.ucrNudSamplingFunction.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSamplingFunction.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSamplingFunction.Location = New System.Drawing.Point(313, 265) + Me.ucrNudSamplingFunction.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSamplingFunction.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSamplingFunction.Name = "ucrNudSamplingFunction" + Me.ucrNudSamplingFunction.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSamplingFunction.TabIndex = 26 + Me.ucrNudSamplingFunction.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' + 'lblSampling + ' + Me.lblSampling.AutoSize = True + Me.lblSampling.Location = New System.Drawing.Point(213, 268) + Me.lblSampling.Name = "lblSampling" + Me.lblSampling.Size = New System.Drawing.Size(94, 13) + Me.lblSampling.TabIndex = 27 + Me.lblSampling.Text = "Sampling Fraction:" + ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(417, 413) + Me.Controls.Add(Me.lblSampling) + Me.Controls.Add(Me.ucrNudSamplingFunction) Me.Controls.Add(Me.lblDataPoints) Me.Controls.Add(Me.lblMaximum) Me.Controls.Add(Me.ucrNudMaximum) @@ -345,4 +370,6 @@ Partial Class dlgVisualizeData Friend WithEvents ucrNudMaximum As ucrNud Friend WithEvents lblMaximum As Label Friend WithEvents lblDataPoints As Label + Friend WithEvents lblSampling As Label + Friend WithEvents ucrNudSamplingFunction As ucrNud End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 70e1c37ad6f..22c18d33879 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -57,7 +57,7 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortMiss, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPaletteGuess, {rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximumSize, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.9) - ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximum, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximum, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.9) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) ucrPnlSelectData.AddRadioButton(rdoSelectedColumn) @@ -65,12 +65,12 @@ Public Class dlgVisualizeData ucrPnlSelectData.AddParameterPresentCondition(rdoSelectedColumn, "x") ucrChkSortVariables.SetParameter(New RParameter("sort_type", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=False) - ucrChkSortVariables.SetText("Sort Variables:") + ucrChkSortVariables.SetText("Sort Variables") ucrChkSortVariables.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrChkSortMiss.SetParameter(New RParameter("sort_miss", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=False) - ucrChkSortMiss.SetText("Sort Variables:") + ucrChkSortMiss.SetText("Sort Variables") ucrChkSortMiss.SetValuesCheckedAndUnchecked("TRUE", "FALSE") ucrInputComboboxPalette.SetParameter(New RParameter("palette", 2)) @@ -87,6 +87,7 @@ Public Class dlgVisualizeData ucrInputComboboxPaletteGuess.SetDropDownStyleAsNonEditable() ucrInputComboboxPaletteGuess.SetItems(dctPaletteGuess) + ucrNudMaximumSize.SetParameter(New RParameter("large_data_size", 4)) ucrNudMaximumSize.DecimalPlaces = 1 ucrNudMaximumSize.Increment = 0.1 ucrNudMaximumSize.SetMinMax(0.1, Integer.MaxValue) @@ -94,9 +95,7 @@ Public Class dlgVisualizeData ucrNudMaximum.SetParameter(New RParameter("large_data_size", 5)) ucrNudMaximum.DecimalPlaces = 1 ucrNudMaximum.Increment = 0.1 - ucrNudMaximum.Minimum = 0.1 - ucrNudMaximum.SetRDefault(0.9) - + ucrNudMaximum.SetMinMax(0.1, Integer.MaxValue) ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() @@ -144,7 +143,6 @@ Public Class dlgVisualizeData clsVisMissFunction.AddParameter("sort_miss", "FALSE", iPosition:=2) clsVisMissFunction.AddParameter("show_perc", "TRUE", iPosition:=3) clsVisMissFunction.AddParameter("show_perc_col", "TRUE", iPosition:=4) - clsVisMissFunction.AddParameter("large_data_size", 900000, iPosition:=5) clsVisMissFunction.AddParameter("warn_large_data", "TRUE", iPosition:=6) clsVisGuessFunction.SetPackageName("visdat") @@ -231,4 +229,11 @@ Public Class dlgVisualizeData clsVisDatFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=4) End Sub + + Private Sub ucrNudMaximum_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaximum.ControlValueChanged + Dim Value As Decimal = System.Convert.ToDecimal(ucrNudMaximum.GetText()) + Dim strLargeDataSizeParamVal As Integer = Value * 1000000 + + clsVisMissFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=5) + End Sub End Class \ No newline at end of file From 1ce6663f46f636e5345b97187adc8008d888096c Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 15 Oct 2020 16:32:03 +0300 Subject: [PATCH 221/277] Aligning the controls --- instat/dlgVisualizeData.Designer.vb | 22 ++++++++++++---------- instat/dlgVisualizeData.vb | 3 ++- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 0ff14de51af..6e281bf5895 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -31,7 +31,7 @@ Partial Class dlgVisualizeData Me.lblMaximumSize = New System.Windows.Forms.Label() Me.lblMillionDataPoints = New System.Windows.Forms.Label() Me.lblPaltte = New System.Windows.Forms.Label() - Me.lblMaximum = New System.Windows.Forms.Label() + Me.lblMaximumS = New System.Windows.Forms.Label() Me.ucrNudMaximum = New instat.ucrNud() Me.ucrNudMaximumSize = New instat.ucrNud() Me.ucrInputComboboxPaletteGuess = New instat.ucrInputComboBox() @@ -155,14 +155,14 @@ Partial Class dlgVisualizeData Me.lblPaltte.TabIndex = 21 Me.lblPaltte.Text = "Palette:" ' - 'lblMaximum + 'lblMaximumS ' - Me.lblMaximum.AutoSize = True - Me.lblMaximum.Location = New System.Drawing.Point(5, 305) - Me.lblMaximum.Name = "lblMaximum" - Me.lblMaximum.Size = New System.Drawing.Size(77, 13) - Me.lblMaximum.TabIndex = 24 - Me.lblMaximum.Text = "Maximum Size:" + Me.lblMaximumS.AutoSize = True + Me.lblMaximumS.Location = New System.Drawing.Point(5, 305) + Me.lblMaximumS.Name = "lblMaximumS" + Me.lblMaximumS.Size = New System.Drawing.Size(77, 13) + Me.lblMaximumS.TabIndex = 24 + Me.lblMaximumS.Text = "Maximum Size:" ' 'ucrNudMaximum ' @@ -288,6 +288,7 @@ Partial Class dlgVisualizeData 'ucrNudSamplingFunction ' Me.ucrNudSamplingFunction.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSamplingFunction.Enabled = False Me.ucrNudSamplingFunction.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudSamplingFunction.Location = New System.Drawing.Point(313, 265) Me.ucrNudSamplingFunction.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) @@ -300,6 +301,7 @@ Partial Class dlgVisualizeData 'lblSampling ' Me.lblSampling.AutoSize = True + Me.lblSampling.Enabled = False Me.lblSampling.Location = New System.Drawing.Point(213, 268) Me.lblSampling.Name = "lblSampling" Me.lblSampling.Size = New System.Drawing.Size(94, 13) @@ -314,7 +316,7 @@ Partial Class dlgVisualizeData Me.Controls.Add(Me.lblSampling) Me.Controls.Add(Me.ucrNudSamplingFunction) Me.Controls.Add(Me.lblDataPoints) - Me.Controls.Add(Me.lblMaximum) + Me.Controls.Add(Me.lblMaximumS) Me.Controls.Add(Me.ucrNudMaximum) Me.Controls.Add(Me.ucrNudMaximumSize) Me.Controls.Add(Me.lblPaltte) @@ -368,7 +370,7 @@ Partial Class dlgVisualizeData Friend WithEvents lblPaltte As Label Friend WithEvents ucrNudMaximumSize As ucrNud Friend WithEvents ucrNudMaximum As ucrNud - Friend WithEvents lblMaximum As Label + Friend WithEvents lblMaximumS As Label Friend WithEvents lblDataPoints As Label Friend WithEvents lblSampling As Label Friend WithEvents ucrNudSamplingFunction As ucrNud diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 22c18d33879..6f6c47fc9f9 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -105,10 +105,11 @@ Public Class dlgVisualizeData ucrInputComboboxPalette.SetLinkedDisplayControl(lblPaltte) ucrInputComboboxPaletteGuess.SetLinkedDisplayControl(lblPalette) - ucrNudMaximum.SetLinkedDisplayControl(lblMaximum) + ucrNudMaximum.SetLinkedDisplayControl(lblMaximumS) ucrNudMaximumSize.SetLinkedDisplayControl(lblMaximumSize) ucrNudMaximumSize.SetLinkedDisplayControl(lblMillionDataPoints) ucrNudMaximum.SetLinkedDisplayControl(lblDataPoints) + ucrNudSamplingFunction.SetLinkedDisplayControl(lblSampling) ucrPnlSelectData.AddToLinkedControls(ucrReceiverVisualizeData, {rdoSelectedColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) From 988da81bb0a17918024784756cca7eb9ba9ba9e9 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 15 Oct 2020 16:51:05 +0300 Subject: [PATCH 222/277] Proper arrangement of controls --- instat/dlgVisualizeData.Designer.vb | 70 ++++++++++++++--------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 6e281bf5895..d27fa733eb1 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -32,6 +32,9 @@ Partial Class dlgVisualizeData Me.lblMillionDataPoints = New System.Windows.Forms.Label() Me.lblPaltte = New System.Windows.Forms.Label() Me.lblMaximumS = New System.Windows.Forms.Label() + Me.lblDataPoints = New System.Windows.Forms.Label() + Me.lblSampling = New System.Windows.Forms.Label() + Me.ucrNudSamplingFunction = New instat.ucrNud() Me.ucrNudMaximum = New instat.ucrNud() Me.ucrNudMaximumSize = New instat.ucrNud() Me.ucrInputComboboxPaletteGuess = New instat.ucrInputComboBox() @@ -44,9 +47,6 @@ Partial Class dlgVisualizeData Me.ucrSaveGraph = New instat.ucrSave() Me.ucrSelectorVisualizeData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.lblDataPoints = New System.Windows.Forms.Label() - Me.ucrNudSamplingFunction = New instat.ucrNud() - Me.lblSampling = New System.Windows.Forms.Label() Me.SuspendLayout() ' 'rdoVisDat @@ -164,6 +164,38 @@ Partial Class dlgVisualizeData Me.lblMaximumS.TabIndex = 24 Me.lblMaximumS.Text = "Maximum Size:" ' + 'lblDataPoints + ' + Me.lblDataPoints.AutoSize = True + Me.lblDataPoints.Location = New System.Drawing.Point(154, 305) + Me.lblDataPoints.Name = "lblDataPoints" + Me.lblDataPoints.Size = New System.Drawing.Size(94, 13) + Me.lblDataPoints.TabIndex = 25 + Me.lblDataPoints.Text = "Million Data Points" + ' + 'lblSampling + ' + Me.lblSampling.AutoSize = True + Me.lblSampling.Enabled = False + Me.lblSampling.Location = New System.Drawing.Point(213, 268) + Me.lblSampling.Name = "lblSampling" + Me.lblSampling.Size = New System.Drawing.Size(94, 13) + Me.lblSampling.TabIndex = 27 + Me.lblSampling.Text = "Sampling Fraction:" + ' + 'ucrNudSamplingFunction + ' + Me.ucrNudSamplingFunction.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSamplingFunction.Enabled = False + Me.ucrNudSamplingFunction.Increment = New Decimal(New Integer() {1, 0, 0, 0}) + Me.ucrNudSamplingFunction.Location = New System.Drawing.Point(313, 265) + Me.ucrNudSamplingFunction.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) + Me.ucrNudSamplingFunction.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSamplingFunction.Name = "ucrNudSamplingFunction" + Me.ucrNudSamplingFunction.Size = New System.Drawing.Size(50, 20) + Me.ucrNudSamplingFunction.TabIndex = 26 + Me.ucrNudSamplingFunction.Value = New Decimal(New Integer() {0, 0, 0, 0}) + ' 'ucrNudMaximum ' Me.ucrNudMaximum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -276,38 +308,6 @@ Partial Class dlgVisualizeData Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 10 ' - 'lblDataPoints - ' - Me.lblDataPoints.AutoSize = True - Me.lblDataPoints.Location = New System.Drawing.Point(154, 305) - Me.lblDataPoints.Name = "lblDataPoints" - Me.lblDataPoints.Size = New System.Drawing.Size(94, 13) - Me.lblDataPoints.TabIndex = 25 - Me.lblDataPoints.Text = "Million Data Points" - ' - 'ucrNudSamplingFunction - ' - Me.ucrNudSamplingFunction.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSamplingFunction.Enabled = False - Me.ucrNudSamplingFunction.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSamplingFunction.Location = New System.Drawing.Point(313, 265) - Me.ucrNudSamplingFunction.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudSamplingFunction.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudSamplingFunction.Name = "ucrNudSamplingFunction" - Me.ucrNudSamplingFunction.Size = New System.Drawing.Size(50, 20) - Me.ucrNudSamplingFunction.TabIndex = 26 - Me.ucrNudSamplingFunction.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' - 'lblSampling - ' - Me.lblSampling.AutoSize = True - Me.lblSampling.Enabled = False - Me.lblSampling.Location = New System.Drawing.Point(213, 268) - Me.lblSampling.Name = "lblSampling" - Me.lblSampling.Size = New System.Drawing.Size(94, 13) - Me.lblSampling.TabIndex = 27 - Me.lblSampling.Text = "Sampling Fraction:" - ' 'dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) From 9fb547ed31b24579f9bede6dcafde8d7f732a029 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 15 Oct 2020 20:11:58 +0300 Subject: [PATCH 223/277] Implementing the ucrInput control for palette arguments --- instat/dlgVisualizeData.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 6f6c47fc9f9..38c72232440 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -79,6 +79,7 @@ Public Class dlgVisualizeData dctPalette.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) ucrInputComboboxPalette.SetDropDownStyleAsNonEditable() ucrInputComboboxPalette.SetItems(dctPalette) + ucrInputComboboxPalette.bAllowNonConditionValues = True ucrInputComboboxPaletteGuess.SetParameter(New RParameter("palette", 1)) dctPaletteGuess.Add("default", Chr(34) & "default" & Chr(34)) @@ -86,6 +87,7 @@ Public Class dlgVisualizeData dctPaletteGuess.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) ucrInputComboboxPaletteGuess.SetDropDownStyleAsNonEditable() ucrInputComboboxPaletteGuess.SetItems(dctPaletteGuess) + ucrInputComboboxPaletteGuess.bAllowNonConditionValues = True ucrNudMaximumSize.SetParameter(New RParameter("large_data_size", 4)) ucrNudMaximumSize.DecimalPlaces = 1 @@ -127,7 +129,6 @@ Public Class dlgVisualizeData ucrSelectorVisualizeData.Reset() ucrSaveGraph.Reset() - clsCurrBaseFunction = clsVisDatFunction clsVisDatFunction.SetPackageName("visdat") From 3501ffda006648336b1ead7a9fe2e51eb27fa693 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Thu, 15 Oct 2020 23:32:17 +0300 Subject: [PATCH 224/277] suggested changes --- instat/ucrDataView.Designer.vb | 172 +++++++++++++++++---------------- instat/ucrDataView.vb | 12 +++ 2 files changed, 99 insertions(+), 85 deletions(-) diff --git a/instat/ucrDataView.Designer.vb b/instat/ucrDataView.Designer.vb index 843ab12344c..baf6be6fa74 100644 --- a/instat/ucrDataView.Designer.vb +++ b/instat/ucrDataView.Designer.vb @@ -104,11 +104,11 @@ Partial Class ucrDataView Me.tlpTableContainer = New System.Windows.Forms.TableLayoutPanel() Me.pnlDataContainer = New System.Windows.Forms.Panel() Me.panelAllMenuItems = New System.Windows.Forms.Panel() - Me.linkNewsletter = New System.Windows.Forms.LinkLabel() - Me.linkGithub = New System.Windows.Forms.LinkLabel() - Me.linkProductDoc = New System.Windows.Forms.LinkLabel() - Me.linkHelpTipsTricks = New System.Windows.Forms.LinkLabel() - Me.linkHelpVideos = New System.Windows.Forms.LinkLabel() + Me.linkHelpMoreToCome = New System.Windows.Forms.LinkLabel() + Me.linkHelpInstructionVideos = New System.Windows.Forms.LinkLabel() + Me.linkHelpRInstatWebsite = New System.Windows.Forms.LinkLabel() + Me.linkHelpRpackages = New System.Windows.Forms.LinkLabel() + Me.linkHelpIntroduction = New System.Windows.Forms.LinkLabel() Me.panelRecentMenuItems = New System.Windows.Forms.Panel() Me.linkStartOpenLibrary = New System.Windows.Forms.LinkLabel() Me.linkStartOpenFile = New System.Windows.Forms.LinkLabel() @@ -561,11 +561,11 @@ Partial Class ucrDataView ' 'panelAllMenuItems ' - Me.panelAllMenuItems.Controls.Add(Me.linkNewsletter) - Me.panelAllMenuItems.Controls.Add(Me.linkGithub) - Me.panelAllMenuItems.Controls.Add(Me.linkProductDoc) - Me.panelAllMenuItems.Controls.Add(Me.linkHelpTipsTricks) - Me.panelAllMenuItems.Controls.Add(Me.linkHelpVideos) + Me.panelAllMenuItems.Controls.Add(Me.linkHelpMoreToCome) + Me.panelAllMenuItems.Controls.Add(Me.linkHelpInstructionVideos) + Me.panelAllMenuItems.Controls.Add(Me.linkHelpRInstatWebsite) + Me.panelAllMenuItems.Controls.Add(Me.linkHelpRpackages) + Me.panelAllMenuItems.Controls.Add(Me.linkHelpIntroduction) Me.panelAllMenuItems.Controls.Add(Me.panelRecentMenuItems) Me.panelAllMenuItems.Controls.Add(Me.linkStartOpenLibrary) Me.panelAllMenuItems.Controls.Add(Me.linkStartOpenFile) @@ -580,70 +580,72 @@ Partial Class ucrDataView Me.panelAllMenuItems.TabIndex = 7 Me.panelAllMenuItems.Visible = False ' - 'linkNewsletter - ' - Me.linkNewsletter.ActiveLinkColor = System.Drawing.Color.Blue - Me.linkNewsletter.AutoSize = True - Me.linkNewsletter.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkNewsletter.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkNewsletter.Location = New System.Drawing.Point(30, 409) - Me.linkNewsletter.Name = "linkNewsletter" - Me.linkNewsletter.Size = New System.Drawing.Size(95, 13) - Me.linkNewsletter.TabIndex = 11 - Me.linkNewsletter.TabStop = True - Me.linkNewsletter.Text = "Join our newsletter" - ' - 'linkGithub - ' - Me.linkGithub.ActiveLinkColor = System.Drawing.Color.Blue - Me.linkGithub.AutoSize = True - Me.linkGithub.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkGithub.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkGithub.Location = New System.Drawing.Point(30, 390) - Me.linkGithub.Name = "linkGithub" - Me.linkGithub.Size = New System.Drawing.Size(88, 13) - Me.linkGithub.TabIndex = 10 - Me.linkGithub.TabStop = True - Me.linkGithub.Text = "GitHub repository" - ' - 'linkProductDoc - ' - Me.linkProductDoc.ActiveLinkColor = System.Drawing.Color.Blue - Me.linkProductDoc.AutoSize = True - Me.linkProductDoc.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkProductDoc.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkProductDoc.Location = New System.Drawing.Point(30, 371) - Me.linkProductDoc.Name = "linkProductDoc" - Me.linkProductDoc.Size = New System.Drawing.Size(117, 13) - Me.linkProductDoc.TabIndex = 9 - Me.linkProductDoc.TabStop = True - Me.linkProductDoc.Text = "Product documentation" - ' - 'linkHelpTipsTricks - ' - Me.linkHelpTipsTricks.ActiveLinkColor = System.Drawing.Color.Blue - Me.linkHelpTipsTricks.AutoSize = True - Me.linkHelpTipsTricks.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpTipsTricks.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpTipsTricks.Location = New System.Drawing.Point(30, 352) - Me.linkHelpTipsTricks.Name = "linkHelpTipsTricks" - Me.linkHelpTipsTricks.Size = New System.Drawing.Size(80, 13) - Me.linkHelpTipsTricks.TabIndex = 8 - Me.linkHelpTipsTricks.TabStop = True - Me.linkHelpTipsTricks.Text = "Tips and Tricks" - ' - 'linkHelpVideos - ' - Me.linkHelpVideos.ActiveLinkColor = System.Drawing.Color.Blue - Me.linkHelpVideos.AutoSize = True - Me.linkHelpVideos.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpVideos.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpVideos.Location = New System.Drawing.Point(30, 333) - Me.linkHelpVideos.Name = "linkHelpVideos" - Me.linkHelpVideos.Size = New System.Drawing.Size(97, 13) - Me.linkHelpVideos.TabIndex = 7 - Me.linkHelpVideos.TabStop = True - Me.linkHelpVideos.Text = "Introductory videos" + 'linkHelpMoreToCome + ' + Me.linkHelpMoreToCome.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkHelpMoreToCome.AutoSize = True + Me.linkHelpMoreToCome.Enabled = False + Me.linkHelpMoreToCome.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkHelpMoreToCome.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkHelpMoreToCome.Location = New System.Drawing.Point(30, 409) + Me.linkHelpMoreToCome.Name = "linkHelpMoreToCome" + Me.linkHelpMoreToCome.Size = New System.Drawing.Size(72, 13) + Me.linkHelpMoreToCome.TabIndex = 11 + Me.linkHelpMoreToCome.TabStop = True + Me.linkHelpMoreToCome.Text = "More to come" + ' + 'linkHelpInstructionVideos + ' + Me.linkHelpInstructionVideos.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkHelpInstructionVideos.AutoSize = True + Me.linkHelpInstructionVideos.Enabled = False + Me.linkHelpInstructionVideos.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkHelpInstructionVideos.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkHelpInstructionVideos.Location = New System.Drawing.Point(30, 390) + Me.linkHelpInstructionVideos.Name = "linkHelpInstructionVideos" + Me.linkHelpInstructionVideos.Size = New System.Drawing.Size(98, 13) + Me.linkHelpInstructionVideos.TabIndex = 10 + Me.linkHelpInstructionVideos.TabStop = True + Me.linkHelpInstructionVideos.Text = "Instructional videos" + ' + 'linkHelpRInstatWebsite + ' + Me.linkHelpRInstatWebsite.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkHelpRInstatWebsite.AutoSize = True + Me.linkHelpRInstatWebsite.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkHelpRInstatWebsite.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkHelpRInstatWebsite.Location = New System.Drawing.Point(30, 371) + Me.linkHelpRInstatWebsite.Name = "linkHelpRInstatWebsite" + Me.linkHelpRInstatWebsite.Size = New System.Drawing.Size(83, 13) + Me.linkHelpRInstatWebsite.TabIndex = 9 + Me.linkHelpRInstatWebsite.TabStop = True + Me.linkHelpRInstatWebsite.Text = "R-Instat website" + ' + 'linkHelpRpackages + ' + Me.linkHelpRpackages.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkHelpRpackages.AutoSize = True + Me.linkHelpRpackages.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkHelpRpackages.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkHelpRpackages.Location = New System.Drawing.Point(30, 352) + Me.linkHelpRpackages.Name = "linkHelpRpackages" + Me.linkHelpRpackages.Size = New System.Drawing.Size(116, 13) + Me.linkHelpRpackages.TabIndex = 8 + Me.linkHelpRpackages.TabStop = True + Me.linkHelpRpackages.Text = "R-packages in R-Instat" + ' + 'linkHelpIntroduction + ' + Me.linkHelpIntroduction.ActiveLinkColor = System.Drawing.Color.Blue + Me.linkHelpIntroduction.AutoSize = True + Me.linkHelpIntroduction.ImeMode = System.Windows.Forms.ImeMode.NoControl + Me.linkHelpIntroduction.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline + Me.linkHelpIntroduction.Location = New System.Drawing.Point(30, 333) + Me.linkHelpIntroduction.Name = "linkHelpIntroduction" + Me.linkHelpIntroduction.Size = New System.Drawing.Size(63, 13) + Me.linkHelpIntroduction.TabIndex = 7 + Me.linkHelpIntroduction.TabStop = True + Me.linkHelpIntroduction.Text = "Introduction" ' 'panelRecentMenuItems ' @@ -663,10 +665,10 @@ Partial Class ucrDataView Me.linkStartOpenLibrary.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline Me.linkStartOpenLibrary.Location = New System.Drawing.Point(30, 87) Me.linkStartOpenLibrary.Name = "linkStartOpenLibrary" - Me.linkStartOpenLibrary.Size = New System.Drawing.Size(98, 13) + Me.linkStartOpenLibrary.Size = New System.Drawing.Size(95, 13) Me.linkStartOpenLibrary.TabIndex = 5 Me.linkStartOpenLibrary.TabStop = True - Me.linkStartOpenLibrary.Text = "Open from library ..." + Me.linkStartOpenLibrary.Text = "Open from library..." ' 'linkStartOpenFile ' @@ -676,10 +678,10 @@ Partial Class ucrDataView Me.linkStartOpenFile.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline Me.linkStartOpenFile.Location = New System.Drawing.Point(30, 68) Me.linkStartOpenFile.Name = "linkStartOpenFile" - Me.linkStartOpenFile.Size = New System.Drawing.Size(84, 13) + Me.linkStartOpenFile.Size = New System.Drawing.Size(81, 13) Me.linkStartOpenFile.TabIndex = 4 Me.linkStartOpenFile.TabStop = True - Me.linkStartOpenFile.Text = "Open from file ..." + Me.linkStartOpenFile.Text = "Open from file..." ' 'linkStartNewDataFrame ' @@ -689,10 +691,10 @@ Partial Class ucrDataView Me.linkStartNewDataFrame.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline Me.linkStartNewDataFrame.Location = New System.Drawing.Point(30, 49) Me.linkStartNewDataFrame.Name = "linkStartNewDataFrame" - Me.linkStartNewDataFrame.Size = New System.Drawing.Size(87, 13) + Me.linkStartNewDataFrame.Size = New System.Drawing.Size(96, 13) Me.linkStartNewDataFrame.TabIndex = 3 Me.linkStartNewDataFrame.TabStop = True - Me.linkStartNewDataFrame.Text = "New Data Frame" + Me.linkStartNewDataFrame.Text = "New Data Frame..." ' 'lblHelp ' @@ -819,9 +821,9 @@ Partial Class ucrDataView Friend WithEvents lblRecent As Label Friend WithEvents lblStart As Label Friend WithEvents panelRecentMenuItems As Panel - Friend WithEvents linkNewsletter As LinkLabel - Friend WithEvents linkGithub As LinkLabel - Friend WithEvents linkProductDoc As LinkLabel - Friend WithEvents linkHelpTipsTricks As LinkLabel - Friend WithEvents linkHelpVideos As LinkLabel + Friend WithEvents linkHelpMoreToCome As LinkLabel + Friend WithEvents linkHelpInstructionVideos As LinkLabel + Friend WithEvents linkHelpRInstatWebsite As LinkLabel + Friend WithEvents linkHelpRpackages As LinkLabel + Friend WithEvents linkHelpIntroduction As LinkLabel End Class diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 76ccdea35c5..2d6fe3f1a30 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -917,4 +917,16 @@ Public Class ucrDataView panelRecentMenuItems.Controls.Add(linkMenuItem) panelRecentMenuItems.Controls.Add(lblMenuItemPath) End Sub + + Private Sub linkHelpIntroduction_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpIntroduction.LinkClicked + Help.ShowHelp(frmMain, frmMain.strStaticPath & "\" & frmMain.strHelpFilePath, HelpNavigator.TopicId, "0") + End Sub + + Private Sub linkHelpRpackages_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpRpackages.LinkClicked + dlgHelpVignettes.ShowDialog() + End Sub + + Private Sub linkHelpRInstatWebsite_LinkClicked(sender As Object, e As LinkLabelLinkClickedEventArgs) Handles linkHelpRInstatWebsite.LinkClicked + Process.Start("http://r-instat.org/") + End Sub End Class From 39ddec565bc50559bebc1f51994c182e79e6da9f Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 16 Oct 2020 11:37:23 +0300 Subject: [PATCH 225/277] Proper linking of the controls --- instat/dlgVisualizeData.vb | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 38c72232440..318ef6f51b2 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -23,8 +23,6 @@ Public Class dlgVisualizeData Private clsVisMissFunction As New RFunction Private clsVisGuessFunction As New RFunction Private clsCurrBaseFunction As New RFunction - Dim dctPalette As New Dictionary(Of String, String) - Dim dctPaletteGuess As New Dictionary(Of String, String) Private Sub dlgVisualizeData_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -41,6 +39,11 @@ Public Class dlgVisualizeData End Sub Private Sub InitialiseDialog() + Dim lstMaximumControls As New List(Of Control) + Dim lstMaximumSizeControls As New List(Of Control) + Dim dctPalette As New Dictionary(Of String, String) + Dim dctPaletteGuess As New Dictionary(Of String, String) + ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False ucrBase.clsRsyntax.iCallType = 3 @@ -79,7 +82,6 @@ Public Class dlgVisualizeData dctPalette.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) ucrInputComboboxPalette.SetDropDownStyleAsNonEditable() ucrInputComboboxPalette.SetItems(dctPalette) - ucrInputComboboxPalette.bAllowNonConditionValues = True ucrInputComboboxPaletteGuess.SetParameter(New RParameter("palette", 1)) dctPaletteGuess.Add("default", Chr(34) & "default" & Chr(34)) @@ -87,7 +89,6 @@ Public Class dlgVisualizeData dctPaletteGuess.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) ucrInputComboboxPaletteGuess.SetDropDownStyleAsNonEditable() ucrInputComboboxPaletteGuess.SetItems(dctPaletteGuess) - ucrInputComboboxPaletteGuess.bAllowNonConditionValues = True ucrNudMaximumSize.SetParameter(New RParameter("large_data_size", 4)) ucrNudMaximumSize.DecimalPlaces = 1 @@ -107,10 +108,13 @@ Public Class dlgVisualizeData ucrInputComboboxPalette.SetLinkedDisplayControl(lblPaltte) ucrInputComboboxPaletteGuess.SetLinkedDisplayControl(lblPalette) - ucrNudMaximum.SetLinkedDisplayControl(lblMaximumS) - ucrNudMaximumSize.SetLinkedDisplayControl(lblMaximumSize) - ucrNudMaximumSize.SetLinkedDisplayControl(lblMillionDataPoints) - ucrNudMaximum.SetLinkedDisplayControl(lblDataPoints) + lstMaximumControls.Add(lblMaximumS) + lstMaximumControls.Add(lblDataPoints) + ucrNudMaximum.SetLinkedDisplayControl(lstMaximumControls) + lstMaximumSizeControls.Add(lblMillionDataPoints) + lstMaximumSizeControls.Add(lblMaximumSize) + ucrNudMaximumSize.SetLinkedDisplayControl(lstMaximumSizeControls) + ucrNudSamplingFunction.SetLinkedDisplayControl(lblSampling) ucrPnlSelectData.AddToLinkedControls(ucrReceiverVisualizeData, {rdoSelectedColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) @@ -184,6 +188,9 @@ Public Class dlgVisualizeData SetDefaults() SetRCodeForControls(True) TestOkEnabled() + ' Temporary fix for resetting the maximum value when the default is not changed + ConvertToDecimal() + MaximumDataPoint() End Sub Private Sub ucrCore_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVisualizeData.ControlContentsChanged, ucrSelectorVisualizeData.ControlContentsChanged, ucrPnlSelectData.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged @@ -221,21 +228,29 @@ Public Class dlgVisualizeData End If End Sub - Private Sub ucrControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSelectData.ControlValueChanged, ucrSelectorVisualizeData.ControlValueChanged, ucrReceiverVisualizeData.ControlValueChanged + Private Sub ucrControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSelectData.ControlValueChanged, ucrSelectorVisualizeData.ControlValueChanged, ucrReceiverVisualizeData.ControlValueChanged, ucrInputComboboxPalette.ControlValueChanged, ucrInputComboboxPaletteGuess.ControlValueChanged AddRemoveDataHideOptionsButtons() End Sub - Private Sub ucrNudMaximumSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaximumSize.ControlValueChanged + Private Sub ConvertToDecimal() Dim Value As Decimal = System.Convert.ToDecimal(ucrNudMaximumSize.GetText()) Dim strLargeDataSizeParamVal As Integer = Value * 1000000 clsVisDatFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=4) End Sub - Private Sub ucrNudMaximum_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaximum.ControlValueChanged + Private Sub MaximumDataPoint() Dim Value As Decimal = System.Convert.ToDecimal(ucrNudMaximum.GetText()) Dim strLargeDataSizeParamVal As Integer = Value * 1000000 clsVisMissFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=5) End Sub + + Private Sub ucrNudMaximumSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaximumSize.ControlValueChanged + ConvertToDecimal() + End Sub + + Private Sub ucrNudMaximum_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaximum.ControlValueChanged + MaximumDataPoint() + End Sub End Class \ No newline at end of file From 9345277963759b6b020545d5900b3d52bc73de05 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Fri, 16 Oct 2020 13:46:54 +0300 Subject: [PATCH 226/277] Geberal improvements to the dialog --- instat/dlgVisualizeData.Designer.vb | 52 ++++++++++++++--------------- instat/dlgVisualizeData.vb | 4 +-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index d27fa733eb1..69c15dec724 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -100,7 +100,7 @@ Partial Class dlgVisualizeData 'rdoWholeDataFrame ' Me.rdoWholeDataFrame.AutoSize = True - Me.rdoWholeDataFrame.Location = New System.Drawing.Point(243, 80) + Me.rdoWholeDataFrame.Location = New System.Drawing.Point(268, 69) Me.rdoWholeDataFrame.Name = "rdoWholeDataFrame" Me.rdoWholeDataFrame.Size = New System.Drawing.Size(80, 17) Me.rdoWholeDataFrame.TabIndex = 6 @@ -111,7 +111,7 @@ Partial Class dlgVisualizeData 'rdoSelectedColumn ' Me.rdoSelectedColumn.AutoSize = True - Me.rdoSelectedColumn.Location = New System.Drawing.Point(243, 103) + Me.rdoSelectedColumn.Location = New System.Drawing.Point(268, 92) Me.rdoSelectedColumn.Name = "rdoSelectedColumn" Me.rdoSelectedColumn.Size = New System.Drawing.Size(113, 17) Me.rdoSelectedColumn.TabIndex = 7 @@ -122,7 +122,7 @@ Partial Class dlgVisualizeData 'lblPalette ' Me.lblPalette.AutoSize = True - Me.lblPalette.Location = New System.Drawing.Point(22, 272) + Me.lblPalette.Location = New System.Drawing.Point(10, 269) Me.lblPalette.Name = "lblPalette" Me.lblPalette.Size = New System.Drawing.Size(43, 13) Me.lblPalette.TabIndex = 13 @@ -131,7 +131,7 @@ Partial Class dlgVisualizeData 'lblMaximumSize ' Me.lblMaximumSize.AutoSize = True - Me.lblMaximumSize.Location = New System.Drawing.Point(5, 305) + Me.lblMaximumSize.Location = New System.Drawing.Point(10, 296) Me.lblMaximumSize.Name = "lblMaximumSize" Me.lblMaximumSize.Size = New System.Drawing.Size(77, 13) Me.lblMaximumSize.TabIndex = 15 @@ -140,7 +140,7 @@ Partial Class dlgVisualizeData 'lblMillionDataPoints ' Me.lblMillionDataPoints.AutoSize = True - Me.lblMillionDataPoints.Location = New System.Drawing.Point(154, 305) + Me.lblMillionDataPoints.Location = New System.Drawing.Point(149, 296) Me.lblMillionDataPoints.Name = "lblMillionDataPoints" Me.lblMillionDataPoints.Size = New System.Drawing.Size(94, 13) Me.lblMillionDataPoints.TabIndex = 16 @@ -149,7 +149,7 @@ Partial Class dlgVisualizeData 'lblPaltte ' Me.lblPaltte.AutoSize = True - Me.lblPaltte.Location = New System.Drawing.Point(22, 272) + Me.lblPaltte.Location = New System.Drawing.Point(10, 269) Me.lblPaltte.Name = "lblPaltte" Me.lblPaltte.Size = New System.Drawing.Size(43, 13) Me.lblPaltte.TabIndex = 21 @@ -158,7 +158,7 @@ Partial Class dlgVisualizeData 'lblMaximumS ' Me.lblMaximumS.AutoSize = True - Me.lblMaximumS.Location = New System.Drawing.Point(5, 305) + Me.lblMaximumS.Location = New System.Drawing.Point(10, 296) Me.lblMaximumS.Name = "lblMaximumS" Me.lblMaximumS.Size = New System.Drawing.Size(77, 13) Me.lblMaximumS.TabIndex = 24 @@ -167,7 +167,7 @@ Partial Class dlgVisualizeData 'lblDataPoints ' Me.lblDataPoints.AutoSize = True - Me.lblDataPoints.Location = New System.Drawing.Point(154, 305) + Me.lblDataPoints.Location = New System.Drawing.Point(149, 296) Me.lblDataPoints.Name = "lblDataPoints" Me.lblDataPoints.Size = New System.Drawing.Size(94, 13) Me.lblDataPoints.TabIndex = 25 @@ -177,7 +177,7 @@ Partial Class dlgVisualizeData ' Me.lblSampling.AutoSize = True Me.lblSampling.Enabled = False - Me.lblSampling.Location = New System.Drawing.Point(213, 268) + Me.lblSampling.Location = New System.Drawing.Point(238, 245) Me.lblSampling.Name = "lblSampling" Me.lblSampling.Size = New System.Drawing.Size(94, 13) Me.lblSampling.TabIndex = 27 @@ -188,7 +188,7 @@ Partial Class dlgVisualizeData Me.ucrNudSamplingFunction.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSamplingFunction.Enabled = False Me.ucrNudSamplingFunction.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudSamplingFunction.Location = New System.Drawing.Point(313, 265) + Me.ucrNudSamplingFunction.Location = New System.Drawing.Point(338, 242) Me.ucrNudSamplingFunction.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudSamplingFunction.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudSamplingFunction.Name = "ucrNudSamplingFunction" @@ -200,7 +200,7 @@ Partial Class dlgVisualizeData ' Me.ucrNudMaximum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaximum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaximum.Location = New System.Drawing.Point(98, 302) + Me.ucrNudMaximum.Location = New System.Drawing.Point(93, 293) Me.ucrNudMaximum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaximum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaximum.Name = "ucrNudMaximum" @@ -212,7 +212,7 @@ Partial Class dlgVisualizeData ' Me.ucrNudMaximumSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaximumSize.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaximumSize.Location = New System.Drawing.Point(98, 302) + Me.ucrNudMaximumSize.Location = New System.Drawing.Point(93, 293) Me.ucrNudMaximumSize.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) Me.ucrNudMaximumSize.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) Me.ucrNudMaximumSize.Name = "ucrNudMaximumSize" @@ -225,15 +225,15 @@ Partial Class dlgVisualizeData Me.ucrInputComboboxPaletteGuess.AddQuotesIfUnrecognised = True Me.ucrInputComboboxPaletteGuess.GetSetSelectedIndex = -1 Me.ucrInputComboboxPaletteGuess.IsReadOnly = False - Me.ucrInputComboboxPaletteGuess.Location = New System.Drawing.Point(97, 268) + Me.ucrInputComboboxPaletteGuess.Location = New System.Drawing.Point(58, 266) Me.ucrInputComboboxPaletteGuess.Name = "ucrInputComboboxPaletteGuess" - Me.ucrInputComboboxPaletteGuess.Size = New System.Drawing.Size(52, 21) + Me.ucrInputComboboxPaletteGuess.Size = New System.Drawing.Size(85, 21) Me.ucrInputComboboxPaletteGuess.TabIndex = 20 ' 'ucrChkSortMiss ' Me.ucrChkSortMiss.Checked = False - Me.ucrChkSortMiss.Location = New System.Drawing.Point(6, 244) + Me.ucrChkSortMiss.Location = New System.Drawing.Point(13, 242) Me.ucrChkSortMiss.Name = "ucrChkSortMiss" Me.ucrChkSortMiss.Size = New System.Drawing.Size(145, 20) Me.ucrChkSortMiss.TabIndex = 19 @@ -241,7 +241,7 @@ Partial Class dlgVisualizeData 'ucrChkSortVariables ' Me.ucrChkSortVariables.Checked = False - Me.ucrChkSortVariables.Location = New System.Drawing.Point(6, 244) + Me.ucrChkSortVariables.Location = New System.Drawing.Point(13, 242) Me.ucrChkSortVariables.Name = "ucrChkSortVariables" Me.ucrChkSortVariables.Size = New System.Drawing.Size(145, 20) Me.ucrChkSortVariables.TabIndex = 18 @@ -251,15 +251,15 @@ Partial Class dlgVisualizeData Me.ucrInputComboboxPalette.AddQuotesIfUnrecognised = True Me.ucrInputComboboxPalette.GetSetSelectedIndex = -1 Me.ucrInputComboboxPalette.IsReadOnly = False - Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(97, 268) + Me.ucrInputComboboxPalette.Location = New System.Drawing.Point(58, 266) Me.ucrInputComboboxPalette.Name = "ucrInputComboboxPalette" - Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(52, 21) + Me.ucrInputComboboxPalette.Size = New System.Drawing.Size(85, 21) Me.ucrInputComboboxPalette.TabIndex = 12 ' 'ucrReceiverVisualizeData ' Me.ucrReceiverVisualizeData.frmParent = Me - Me.ucrReceiverVisualizeData.Location = New System.Drawing.Point(243, 130) + Me.ucrReceiverVisualizeData.Location = New System.Drawing.Point(268, 119) Me.ucrReceiverVisualizeData.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverVisualizeData.Name = "ucrReceiverVisualizeData" Me.ucrReceiverVisualizeData.Selector = Nothing @@ -270,9 +270,9 @@ Partial Class dlgVisualizeData ' 'ucrPnlSelectData ' - Me.ucrPnlSelectData.Location = New System.Drawing.Point(235, 80) + Me.ucrPnlSelectData.Location = New System.Drawing.Point(256, 69) Me.ucrPnlSelectData.Name = "ucrPnlSelectData" - Me.ucrPnlSelectData.Size = New System.Drawing.Size(133, 40) + Me.ucrPnlSelectData.Size = New System.Drawing.Size(132, 49) Me.ucrPnlSelectData.TabIndex = 5 ' 'ucrPnlVisualizeData @@ -284,10 +284,10 @@ Partial Class dlgVisualizeData ' 'ucrSaveGraph ' - Me.ucrSaveGraph.Location = New System.Drawing.Point(4, 330) + Me.ucrSaveGraph.Location = New System.Drawing.Point(13, 321) Me.ucrSaveGraph.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5) Me.ucrSaveGraph.Name = "ucrSaveGraph" - Me.ucrSaveGraph.Size = New System.Drawing.Size(264, 24) + Me.ucrSaveGraph.Size = New System.Drawing.Size(282, 24) Me.ucrSaveGraph.TabIndex = 9 ' 'ucrSelectorVisualizeData @@ -295,7 +295,7 @@ Partial Class dlgVisualizeData Me.ucrSelectorVisualizeData.bDropUnusedFilterLevels = False Me.ucrSelectorVisualizeData.bShowHiddenColumns = False Me.ucrSelectorVisualizeData.bUseCurrentFilter = True - Me.ucrSelectorVisualizeData.Location = New System.Drawing.Point(10, 50) + Me.ucrSelectorVisualizeData.Location = New System.Drawing.Point(13, 50) Me.ucrSelectorVisualizeData.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorVisualizeData.Name = "ucrSelectorVisualizeData" Me.ucrSelectorVisualizeData.Size = New System.Drawing.Size(210, 180) @@ -303,7 +303,7 @@ Partial Class dlgVisualizeData ' 'ucrBase ' - Me.ucrBase.Location = New System.Drawing.Point(4, 358) + Me.ucrBase.Location = New System.Drawing.Point(5, 349) Me.ucrBase.Name = "ucrBase" Me.ucrBase.Size = New System.Drawing.Size(410, 52) Me.ucrBase.TabIndex = 10 @@ -312,7 +312,7 @@ Partial Class dlgVisualizeData ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(417, 413) + Me.ClientSize = New System.Drawing.Size(417, 405) Me.Controls.Add(Me.lblSampling) Me.Controls.Add(Me.ucrNudSamplingFunction) Me.Controls.Add(Me.lblDataPoints) diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 318ef6f51b2..e796fa73fe3 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -56,9 +56,9 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisGuess, "vis_guess") ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat}, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortMiss, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPaletteGuess, {rdoVisGuess}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPaletteGuess, {rdoVisGuess}, bNewLinkedHideIfParameterMissing:=True) ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximumSize, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.9) ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximum, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.9) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) From 676a98b47f5132ba9a5c1ba012c58d5bba11d359 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Fri, 16 Oct 2020 18:07:49 +0100 Subject: [PATCH 227/277] added tooltips and column number required to labels modified R code to allow flag columns in "day" format and updated code to use pivot_longer, pivot_wider --- instat/dlgTidyDailyData.Designer.vb | 3 + instat/dlgTidyDailyData.resx | 87 ++++++-------- instat/dlgTidyDailyData.vb | 11 +- .../static/InstatObject/R/instat_object_R6.R | 107 +++++++++++++----- 4 files changed, 127 insertions(+), 81 deletions(-) diff --git a/instat/dlgTidyDailyData.Designer.vb b/instat/dlgTidyDailyData.Designer.vb index e13371df215..7ff9416b679 100644 --- a/instat/dlgTidyDailyData.Designer.vb +++ b/instat/dlgTidyDailyData.Designer.vb @@ -22,6 +22,7 @@ Partial Class dlgTidyDailyData 'Do not modify it using the code editor. Private Sub InitializeComponent() + Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(dlgTidyDailyData)) Me.lblColumnPer = New System.Windows.Forms.Label() Me.rdoDay = New System.Windows.Forms.RadioButton() @@ -51,6 +52,7 @@ Partial Class dlgTidyDailyData Me.ucrBase = New instat.ucrButtons() Me.ucrInputNewDataFrame = New instat.ucrInputTextBox() Me.lblNewDataFrameName = New System.Windows.Forms.Label() + Me.ttReshapeType = New System.Windows.Forms.ToolTip(Me.components) Me.grpElements.SuspendLayout() Me.grpOptions.SuspendLayout() Me.SuspendLayout() @@ -319,4 +321,5 @@ Partial Class dlgTidyDailyData Friend WithEvents grpOptions As GroupBox Friend WithEvents lblNewDataFrameName As Label Friend WithEvents ucrInputNewDataFrame As ucrInputTextBox + Friend WithEvents ttReshapeType As ToolTip End Class diff --git a/instat/dlgTidyDailyData.resx b/instat/dlgTidyDailyData.resx index d856528c595..d5cef0eeb3b 100644 --- a/instat/dlgTidyDailyData.resx +++ b/instat/dlgTidyDailyData.resx @@ -157,16 +157,16 @@ NoControl - 282, 30 + 284, 30 - 113, 27 + 120, 27 3 - Day Columns (31) + Day Columns (31/62) MiddleCenter @@ -193,10 +193,10 @@ NoControl - 171, 30 + 166, 30 - 113, 27 + 120, 27 2 @@ -229,10 +229,10 @@ NoControl - 60, 30 + 48, 30 - 113, 27 + 120, 27 1 @@ -573,6 +573,15 @@ 1 + + 8, 19 + + + 209, 20 + + + 22 + ucrChkIgnoreInvalid @@ -585,6 +594,15 @@ 0 + + 8, 53 + + + 209, 20 + + + 23 + ucrChkSilent @@ -718,10 +736,10 @@ 12 - 60, 26 + 41, 26 - 335, 35 + 372, 35 0 @@ -813,6 +831,12 @@ Tidy Daily Data + + ttReshapeType + + + System.Windows.Forms.ToolTip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + dlgTidyDailyData @@ -864,46 +888,7 @@ 3 - - 8, 19 - - - 209, 20 - - - 22 - - - ucrChkIgnoreInvalid - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpOptions - - - 0 - - - 8, 53 - - - 209, 20 - - - 23 - - - ucrChkSilent - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpOptions - - - 1 - + + 17, 17 + \ No newline at end of file diff --git a/instat/dlgTidyDailyData.vb b/instat/dlgTidyDailyData.vb index c6e3aba1574..838c8cde746 100644 --- a/instat/dlgTidyDailyData.vb +++ b/instat/dlgTidyDailyData.vb @@ -52,10 +52,13 @@ Public Class dlgTidyDailyData ucrPnlReshapeClimaticData.AddRadioButton(rdoMonth) ucrPnlReshapeClimaticData.AddRadioButton(rdoDay) + ttReshapeType.SetToolTip(rdoYear, "One column for each year") + ttReshapeType.SetToolTip(rdoMonth, "One column for each month (12)") + ttReshapeType.SetToolTip(rdoDay, "One column for each day in month (31), or alternative value/flag columns for each day in month (62)") + ucrSelectorTidyDailyData.SetParameter(New RParameter("x", 0)) ucrSelectorTidyDailyData.SetParameterIsrfunction() - ucrReceiverStation.Selector = ucrSelectorTidyDailyData ucrReceiverMultipleStack.Selector = ucrSelectorTidyDailyData ucrReceiverElement.Selector = ucrSelectorTidyDailyData @@ -67,7 +70,6 @@ Public Class dlgTidyDailyData ucrReceiverMultipleStack.SetParameter(New RParameter("stack_cols", 2)) ucrReceiverMultipleStack.SetParameterIsString() - ucrReceiverStation.SetParameter(New RParameter("station", 6)) ucrReceiverStation.SetParameterIsString() @@ -205,10 +207,13 @@ Public Class dlgTidyDailyData Private Sub ColumnstoStackText() If rdoYear.Checked Then lblColumnstoStack.Text = "Year Columns:" + ttReshapeType.SetToolTip(lblColumnstoStack, ttReshapeType.GetToolTip(rdoYear)) ElseIf rdoMonth.Checked Then lblColumnstoStack.Text = "Month Columns (12):" + ttReshapeType.SetToolTip(lblColumnstoStack, ttReshapeType.GetToolTip(rdoMonth)) Else - lblColumnstoStack.Text = "Day Columns (31):" + lblColumnstoStack.Text = "Day Columns (31/62):" + ttReshapeType.SetToolTip(lblColumnstoStack, ttReshapeType.GetToolTip(rdoDay)) End If End Sub diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index e4b7ead5622..e5d338a7e6d 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1822,6 +1822,8 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r #' If FALSE (the default) an error will be given with details of where the values occur. #' Strongly recommended to first run with FALSE and then TRUE after examining or correcting any issues. #' @param silent If TRUE, rows with non missing element values on invalid dates will not be reported. +#' @param unstack_elements If TRUE, when there are multiple elements there will be one column for each element (unstacked), otherwise there will be an element +#' column and a value column. This also applies to flag columns if included. #' @param new_name Name for the new data frame. #' @export #' @examples @@ -1831,11 +1833,10 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r #' yearcols[60,4:6] <- NA #' tidy_climatic_data(x = yearcols, format = "years", stack_cols = c("X2000", "X2001", "X2002", "X2003"), element_name = "tmin") -DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, month, year, stack_years, station, element, element_name = "value", ignore_invalid = FALSE, silent = FALSE, new_name) { +DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, month, year, stack_years, station, element, element_name = "value", ignore_invalid = FALSE, silent = FALSE, unstack_elements = TRUE, new_name) { if(!format %in% c("days", "months", "years")) stop("format must be either 'days', 'months' or 'years'") if(!all(stack_cols %in% names(x))) stop("Some of the stack_cols were not found in x.") - if(!all(sapply(x[, stack_cols], function(col) is.numeric(col) || (is.logical(col) && all(is.na(col)))))) stop("All stack_cols must be numeric\nThe following stack_cols are not numeric: ", paste(stack_cols[!sapply(x[, stack_cols], is.numeric)], collapse = ",")) if(!missing(day) && !day %in% names(x)) stop("day column not found in x.") if(!missing(month) && !month %in% names(x)) stop("month column not found in x.") if(!missing(year) && !year %in% names(x)) stop("year column not found in x.") @@ -1869,6 +1870,14 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, # Month format will be used in as.Date() month_format <- "%m" } + # This case is for numeric months but stored as character e.g. c("1", "2") + else if(all(!is.na(as.numeric(month_data)))) { + if(all(as.numeric(month_data) %in% 1:12)) { + month_format <- "%m" + # This ensures format is correct and removes any spaces etc. e.g. "1 " -> 1 + x[[month]] <- as.numeric(month_data) + } + } else { # Convert to title case to match month.name and month.abb month_data_title <- stringr::str_to_title(month_data) @@ -1894,19 +1903,20 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(!missing(year)) { year_data <- x[[year]] if(anyNA(year_data)) stop("year column contains: ", sum(is.na(year_data)), " missing values") - if(!is.numeric(year_data)) stop("year column must be numeric") - year_format <- "" + if(!is.numeric(year_data)) { + if(all(!is.na(as.numeric(year_data)))) { + x[[year]] <- as.numeric(year_data) + year_data <- x[[year]] + } + else stop("Cannot recognise years from year column. Try using a numeric year column.") + } if(all(stringr::str_length(year_data) == 4)) year_format <- "%Y" else if(all(stringr::str_length(year_data) == 2)) year_format <- "%y" - else { - stop("Inconsistent values found in year column. Year column must be column of four digit years or column of two digit years") - } + else stop("Inconsistent values found in year column. Year column must be column of four digit years or column of two digit years") } - if(format == "days") { - # month column required in this case if(missing(month)) stop("month column is required when format == 'days'") @@ -1914,7 +1924,21 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(missing(year)) stop("year column is required when format == 'days'") # stack column checks - if(length(stack_cols) != 31) stop("You have specified: ", length(stack_cols), " stack columns\nThere must be exactly 31 stack columns when format == 'days'") + if(length(stack_cols) != 31 && length(stack_cols) != 62) stop("You have specified: ", length(stack_cols), " stack columns\nThere must be exactly 31 or 62 stack columns when format == 'days'") + + # TRUE if flag columns are included + flags <- length(stack_cols) == 62 + if(flags) { + # We assume that value/flag columns alternate and are in correct order i.e. c(value1, flag1, value2, flag2, ..., value31, flag31) + val_col_names <- stack_cols[seq(1, 61, 2)] + flag_col_names <- stack_cols[seq(2, 62, 2)] + if(!all(sapply(x[, val_col_names], function(col) is.numeric(col) || (is.logical(col) && all(is.na(col)))))) stop("Every other column must be numeric to represent values (starting with the first columns). \nThe following value columns are not numeric: ", paste(stack_cols[!sapply(x[, val_col_names], is.numeric)], collapse = ",")) + # Name of flag column + flag_name <- "flag" + } + else { + if(!all(sapply(x[, stack_cols], function(col) is.numeric(col) || (is.logical(col) && all(is.na(col)))))) stop("All stack_cols must be numeric\nThe following stack_cols are not numeric: ", paste(stack_cols[!sapply(x[, stack_cols], is.numeric)], collapse = ",")) + } # This ensures all other columns are dropped y <- data.frame(year = x[[year]], month = x[[month]], x[ , stack_cols]) @@ -1922,14 +1946,27 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(!missing(element)) y$element <- x[[element]] # In case element_name is the name of an existing column in y if(element_name %in% names(y)) element_name <- next_default_item(prefix = element_name, existing_names = names(y)) - y <- reshape2::melt(y, measure.vars = stack_cols, value.name = element_name, variable.name = "day") - - # This assumes stack_cols are in the correct order i.e. 1 - 31 - y$day <- as.numeric(y$day) + if(flags) { + # renaming the stack_cols with a consistent pattern makes it possible for pivot_longer to stack both sets of columns together and construct the day column correctly + # This assumes stack_cols are in the correct order i.e. c(value1, flag1, value2, flag2, ..., value31, flag31) + new_stack_cols <- paste(c("value", "flag"), rep(1:31, each = 2), sep = "_") + names(y)[names(y) %in% stack_cols] <- new_stack_cols + # ".value" is a special sentinel used in names_to ensure names of value columns come from the names of cols. See ?pivot_longer values_to section for details. + y <- tidyr::pivot_longer(y, cols = tidyselect::all_of(new_stack_cols), names_to = c(".value", "day"), names_sep = "_") + } + else { + # renaming the stack_cols so that the day column can be constructed correctly + # This assumes stack_cols are in the correct order i.e. 1 - 31 + new_stack_cols <- paste0("day", 1:31) + names(y)[names(y) %in% stack_cols] <- new_stack_cols + y <- tidyr::pivot_longer(y, cols = tidyselect::all_of(new_stack_cols), names_to = "day", values_to = element_name) + y$day <- substr(y$day, 4, 5) + } y$date <- as.Date(paste(y$year, y$month, y$day), format = paste(year_format, month_format, "%d")) } else if(format == "months") { + if(!all(sapply(x[, stack_cols], function(col) is.numeric(col) || (is.logical(col) && all(is.na(col)))))) stop("All stack_cols must be numeric\nThe following stack_cols are not numeric: ", paste(stack_cols[!sapply(x[, stack_cols], is.numeric)], collapse = ",")) # month column required in this case if(missing(day)) stop("day column is required when format == 'months'") @@ -1946,14 +1983,17 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(!missing(element)) y$element <- x[[element]] # In case element_name is the name of an existing column in y if(element_name %in% names(y)) element_name <- next_default_item(prefix = element_name, existing_names = names(y)) - y <- reshape2::melt(y, measure.vars = stack_cols, value.name = element_name, variable.name = "month") - + # renaming the stack_cols so that the day column can be constructed correctly # This assumes stack_cols are in the correct order i.e. 1 - 12 - y$month <- as.numeric(y$month) + new_stack_cols <- paste0("month", 1:12) + names(y)[names(y) %in% stack_cols] <- new_stack_cols + y <- tidyr::pivot_longer(y, cols = tidyselect::all_of(new_stack_cols), names_to = "month", values_to = element_name) + y$month <- substr(y$month, 6, 8) y$date <- as.Date(paste(y$year, y$month, y$day), format = paste(year_format, "%m", "%d")) } else if(format == "years") { + if(!all(sapply(x[, stack_cols], function(col) is.numeric(col) || (is.logical(col) && all(is.na(col)))))) stop("All stack_cols must be numeric\nThe following stack_cols are not numeric: ", paste(stack_cols[!sapply(x[, stack_cols], is.numeric)], collapse = ",")) by_cols <- c() if(!missing(station)) by_cols <- c(by_cols, station) @@ -1967,6 +2007,8 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(!missing(stack_years) && length(year_list) != length(stack_cols)) stop("stack_years must be the same length as stack_cols") + # stack_years allows to specify the years represented by stack_cols. + # If this is blank, attempt to infer stack_years by assuming stack_cols are in the format c("X1990", "X1991", ...) if(missing(stack_years)) { # Remove first character and convert to numeric stack_years <- as.numeric(stringr::str_sub(stack_cols, 2)) @@ -1983,12 +2025,11 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(!missing(element)) y$element <- x[[element]] # In case element_name is the name of an existing column in y if(element_name %in% names(y)) element_name <- next_default_item(prefix = element_name, existing_names = names(y)) - y <- reshape2::melt(y, measure.vars = stack_cols, value.name = element_name, variable.name = "year") + y <- tidyr::pivot_longer(y, cols = tidyselect::all_of(stack_cols), names_to = "year", values_to = element_name) # This assumes stack_cols and stack_years are in the same order y$year <- plyr::mapvalues(y$year, stack_cols, stack_years) - y$year <- as.numeric(levels(y$year))[y$year] - + # Replacing day 60 with 0 for non-leap years. This will result in NA dates. y$doy[(!lubridate::leap_year(y$year)) & y$doy == 60] <- 0 y$doy[(!lubridate::leap_year(y$year)) & y$doy > 60] <- y$doy[(!lubridate::leap_year(y$year)) & y$doy > 60] - 1 @@ -2029,22 +2070,34 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, } if(continue) { - # Standard format of slowest varying structure variables first (station then date) followed by measurements + # Standard format of slowest varying structure variables first (station then element then date) followed by measurements if(!missing(station)) z <- data.frame(station = y$station, date = y$date) else z <- data.frame(date = y$date) + if(!missing(element)) z$element <- y$element z[[element_name]] <- y[[element_name]] + if(flags) z[[flag_name]] <- y[[flag_name]] - if(!missing(element)) z$element <- y$element + # Initialise id columns used for sorting data + id_cols <- c() + if(!missing(station)) id_cols <- c(id_cols, "station") z <- dplyr::filter(z, !is.na(date)) - # If data contains multiple elements, unstack the element column + # If data contains multiple elements, optionally unstack the element column if(!missing(element)) { - z <- reshape2::dcast(z, ... ~ element, value.var = element_name) + if(unstack_elements) { + # pivot_wider allows unstacking multiple column sets, used when flags included. + values_from <- c(element_name) + if(flags) values_from <- c(values_from, flag_name) + z <- tidyr::pivot_wider(z, names_from = element, values_from = tidyselect::all_of(values_from)) + } + # If not unstacking then need to sort by element column + else id_cols <- c(id_cols, "element") } - if(!missing(station)) z <- z %>% dplyr::group_by(station) %>% dplyr::arrange(date, .by_group = TRUE) %>% ungroup() - else z <- z %>% dplyr::arrange(date) - + # Add this last to ensure date varies fastest + id_cols <- c(id_cols, "date") + #z <- z %>% dplyr::arrange(tidyselect::all_of(id_cols)) + if(missing(new_name) || new_name == "") new_name <- next_default_item("data", existing_names = self$get_data_names()) data_list <- list(z) names(data_list) <- new_name From e3c3e435b6969a5571a7a89ed93bbd11072e325a Mon Sep 17 00:00:00 2001 From: Shadrack Kibet Date: Sun, 18 Oct 2020 09:54:44 +0300 Subject: [PATCH 228/277] Update instat/dlgImportGriddedData.vb Co-authored-by: Danny Parsons --- instat/dlgImportGriddedData.vb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 53362c18f71..1ba3fefbcd5 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -156,7 +156,8 @@ Public Class dlgImportGriddedData dctFiles.Add("RFE2 Daily Precipitation", Chr(34) & "daily_rfev2_est_prcp" & Chr(34)) dctFiles.Add("RFE2 10-day Precipitation", Chr(34) & "10day_rfev2_est_prcp" & Chr(34)) dctFiles.Add("Daily estimated Precipitation", Chr(34) & "daily_est_prcp" & Chr(34)) - dctFiles.Add("Monthly estimated Precipitation", Chr(34) & "monthly_est_prcp" & Chr(34)) + dctFiles.Add("ARC2 Monthly Precipitation", Chr(34) & "monthly_est_prcp" & Chr(34)) + ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "RFE2 Daily Precipitation" ucrDtpMinDate.MinDate = New Date(2000, 10, 31) @@ -230,4 +231,4 @@ Public Class dlgImportGriddedData Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged, ucrPnlDateRange.ControlContentsChanged TestOkEnabled() End Sub -End Class \ No newline at end of file +End Class From 59a0b478d4886cd7765f9c520cf09c53901e9b25 Mon Sep 17 00:00:00 2001 From: Shadrack Kibet Date: Sun, 18 Oct 2020 09:55:06 +0300 Subject: [PATCH 229/277] Update instat/dlgImportGriddedData.vb Co-authored-by: Danny Parsons --- instat/dlgImportGriddedData.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 1ba3fefbcd5..0f1b2f7ac35 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -155,7 +155,8 @@ Public Class dlgImportGriddedData dctFiles = New Dictionary(Of String, String) dctFiles.Add("RFE2 Daily Precipitation", Chr(34) & "daily_rfev2_est_prcp" & Chr(34)) dctFiles.Add("RFE2 10-day Precipitation", Chr(34) & "10day_rfev2_est_prcp" & Chr(34)) - dctFiles.Add("Daily estimated Precipitation", Chr(34) & "daily_est_prcp" & Chr(34)) + dctFiles.Add("ARC2 Daily Precipitation", Chr(34) & "daily_est_prcp" & Chr(34)) + dctFiles.Add("ARC2 Monthly Precipitation", Chr(34) & "monthly_est_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) From 1e5ecef3401e9ace655037a20b28cedade42c49b Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Sun, 18 Oct 2020 14:12:35 +0300 Subject: [PATCH 230/277] adding dim_x, dim_y and dim_t as options --- .../static/InstatObject/R/instat_object_R6.R | 45 ++++++++++++---- .../InstatObject/R/stand_alone_functions.R | 51 ++++++++++--------- 2 files changed, 63 insertions(+), 33 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 431fb772c64..f6ecaa83e98 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2090,6 +2090,9 @@ DataBook$set("public","package_check", function(package) { DataBook$set("public", "download_from_IRI", function(source, data, path = tempdir(), min_lon, max_lon, min_lat, max_lat, min_date, max_date, name, download_type = "Point", import = TRUE) { init_URL <- "https://iridl.ldeo.columbia.edu/SOURCES/" + dim_x <- "X" + dim_y <- "Y" + dim_t <- "T" if (source == "UCSB_CHIRPS") { prexyaddress <- paste0(init_URL, ".UCSB/.CHIRPS/.v2p0") if (data == "daily_improved_global_0p25_prcp") { @@ -2107,28 +2110,50 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi else { stop("Data file does not exist for CHIRPS V2P0 data") } - } else if (source == "TAMSAT") { + } else if (source == "TAMSAT_v3.0") { + dim_x <- "lon" + dim_y <- "lat" + prexyaddress <- paste0(init_URL, ".Reading/.Meteorology/.TAMSAT/.TARCAT/.v3p0") + if (data == "daily_rfe") { + dim_t <- "time" + extension <- ".daily/.rfe" + } # grid: /time (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid + else if (data == "dekadal_rfe") { + extension <- ".dekadal/.rfe" + } # grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid + else if (data == "monthly_rfe") { + dim_t <- "time" + extension <- ".monthly/.rfe" + } # grid: /time (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid + else if (data == "monthly_rfe_calc") { + dim_t <- "time" + extension <- ".monthly/.rfe_calc" + } # grid: /time (months since 1960-01-01) ordered (Feb 1983) to (Sep 2020) by 1.0 N= 452 pts :grid + else { + stop("Data file does not exist for TAMSAT_v3.0 data") + } + } else if (source == "TAMSAT_v3.1") { prexyaddress <- paste0(init_URL, ".Reading/.Meteorology/.TAMSAT/.TARCAT/.v3p1") if (data == "daily_rfe") { extension <- ".daily/.rfe" } # grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid else if (data == "daily_rfe_filled") { - extension <- ".daily/.rfe_filled/" + extension <- ".daily/.rfe_filled" } # grid: /T (julian_day) ordered (1 Jan 1983) to (10 Sep 2020) by 1.0 N= 13768 pts :grid else if (data == "dekadal_rfe") { - extension <- ".dekadal/.rfe/" + extension <- ".dekadal/.rfe" } # grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid else if (data == "dekadal_rfe_filled") { - extension <- ".dekadal/.rfe_filled/" + extension <- ".dekadal/.rfe_filled" } # grid: /T (days since 1960-01-01) ordered [ (1-10 Jan 1983) (11-20 Jan 1983) (21-31 Jan 1983) ... (1-10 Sep 2020)] N= 1357 pts :grid else if (data == "monthly_rfe") { - extension <- ".monthly/.rfe/" + extension <- ".monthly/.rfe" } # grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid else if (data == "monthly_rfe_filled") { - extension <- ".monthly/.rfe_filled/" + extension <- ".monthly/.rfe_filled" } # grid: /T (months since 1960-01-01) ordered (Jan 1983) to (Aug 2020) by 1.0 N= 452 pts :grid else { - stop("Data file does not exist for TAMSAT data") + stop("Data file does not exist for TAMSAT_v3.1 data") } } else if (source == "NOAA") { prexyaddress <- paste0(init_URL, ".NOAA/.NCEP/.CPC/.FEWS/.Africa") @@ -2194,13 +2219,13 @@ DataBook$set("public", "download_from_IRI", function(source, data, path = tempdi } prexyaddress <- paste(prexyaddress, extension, sep = "/") if (download_type == "Area") { - URL <- add_xy_area_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, max_lon = max_lon, max_lat = max_lat) + URL <- add_xy_area_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, max_lon = max_lon, max_lat = max_lat, dim_x = dim_x, dim_y = dim_y) } else if (download_type == "Point") { - URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat) + URL <- add_xy_point_range(path = prexyaddress, min_lon = min_lon, min_lat = min_lat, dim_x = dim_x, dim_y = dim_y) } if (!missing(min_date) & !missing(max_date)) { - URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date) + URL <- URL %>% add_t_range(min_date = min_date, max_date = max_date, dim_t = dim_t) } URL <- URL %>% add_nc() file_name <- tempfile(pattern = tolower(source), tmpdir = path, fileext = ".nc") diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index fbec6707c7e..abc6aaa8835 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1283,33 +1283,38 @@ summary_sample <- function(x, size, replace = FALSE){ else{sample(x = x, size = size, replace = replace)} } -add_xy_area_range <- function(path, min_lon, max_lon, min_lat, max_lat) { - paste0(path, "/X", "/", - "(", ifelse(min_lon < 0, paste0(abs(min_lon), "W"), paste0(min_lon, "E")), ")", "/", - "(", ifelse(max_lon < 0, paste0(abs(max_lon), "W"), paste0(max_lon, "E")), ")", "/", - "RANGEEDGES", "/", - "Y", "/", - "(", ifelse(min_lat < 0, paste0(abs(min_lat), "S"), paste0(min_lat, "N")), ")", "/", - "(", ifelse(max_lat < 0, paste0(abs(max_lat), "S"), paste0(max_lat, "N")), ")", "/", - "RANGEEDGES", "/") +add_xy_area_range <- function(path, min_lon, max_lon, min_lat, max_lat, dim_x = "X", dim_y = "Y") { + paste0( + path, "/", dim_x, "/", + "(", ifelse(min_lon < 0, paste0(abs(min_lon), "W"), paste0(min_lon, "E")), ")", "/", + "(", ifelse(max_lon < 0, paste0(abs(max_lon), "W"), paste0(max_lon, "E")), ")", "/", + "RANGEEDGES", "/", + dim_y, "/", + "(", ifelse(min_lat < 0, paste0(abs(min_lat), "S"), paste0(min_lat, "N")), ")", "/", + "(", ifelse(max_lat < 0, paste0(abs(max_lat), "S"), paste0(max_lat, "N")), ")", "/", + "RANGEEDGES", "/" + ) } -add_xy_point_range <- function(path, min_lon, min_lat) { - paste0(path, "/X", "/", - "(", ifelse(min_lon < 0, paste0(abs(min_lon), "W"), paste0(min_lon, "E")), ")", "/", - "VALUES", "/", - "Y", "/", - "(", ifelse(min_lat < 0, paste0(abs(min_lat), "S"), paste0(min_lat, "N")), ")", "/", - "VALUES", "/") +add_xy_point_range <- function(path, min_lon, min_lat, dim_x = "X", dim_y = "Y") { + paste0( + path, "/", dim_x, "/", + "(", ifelse(min_lon < 0, paste0(abs(min_lon), "W"), paste0(min_lon, "E")), ")", "/", + "VALUES", "/", + dim_y, "/", + "(", ifelse(min_lat < 0, paste0(abs(min_lat), "S"), paste0(min_lat, "N")), ")", "/", + "VALUES", "/" + ) } -add_t_range <- function(path, min_date, max_date) { - paste0(path, "T", "/", - "(", lubridate::day(min_date), "%20", lubridate::month(min_date, label = TRUE), - "%20", lubridate::year(min_date), ")", "/", - "(", lubridate::day(max_date), "%20", lubridate::month(max_date, label = TRUE), - "%20", lubridate::year(max_date), ")", "/", - "RANGEEDGES", "/" +add_t_range <- function(path, min_date, max_date, dim_t = "T") { + paste0( + path, dim_t, "/", + "(", lubridate::day(min_date), "%20", lubridate::month(min_date, label = TRUE), + "%20", lubridate::year(min_date), ")", "/", + "(", lubridate::day(max_date), "%20", lubridate::month(max_date, label = TRUE), + "%20", lubridate::year(max_date), ")", "/", + "RANGEEDGES", "/" ) } From a92fca8a7ff15dab57f582fc7917fc88ac7c959c Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Sun, 18 Oct 2020 14:12:57 +0300 Subject: [PATCH 231/277] adding TAMSAT v3.0 data sets --- instat/dlgImportGriddedData.vb | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 0f1b2f7ac35..5af662ad6ba 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -41,7 +41,8 @@ Public Class dlgImportGriddedData ucrInputSource.SetParameter(New RParameter("source", 0)) dctDownloadPairs.Add("NASA", Chr(34) & "NASA" & Chr(34)) dctDownloadPairs.Add("NOAA", Chr(34) & "NOAA" & Chr(34)) - dctDownloadPairs.Add("TAMSAT", Chr(34) & "TAMSAT" & Chr(34)) + dctDownloadPairs.Add("TAMSAT_v3.0", Chr(34) & "TAMSAT_v3.0" & Chr(34)) + dctDownloadPairs.Add("TAMSAT_v3.1", Chr(34) & "TAMSAT_v3.1" & Chr(34)) dctDownloadPairs.Add("UCSB_CHIRPS", Chr(34) & "UCSB_CHIRPS" & Chr(34)) ucrInputSource.SetItems(dctDownloadPairs) ucrInputSource.SetDropDownStyleAsNonEditable() @@ -163,7 +164,17 @@ Public Class dlgImportGriddedData ucrInputData.cboInput.SelectedItem = "RFE2 Daily Precipitation" ucrDtpMinDate.MinDate = New Date(2000, 10, 31) ucrDtpMaxDate.MinDate = New Date(2000, 10, 31) - Case "TAMSAT" + Case "TAMSAT_v3.0" + dctFiles = New Dictionary(Of String, String) + dctFiles.Add("v3.0 Daily Rainfall", Chr(34) & "daily_rfe" & Chr(34)) + dctFiles.Add("v3.0 Dekadal Rainfall", Chr(34) & "dekadal_rfe" & Chr(34)) + dctFiles.Add("v3.0 Monthly Rainfall", Chr(34) & "monthly_rfe" & Chr(34)) + dctFiles.Add("v3.0 Monthly Rainfall (Calculated)", Chr(34) & "monthly_rfe_calc" & Chr(34)) + ucrInputData.SetItems(dctFiles) + ucrInputData.cboInput.SelectedItem = "v3.0 Daily Rainfall" + ucrDtpMinDate.MinDate = New Date(1983, 1, 1) + ucrDtpMaxDate.MinDate = New Date(1983, 1, 1) + Case "TAMSAT_v3.1" dctFiles = New Dictionary(Of String, String) dctFiles.Add("v3.1 Daily Rainfall", Chr(34) & "daily_rfe" & Chr(34)) dctFiles.Add("v3.1 Daily Rainfall Complete (Filled)", Chr(34) & "daily_rfe_filled" & Chr(34)) From b0347d7593da0af3f07751f31ec44158f7817505 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Sun, 18 Oct 2020 18:21:23 +0100 Subject: [PATCH 232/277] removed New on definition --- instat/dlgTimeSeriesPlot.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgTimeSeriesPlot.vb b/instat/dlgTimeSeriesPlot.vb index c277f0bd446..8743888a90f 100644 --- a/instat/dlgTimeSeriesPlot.vb +++ b/instat/dlgTimeSeriesPlot.vb @@ -59,7 +59,7 @@ Public Class dlgTimeSeriesPlot Private clsPivotCFunction As RFunction Private clsPivotListFunction As RFunction Private clsPivotFactorFunction As RFunction - Private clsPivotFactorLevelsCFunction As New RFunction + Private clsPivotFactorLevelsCFunction As RFunction ' Calculate Individual Summaries. ' These functions construct the R code below if mean lines and/or if annotated individual summaries are added. From b26890b3871f07ff83624047114684ef49f341d1 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Mon, 19 Oct 2020 10:00:59 +0300 Subject: [PATCH 233/277] changed the labels sizes. --- instat/clsRecentFiles.vb | 13 +++++++------ instat/ucrDataView.vb | 11 +++++++---- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/instat/clsRecentFiles.vb b/instat/clsRecentFiles.vb index ab231f6524e..a45285180d1 100644 --- a/instat/clsRecentFiles.vb +++ b/instat/clsRecentFiles.vb @@ -145,10 +145,7 @@ Public Class clsRecentFiles mnuTbShowLast10.DropDownItems.Remove(clsMenu) mnuFile.DropDownItems.Remove(clsMenu) mnuFileIcon.DropDownItems.Remove(clsMenu) - Next - - 'removes all the data view window recent file menu items - ucrDataViewWindow.ClearRecentFileMenuItems() + Next 'displays items (_in reverse order) for dialogs For icounter As Integer = mnuItems.Count - 1 To 0 Step -1 @@ -162,7 +159,10 @@ Public Class clsRecentFiles mnuTbShowLast10.DropDownItems.Insert(mnuTbShowLast10.DropDownItems.Count - 1, clsItem) Next - 'displays items (_in reverse order) for recent files + 'remove all the data view window recent file menu items + ucrDataViewWindow.ClearRecentFileMenuItems() + + 'then displays items (_in reverse order) for recent files Dim strPath As String Dim strFileName As String For iCounter As Integer = strListMRU.Count - 1 To 0 Step -1 @@ -191,11 +191,12 @@ Public Class clsRecentFiles linkMenuItem.Tag = strPath 'path used when the link is clicked ucrDataViewWindow.InsertRecentFileMenuItems(linkMenuItem) + 'attach link click event handler for opening the file AddHandler linkMenuItem.Click, AddressOf mnuFileMRU_Click 'if recent files are more than 5 then just the "more" link label and exit loop - If strListMRU.Count - iCounter >= 5 Then + If strListMRU.Count - iCounter > 4 Then linkMenuItem = New LinkLabel linkMenuItem.Text = "More ..." linkMenuItem.Tag = "" diff --git a/instat/ucrDataView.vb b/instat/ucrDataView.vb index 2d6fe3f1a30..d9306920b9d 100644 --- a/instat/ucrDataView.vb +++ b/instat/ucrDataView.vb @@ -908,13 +908,16 @@ Public Class ucrDataView linkMenuItem.Location = New Point(0, position) linkMenuItem.Height = 13 linkMenuItem.LinkBehavior = LinkBehavior.NeverUnderline + linkMenuItem.AutoSize = True - lblMenuItemPath.Text = linkMenuItem.Tag 'get file path from link tag + 'add the link control. + panelRecentMenuItems.Controls.Add(linkMenuItem) + + 'add the label control. will be besides each other on the same Y axis + lblMenuItemPath.Text = If(String.IsNullOrEmpty(linkMenuItem.Tag), "", Path.GetDirectoryName(linkMenuItem.Tag)) lblMenuItemPath.Location = New Point(linkMenuItem.Width + 10, position) lblMenuItemPath.Height = 13 - - 'add the controls. The link and and the label will be besides each other on the same Y axis - panelRecentMenuItems.Controls.Add(linkMenuItem) + lblMenuItemPath.AutoSize = True panelRecentMenuItems.Controls.Add(lblMenuItemPath) End Sub From 01be584ed019ad457dca346a15a324c41e79b42a Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Mon, 19 Oct 2020 10:50:03 +0300 Subject: [PATCH 234/277] Removed unused code --- instat/ucrCalculator.vb | 9 --------- 1 file changed, 9 deletions(-) diff --git a/instat/ucrCalculator.vb b/instat/ucrCalculator.vb index b9b12f2855c..dfbb2e32aa6 100644 --- a/instat/ucrCalculator.vb +++ b/instat/ucrCalculator.vb @@ -20,7 +20,6 @@ Public Class ucrCalculator Public Event SelectionChanged() Public Event SaveNameChanged() Public Event DataFrameChanged() - Public Event SaveResultsCheckedChanged() Public Event TryCommadClick() Public bFirstLoad As Boolean = True Public bControlsInitialised As Boolean = False @@ -985,10 +984,6 @@ Public Class ucrCalculator End If End Sub - Private Sub chkSaveResultInto_CheckedChanged(sender As Object, e As EventArgs) - RaiseEvent SaveResultsCheckedChanged() - End Sub - Private Sub ucrSelectorForCalculations_DataframeChanged() Handles ucrSelectorForCalculations.DataFrameChanged ucrTryCalculator.ucrInputTryMessage.SetName("") RaiseEvent DataFrameChanged() @@ -1232,10 +1227,6 @@ Public Class ucrCalculator RaiseEvent SelectionChanged() End Sub - Private Sub ucrSaveResultInto_NameChanged() - RaiseEvent SaveNameChanged() - End Sub - Private Sub cmdHelp_Click(sender As Object, e As EventArgs) Handles cmdHelp.Click HelpContent() End Sub From 2c89fbc5f4a135593757952f4cf0540aa9349fe2 Mon Sep 17 00:00:00 2001 From: N-thony Date: Mon, 19 Oct 2020 10:03:17 +0200 Subject: [PATCH 235/277] Resolving the comments --- instat/dlgInventoryPlot.vb | 22 +++++++++++++++---- .../InstatObject/R/stand_alone_functions.R | 10 --------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 0f012fc8d63..e641f4d99ee 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -174,6 +174,7 @@ Public Class dlgInventoryPlot ucrInputFacetBy.SetLinkedDisplayControl(lblFacetBy) lstCmdControls.AddRange({cmdInventoryPlotOptions, cmdOptions}) ucrChkFlipCoordinates.SetLinkedDisplayControl(lstCmdControls) + End Sub Private Sub SetDefaults() @@ -198,6 +199,7 @@ Public Class dlgInventoryPlot ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.AddToBeforeCodes(clsInventoryPlot, iPosition:=0) + End Sub Private Sub SetRCodeForControls(bReset As Boolean) @@ -229,6 +231,7 @@ Public Class dlgInventoryPlot ucrChkOmitEnd.SetRCode(clsClimaticMissing, bReset) ucrPnlOrder.SetRCode(clsClimaticDetails, bReset) ucrPnlOptions.SetRSyntax(ucrBase.clsRsyntax, bReset) + End Sub Private Sub TestOkEnabled() @@ -259,6 +262,7 @@ Public Class dlgInventoryPlot ucrBase.OKEnabled(False) End If End If + End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) @@ -271,7 +275,9 @@ Public Class dlgInventoryPlot SetDefaults() SetRCodeForControls(True) TestOkEnabled() + End Sub + Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoMissing.Checked Then ucrReceiverDate.SetParameterIsRFunction() @@ -285,7 +291,9 @@ Public Class dlgInventoryPlot clsInventoryPlot.iCallType = 3 clsInventoryPlot.bExcludeAssignedFunctionOutput = False End If + End Sub + Private Sub ucrChkSummary_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkSummary.ControlValueChanged If ucrChkSummary.Checked Then ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) @@ -293,6 +301,7 @@ Public Class dlgInventoryPlot Else ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticMissing) End If + End Sub Private Sub ucrChkDetails_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrChkDetails.ControlValueChanged @@ -302,6 +311,7 @@ Public Class dlgInventoryPlot Else ucrBase.clsRsyntax.RemoveFromAfterCodes(clsClimaticDetails) End If + End Sub Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged @@ -314,16 +324,20 @@ Public Class dlgInventoryPlot clsClimaticDetails.RemoveParameterByName("station") clsClimaticMissing.RemoveParameterByName("station") End If - End Sub - Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveGraph.ControlContentsChanged, ucrSaveDetails.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrChkSummary.ControlContentsChanged, ucrChkDetails.ControlContentsChanged, ucrChkYear.ControlContentsChanged, ucrChkMonth.ControlContentsChanged, ucrChkDay.ControlContentsChanged, ucrChkHour.ControlContentsChanged, ucrChkMinute.ControlContentsChanged, ucrChkSecond.ControlContentsChanged, ucrPnlOptions.ControlContentsChanged - TestOkEnabled() End Sub Private Sub ucrBase_ClickClose(sender As Object, e As EventArgs) Handles ucrBase.ClickClose - If rdoMissing.Checked AndAlso Not ucrChkSummary.Checked AndAlso Not ucrChkDetails.Checked Then + If rdoMissing.Checked AndAlso Not (ucrChkSummary.Checked OrElse ucrChkDetails.Checked) Then ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) clsClimaticDetails.iCallType = 2 End If + + End Sub + + Private Sub AllControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrSaveGraph.ControlContentsChanged, ucrSaveDetails.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverDate.ControlContentsChanged, ucrChkSummary.ControlContentsChanged, ucrChkDetails.ControlContentsChanged, ucrChkYear.ControlContentsChanged, ucrChkMonth.ControlContentsChanged, ucrChkDay.ControlContentsChanged, ucrChkHour.ControlContentsChanged, ucrChkMinute.ControlContentsChanged, ucrChkSecond.ControlContentsChanged, ucrPnlOptions.ControlContentsChanged + TestOkEnabled() + End Sub + End Class \ No newline at end of file diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index 90cac212796..05f70c7c54d 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1287,11 +1287,6 @@ summary_sample <- function(x, size, replace = FALSE){ climatic_missing <- function(data, date, elements = ..., stations, start = TRUE, end = FALSE){ - # if there are no stations, set it as 1 - # (can otherwise just run the function without stations present in that brackets) - if (missing(stations)){ - data %>% mutate(stations = 1) - } if (missing(date)){ stop('argument "date" is missing, with no default') @@ -1370,11 +1365,6 @@ climatic_details <- function(data, date, elements = ..., stations, month = FALSE, year = FALSE, level = FALSE){ - # if there are no stations, set it as 1 - # (can otherwise just run the function without stations present in that brackets) - if (missing(stations)){ - data %>% dplyr::mutate(stations = 1) - } if (missing(date)){ stop('argument "date" is missing, with no default') From f7374207fac7333059c33e1400473d8ac9493d8e Mon Sep 17 00:00:00 2001 From: N-thony Date: Mon, 19 Oct 2020 10:07:47 +0200 Subject: [PATCH 236/277] Update instat/ucrSaveGraph.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/ucrSaveGraph.vb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instat/ucrSaveGraph.vb b/instat/ucrSaveGraph.vb index 6e168e97133..60efd3d0a1f 100644 --- a/instat/ucrSaveGraph.vb +++ b/instat/ucrSaveGraph.vb @@ -31,7 +31,9 @@ Public Class ucrSaveGraph Public Event ContentsChanged() Public bFirstLoad As Boolean - ''' Initialize component for the designer and any initialization after initializing component. + '''-------------------------------------------------------------------------------------------- + ''' Constructs and initializes this component. + '''-------------------------------------------------------------------------------------------- Public Sub New() ' This call is required by the designer. InitializeComponent() From 35159a9a5ffda9ad35ee25121f26ae21fe682d59 Mon Sep 17 00:00:00 2001 From: N-thony Date: Mon, 19 Oct 2020 10:08:13 +0200 Subject: [PATCH 237/277] Update instat/ucrSaveGraph.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/ucrSaveGraph.vb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/instat/ucrSaveGraph.vb b/instat/ucrSaveGraph.vb index 60efd3d0a1f..642f042e4de 100644 --- a/instat/ucrSaveGraph.vb +++ b/instat/ucrSaveGraph.vb @@ -45,7 +45,8 @@ Public Class ucrSaveGraph bFirstLoad = True End Sub ''' Executes whenever this control loads. - ''' If this is the first time that the control has loaded then sets the control to the default state. + ''' If this is the first time that the control has loaded then sets the control to + ''' the default state. ''' If the control has already been loaded then this function does nothing. ''' ''' Source of the event. From 1f144a492cbf11db36c6a3d9bf5f461595858cb6 Mon Sep 17 00:00:00 2001 From: N-thony Date: Mon, 19 Oct 2020 10:08:25 +0200 Subject: [PATCH 238/277] Update instat/ucrSaveGraph.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/ucrSaveGraph.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/ucrSaveGraph.vb b/instat/ucrSaveGraph.vb index 642f042e4de..fe361b615db 100644 --- a/instat/ucrSaveGraph.vb +++ b/instat/ucrSaveGraph.vb @@ -92,7 +92,7 @@ Public Class ucrSaveGraph Private Sub ucrInputGraphName_ContentsChanged() Handles ucrInputGraphName.ContentsChanged RaiseEvent ContentsChanged() End Sub - ''' Save the graph when the check box save graph is checked. + ''' Returns the state of the save graph check box. ''' True if the check box is checked. Public ReadOnly Property bSaveGraph() As Boolean Get From 75c2444f675879569b1090d3e84c0d73099743b2 Mon Sep 17 00:00:00 2001 From: N-thony Date: Mon, 19 Oct 2020 10:18:33 +0200 Subject: [PATCH 239/277] Resolving the comments --- instat/ucrSaveGraph.vb | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/instat/ucrSaveGraph.vb b/instat/ucrSaveGraph.vb index fe361b615db..134c669fd1d 100644 --- a/instat/ucrSaveGraph.vb +++ b/instat/ucrSaveGraph.vb @@ -44,6 +44,7 @@ Public Class ucrSaveGraph ucrInputGraphName.SetValidationTypeAsRVariable() bFirstLoad = True End Sub + '''-------------------------------------------------------------------------------------------- ''' Executes whenever this control loads. ''' If this is the first time that the control has loaded then sets the control to ''' the default state. @@ -51,64 +52,78 @@ Public Class ucrSaveGraph ''' ''' Source of the event. ''' Event information. + '''-------------------------------------------------------------------------------------------- Private Sub ucrSaveGraph_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then SetDefaults() bFirstLoad = False End If End Sub - + '''-------------------------------------------------------------- ''' Sets the control to its default state. + '''-------------------------------------------------------------- Private Sub SetDefaults() chkSaveGraph.Checked = False ucrInputGraphName.Visible = False End Sub - + '''------------------------------------------------------------------ ''' Resets the control to its default state. + '''------------------------------------------------------------------ Public Sub Reset() SetDefaults() End Sub + '''------------------------------------------------------------------------------------------------- ''' Sets the new data frame selector and links the selector to the combo box. ''' The new data frame selector. + '''------------------------------------------------------------------------------------------------- Public Sub SetDataFrameSelector(ucrNewDataFrameSelector As ucrDataFrame) ucrInputGraphName.SetDataFrameSelector(ucrNewDataFrameSelector) End Sub - + '''---------------------------------------------------------------------------------------- ''' Handles event triggered when the state of the check box changes. ''' Source of the event. ''' Event information. + '''---------------------------------------------------------------------------------------- Private Sub chkSaveGraph_CheckedChanged(sender As Object, e As EventArgs) Handles chkSaveGraph.CheckedChanged ucrInputGraphName.Enabled = chkSaveGraph.Checked ucrInputGraphName.Visible = chkSaveGraph.Checked RaiseEvent SaveGraphCheckedChanged() End Sub + '''-------------------------------------------------------------------------------- ''' Handles event triggered when the combo box name changes. + '''-------------------------------------------------------------------------------- Private Sub ucrInputGraphName_NameChanged() Handles ucrInputGraphName.NameChanged If chkSaveGraph.Checked Then RaiseEvent GraphNameChanged() End If End Sub + '''----------------------------------------------------------------------------------- ''' Handles event triggered when the combo box contents changes. + '''----------------------------------------------------------------------------------- Private Sub ucrInputGraphName_ContentsChanged() Handles ucrInputGraphName.ContentsChanged RaiseEvent ContentsChanged() End Sub - ''' Returns the state of the save graph check box. + '''---------------------------------------------------------------------- + ''' Returns the state of the save graph check box. ''' True if the check box is checked. + '''---------------------------------------------------------------------- Public ReadOnly Property bSaveGraph() As Boolean Get Return chkSaveGraph.Checked End Get End Property - + '''--------------------------------------------------------------------- ''' Sets the name of the graph in the combo box. ''' Return the name graph. + '''--------------------------------------------------------------------- Public ReadOnly Property strGraphName() As String Get Return ucrInputGraphName.GetText() End Get End Property - + '''--------------------------------------------------------------------------------- ''' Sets the prefix for the combo box value to the new prefix. + '''--------------------------------------------------------------------------------- Public WriteOnly Property strPrefix() As String Set(strNewPrefix As String) ucrInputGraphName.SetPrefix(strNewPrefix) From 51ec5db848ab8c3fcf5982a829e042563b569fb2 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 19 Oct 2020 15:02:27 +0300 Subject: [PATCH 240/277] modified missing value check --- .../R/Backend_Components/summary_functions.R | 35 ++++++++++--------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/instat/static/InstatObject/R/Backend_Components/summary_functions.R b/instat/static/InstatObject/R/Backend_Components/summary_functions.R index 6911a6b445b..66b6314c18c 100644 --- a/instat/static/InstatObject/R/Backend_Components/summary_functions.R +++ b/instat/static/InstatObject/R/Backend_Components/summary_functions.R @@ -516,29 +516,30 @@ summary_mode <- function(x,...) { na_check <- function(x, na_type = c(), na_consecutive_n = NULL, na_max_n = NULL, na_max_prop = NULL, na_min_n = NULL, na_FUN = NULL, ...) { res <- c() - k <- 1 - for (i in na_type) { - ##Added this to avoid error when "" is trancated. Not sure why "" is removed in some instances. - ##Works differently with main summary function when you have a single case/multiple cases of na_type. - if(i == "'n'" || i == "n") { - res[k] <- summary_count_missing(x) <= na_max_n + for (i in seq_along(na_type)) { + type <- na_type[i] + if (type %in% c("n","'n'")) { + res[i] <- summary_count_missing(x) <= na_max_n } - else if(i == "'prop'" || i == "prop") { - res[k] <- (summary_count_missing(x)/summary_count(x)) <= na_max_prop/100 + else if (type %in% c("prop","'prop'")) { + res[i] <- (summary_count_missing(x) / summary_count(x)) <= na_max_prop / 100 } - else if(i == "'n_non_miss'" || i == "n_non_miss") { - res[k] <- summary_count_non_missing(x) >= na_min_n + else if (type %in% c("n_non_miss","'n_non_miss'")) { + res[i] <- summary_count_non_missing(x) >= na_min_n } - else if(i == "'FUN'" || i == "FUN") { - res[k] <- na_FUN(x, ...) + else if (type %in% c("FUN","'FUN'")) { + res[i] <- na_FUN(x, ...) } - else if(i == "'con'" || i == "con") { + else if (type %in% c("con","'con'")) { is_na_rle <- rle(is.na(x)) - res[k] <- max(is_na_rle$lengths[is_na_rle$values]) <= na_consecutive_n + res[i] <- max(is_na_rle$lengths[is_na_rle$values]) <= na_consecutive_n + } + else { + stop("Invalid na_type specified for missing values check.") + } + if (!res[i]) { + return(FALSE) } - else stop("Invalid na_type specified for missing values check.") - if(!res[k]) return(FALSE) - k <- k+1 } return(all(res)) } From 26a8e119a8d37bdf22ffadb9d4354219b18bca3c Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 19 Oct 2020 15:03:17 +0300 Subject: [PATCH 241/277] set "" as Rdefault and removed redundant code --- instat/sdgMissingOptions.vb | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/instat/sdgMissingOptions.vb b/instat/sdgMissingOptions.vb index 8689bf49901..1ed41b9afc3 100644 --- a/instat/sdgMissingOptions.vb +++ b/instat/sdgMissingOptions.vb @@ -24,21 +24,22 @@ Public Class sdgMissingOptions End Sub Public Sub InitialiseControls() + Dim lstCheckboxes As New List(Of ucrCheck) ucrChkMaxNumMissing.AddToLinkedControls({ucrNudNumber}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) ucrChkMaxPercMissing.AddToLinkedControls({ucrInputPercentage}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=1) ucrChkMinNumNonMissing.AddToLinkedControls({ucrNudNumberNotMissing}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=340) ucrChkConsecutiveMissing.AddToLinkedControls({ucrNudConsecutive}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=4) - ucrChkMaxNumMissing.SetParameter(New RParameter("n", 1, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'n'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkMaxNumMissing.SetParameter(New RParameter("n", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'n'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkMaxNumMissing.SetText("Maximum number of missing allowed") - ucrChkMinNumNonMissing.SetParameter(New RParameter("n_non_miss", 2, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'n_non_miss'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkMinNumNonMissing.SetParameter(New RParameter("n_non_miss", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'n_non_miss'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkMinNumNonMissing.SetText("Minimum number of non missing required") - ucrChkMaxPercMissing.SetParameter(New RParameter("prop", 3, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'prop'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkMaxPercMissing.SetParameter(New RParameter("prop", 3), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'prop'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkMaxPercMissing.SetText("Maximum percentage of missing allowed") - ucrChkConsecutiveMissing.SetParameter(New RParameter("con", 4, bNewIncludeArgumentName:=False), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'con'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) + ucrChkConsecutiveMissing.SetParameter(New RParameter("con", 4), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=True, strNewValueIfChecked:=Chr(34) & "'con'" & Chr(34), strNewValueIfUnchecked:=Chr(34) & Chr(34)) ucrChkConsecutiveMissing.SetText("Maximum number of consecutive missing allowed") ucrInputPercentage.SetParameter(New RParameter("na_max_prop", 10)) @@ -51,6 +52,12 @@ Public Class sdgMissingOptions ucrNudNumberNotMissing.SetMinMax(0, iNewMax:=Integer.MaxValue) ucrNudConsecutive.SetParameter(New RParameter("na_consecutive_n", 13)) + + lstCheckboxes.AddRange({ucrChkMaxNumMissing, ucrChkMinNumNonMissing, ucrChkMaxPercMissing, ucrChkConsecutiveMissing}) + For Each ctrTemp As ucrCheck In lstCheckboxes + ctrTemp.SetParameterIncludeArgumentName(False) + ctrTemp.SetRDefault(Chr(34) & Chr(34)) + Next End Sub Public Sub SetRFunction(clsNewSummaryFunction As RFunction, clsNewConcFunction As RFunction, Optional bReset As Boolean = False) From f0c5a36ed4ee16f9958d156a2b497b40ef220c44 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 19 Oct 2020 15:04:31 +0300 Subject: [PATCH 242/277] remove na_type parameter when omit missing values checkbox is unchecked --- instat/dlgClimaticSummary.vb | 5 +++++ instat/dlgColumnStats.vb | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index cc96b351272..1cc92c0ff31 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -296,6 +296,11 @@ Public Class dlgClimaticSummary Else clsDefaultFunction.RemoveParameterByName("use") End If + If Not ucrChkOmitMissing.Checked AndAlso clsDefaultFunction.ContainsParameter("na_type") Then + clsDefaultFunction.RemoveParameterByName("na_type") + Else + clsDefaultFunction.AddParameter("na_type", clsRFunctionParameter:=clsConcFunction, iPosition:=9) + End If cmdMissingOptions.Enabled = ucrChkOmitMissing.Checked End Sub diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index a128319771b..c0bc334ad30 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -192,6 +192,11 @@ Public Class dlgColumnStats Else clsDefaultFunction.RemoveParameterByName("use") End If + If Not ucrChkOmitMissing.Checked AndAlso clsDefaultFunction.ContainsParameter("na_type") Then + clsDefaultFunction.RemoveParameterByName("na_type") + Else + clsDefaultFunction.AddParameter("na_type", clsRFunctionParameter:=clsConcFunction, iPosition:=9) + End If cmdMissingOptions.Enabled = ucrChkOmitMissing.Checked End Sub From 085dc290d2833d6e5fe1733c90c724b677d242bf Mon Sep 17 00:00:00 2001 From: N-thony Date: Mon, 19 Oct 2020 14:38:57 +0200 Subject: [PATCH 243/277] Resolving the comments on RCode and Dialog. --- instat/dlgInventoryPlot.vb | 32 ++++++++++++------- .../InstatObject/R/stand_alone_functions.R | 4 +-- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index e641f4d99ee..760d84a4361 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -59,6 +59,8 @@ Public Class dlgInventoryPlot ucrReceiverStation.Selector = ucrInventoryPlotSelector ucrReceiverStation.SetClimaticType("station") + ucrReceiverStation.SetParameter(New RParameter("station_col", 3)) + ucrReceiverStation.SetParameterIsString() ucrReceiverStation.bAutoFill = True ucrReceiverStation.strSelectorHeading = "Factors" @@ -199,6 +201,7 @@ Public Class dlgInventoryPlot ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.AddToBeforeCodes(clsInventoryPlot, iPosition:=0) + clsInventoryPlot.iCallType = 3 End Sub @@ -206,10 +209,12 @@ Public Class dlgInventoryPlot ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("data", 0), iAdditionalPairNo:=1) ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("date", 1), iAdditionalPairNo:=1) ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("elements", 2), iAdditionalPairNo:=1) + ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticDetails, New RParameter("station", 3), iAdditionalPairNo:=1) ucrInventoryPlotSelector.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("data", 0), iAdditionalPairNo:=2) ucrReceiverDate.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("date", 1), iAdditionalPairNo:=2) ucrReceiverElements.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("elements", 2), iAdditionalPairNo:=2) + ucrReceiverStation.AddAdditionalCodeParameterPair(clsClimaticMissing, New RParameter("station", 3), iAdditionalPairNo:=2) ucrInventoryPlotSelector.SetRCode(clsInventoryPlot, bReset) ucrReceiverDate.SetRCode(clsInventoryPlot, bReset) @@ -221,6 +226,7 @@ Public Class dlgInventoryPlot ucrPnlPlotType.SetRCode(clsInventoryPlot, bReset) ucrInputFacetBy.SetRCode(clsInventoryPlot, bReset) ucrSaveGraph.SetRCode(clsInventoryPlot, bReset) + ucrReceiverStation.SetRCode(clsInventoryPlot, bReset) ucrChkSummary.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkDetails.SetRSyntax(ucrBase.clsRsyntax, bReset) ucrChkYear.SetRCode(clsClimaticDetails, bReset) @@ -280,10 +286,12 @@ Public Class dlgInventoryPlot Private Sub ucrPnlOptions_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlOptions.ControlValueChanged If rdoMissing.Checked Then + ucrReceiverStation.SetParameterIsRFunction() ucrReceiverDate.SetParameterIsRFunction() ucrInventoryPlotSelector.SetParameterIsrfunction() ucrBase.clsRsyntax.RemoveFromBeforeCodes(clsInventoryPlot) ElseIf rdoGraph.Checked Then + ucrReceiverStation.SetParameterIsString() ucrReceiverDate.SetParameterIsString() ucrInventoryPlotSelector.SetParameterIsString() ucrBase.clsRsyntax.ClearCodes() @@ -314,18 +322,18 @@ Public Class dlgInventoryPlot End Sub - Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged - If Not ucrReceiverStation.IsEmpty Then - clsInventoryPlot.AddParameter("station_col", ucrReceiverStation.GetVariableNames, iPosition:=3) - clsClimaticDetails.AddParameter("station", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) - clsClimaticMissing.AddParameter("station", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) - Else - clsInventoryPlot.RemoveParameterByName("station_col") - clsClimaticDetails.RemoveParameterByName("station") - clsClimaticMissing.RemoveParameterByName("station") - End If - - End Sub + 'Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged + ' If Not ucrReceiverStation.IsEmpty Then + ' clsInventoryPlot.AddParameter("station_col", ucrReceiverStation.GetVariableNames, iPosition:=3) + ' clsClimaticDetails.AddParameter("station", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) + ' clsClimaticMissing.AddParameter("station", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) + ' Else + ' clsInventoryPlot.RemoveParameterByName("station_col") + ' clsClimaticDetails.RemoveParameterByName("station") + ' clsClimaticMissing.RemoveParameterByName("station") + ' End If + + 'End Sub Private Sub ucrBase_ClickClose(sender As Object, e As EventArgs) Handles ucrBase.ClickClose If rdoMissing.Checked AndAlso Not (ucrChkSummary.Checked OrElse ucrChkDetails.Checked) Then diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index b8f16c85e47..a7f8d907b3f 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1335,7 +1335,7 @@ climatic_missing <- function(data, date, elements = ..., stations, dplyr::summarise(From = dplyr::first(start), To = dplyr::last(end), Missing = sum(is.na(value)), - `%` = sum(is.na(value))/n()*100) + `%` = round(sum(is.na(value))/n()*100, 1)) # complete years complete.years <- data.stack %>% @@ -1345,7 +1345,7 @@ climatic_missing <- function(data, date, elements = ..., stations, dplyr::summarise(count = sum(is.na(value))) complete.years <- complete.years %>% dplyr::group_by({{ stations }}, Element) %>% - dplyr::summarise(Complete.Years = sum(count == 0)) + dplyr::summarise(Full_Years = sum(count == 0)) # bind together From f9bd02c4ad4d28612525c4c93c7c9cfbdfa8b8ba Mon Sep 17 00:00:00 2001 From: N-thony Date: Mon, 19 Oct 2020 15:00:23 +0200 Subject: [PATCH 244/277] Resolving a small bug in rdoGraph --- instat/dlgInventoryPlot.vb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 760d84a4361..38d496b5e67 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -202,6 +202,7 @@ Public Class dlgInventoryPlot ucrBase.clsRsyntax.ClearCodes() ucrBase.clsRsyntax.AddToBeforeCodes(clsInventoryPlot, iPosition:=0) clsInventoryPlot.iCallType = 3 + clsInventoryPlot.bExcludeAssignedFunctionOutput = False End Sub @@ -322,19 +323,6 @@ Public Class dlgInventoryPlot End Sub - 'Private Sub ucrReceiverStation_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverStation.ControlValueChanged - ' If Not ucrReceiverStation.IsEmpty Then - ' clsInventoryPlot.AddParameter("station_col", ucrReceiverStation.GetVariableNames, iPosition:=3) - ' clsClimaticDetails.AddParameter("station", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) - ' clsClimaticMissing.AddParameter("station", clsRFunctionParameter:=ucrReceiverStation.GetVariables, iPosition:=3) - ' Else - ' clsInventoryPlot.RemoveParameterByName("station_col") - ' clsClimaticDetails.RemoveParameterByName("station") - ' clsClimaticMissing.RemoveParameterByName("station") - ' End If - - 'End Sub - Private Sub ucrBase_ClickClose(sender As Object, e As EventArgs) Handles ucrBase.ClickClose If rdoMissing.Checked AndAlso Not (ucrChkSummary.Checked OrElse ucrChkDetails.Checked) Then ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) From a165c40f594f9f60a38f4610322b77586c3ffd5e Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 19 Oct 2020 16:55:10 +0300 Subject: [PATCH 245/277] single to multiple receiver --- instat/dlgClimaticSummary.Designer.vb | 70 ++++++++--------- instat/dlgClimaticSummary.resx | 108 +++++++++++++------------- 2 files changed, 89 insertions(+), 89 deletions(-) diff --git a/instat/dlgClimaticSummary.Designer.vb b/instat/dlgClimaticSummary.Designer.vb index 87a9c2198b1..c1c587c8546 100644 --- a/instat/dlgClimaticSummary.Designer.vb +++ b/instat/dlgClimaticSummary.Designer.vb @@ -49,24 +49,24 @@ Partial Class dlgClimaticSummary Me.cmdSummary = New System.Windows.Forms.Button() Me.lblWithinYear = New System.Windows.Forms.Label() Me.grpOptions = New System.Windows.Forms.GroupBox() - Me.cmdDoyRange = New System.Windows.Forms.Button() - Me.lblYear = New System.Windows.Forms.Label() Me.cmdMissingOptions = New System.Windows.Forms.Button() - Me.ucrInputFilterPreview = New instat.ucrInputTextBox() Me.ucrChkOmitMissing = New instat.ucrCheck() Me.ucrChkAddDateColumn = New instat.ucrCheck() Me.ucrChkStoreResults = New instat.ucrCheck() Me.ucrChkPrintOutput = New instat.ucrCheck() Me.ucrChkDropUnusedLevels = New instat.ucrCheck() + Me.cmdDoyRange = New System.Windows.Forms.Button() + Me.lblYear = New System.Windows.Forms.Label() + Me.ucrInputFilterPreview = New instat.ucrInputTextBox() Me.ucrSelectorVariable = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverWithinYear = New instat.ucrReceiverSingle() Me.ucrReceiverDOY = New instat.ucrReceiverSingle() Me.ucrReceiverYear = New instat.ucrReceiverSingle() Me.ucrReceiverDate = New instat.ucrReceiverSingle() Me.ucrReceiverStation = New instat.ucrReceiverSingle() - Me.ucrReceiverElement = New instat.ucrReceiverSingle() Me.ucrBase = New instat.ucrButtons() Me.ucrPnlAnnualWithin = New instat.UcrPanel() + Me.ucrReceiverElements = New instat.ucrReceiverMultiple() Me.grpOptions.SuspendLayout() Me.SuspendLayout() ' @@ -144,18 +144,6 @@ Partial Class dlgClimaticSummary Me.grpOptions.Name = "grpOptions" Me.grpOptions.TabStop = False ' - 'cmdDoyRange - ' - resources.ApplyResources(Me.cmdDoyRange, "cmdDoyRange") - Me.cmdDoyRange.Name = "cmdDoyRange" - Me.cmdDoyRange.Tag = "" - Me.cmdDoyRange.UseVisualStyleBackColor = True - ' - 'lblYear - ' - resources.ApplyResources(Me.lblYear, "lblYear") - Me.lblYear.Name = "lblYear" - ' 'cmdMissingOptions ' resources.ApplyResources(Me.cmdMissingOptions, "cmdMissingOptions") @@ -163,14 +151,6 @@ Partial Class dlgClimaticSummary Me.cmdMissingOptions.Tag = "MissingOptions" Me.cmdMissingOptions.UseVisualStyleBackColor = True ' - 'ucrInputFilterPreview - ' - Me.ucrInputFilterPreview.AddQuotesIfUnrecognised = True - Me.ucrInputFilterPreview.IsMultiline = False - Me.ucrInputFilterPreview.IsReadOnly = True - resources.ApplyResources(Me.ucrInputFilterPreview, "ucrInputFilterPreview") - Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview" - ' 'ucrChkOmitMissing ' Me.ucrChkOmitMissing.Checked = False @@ -201,6 +181,26 @@ Partial Class dlgClimaticSummary resources.ApplyResources(Me.ucrChkDropUnusedLevels, "ucrChkDropUnusedLevels") Me.ucrChkDropUnusedLevels.Name = "ucrChkDropUnusedLevels" ' + 'cmdDoyRange + ' + resources.ApplyResources(Me.cmdDoyRange, "cmdDoyRange") + Me.cmdDoyRange.Name = "cmdDoyRange" + Me.cmdDoyRange.Tag = "" + Me.cmdDoyRange.UseVisualStyleBackColor = True + ' + 'lblYear + ' + resources.ApplyResources(Me.lblYear, "lblYear") + Me.lblYear.Name = "lblYear" + ' + 'ucrInputFilterPreview + ' + Me.ucrInputFilterPreview.AddQuotesIfUnrecognised = True + Me.ucrInputFilterPreview.IsMultiline = False + Me.ucrInputFilterPreview.IsReadOnly = True + resources.ApplyResources(Me.ucrInputFilterPreview, "ucrInputFilterPreview") + Me.ucrInputFilterPreview.Name = "ucrInputFilterPreview" + ' 'ucrSelectorVariable ' Me.ucrSelectorVariable.bDropUnusedFilterLevels = False @@ -254,15 +254,6 @@ Partial Class dlgClimaticSummary Me.ucrReceiverStation.strNcFilePath = "" Me.ucrReceiverStation.ucrSelector = Nothing ' - 'ucrReceiverElement - ' - Me.ucrReceiverElement.frmParent = Me - resources.ApplyResources(Me.ucrReceiverElement, "ucrReceiverElement") - Me.ucrReceiverElement.Name = "ucrReceiverElement" - Me.ucrReceiverElement.Selector = Nothing - Me.ucrReceiverElement.strNcFilePath = "" - Me.ucrReceiverElement.ucrSelector = Nothing - ' 'ucrBase ' resources.ApplyResources(Me.ucrBase, "ucrBase") @@ -273,10 +264,20 @@ Partial Class dlgClimaticSummary resources.ApplyResources(Me.ucrPnlAnnualWithin, "ucrPnlAnnualWithin") Me.ucrPnlAnnualWithin.Name = "ucrPnlAnnualWithin" ' + 'ucrReceiverElements + ' + Me.ucrReceiverElements.frmParent = Me + resources.ApplyResources(Me.ucrReceiverElements, "ucrReceiverElements") + Me.ucrReceiverElements.Name = "ucrReceiverElements" + Me.ucrReceiverElements.Selector = Nothing + Me.ucrReceiverElements.strNcFilePath = "" + Me.ucrReceiverElements.ucrSelector = Nothing + ' 'dlgClimaticSummary ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.ucrReceiverElements) Me.Controls.Add(Me.ucrInputFilterPreview) Me.Controls.Add(Me.cmdDoyRange) Me.Controls.Add(Me.grpOptions) @@ -293,7 +294,6 @@ Partial Class dlgClimaticSummary Me.Controls.Add(Me.ucrReceiverYear) Me.Controls.Add(Me.ucrReceiverDate) Me.Controls.Add(Me.ucrReceiverStation) - Me.Controls.Add(Me.ucrReceiverElement) Me.Controls.Add(Me.ucrBase) Me.Controls.Add(Me.rdoAnnualWithinYear) Me.Controls.Add(Me.rdoWithinYear) @@ -315,7 +315,6 @@ Partial Class dlgClimaticSummary Friend WithEvents rdoAnnualWithinYear As RadioButton Friend WithEvents ucrPnlAnnualWithin As UcrPanel Friend WithEvents ucrReceiverStation As ucrReceiverSingle - Friend WithEvents ucrReceiverElement As ucrReceiverSingle Friend WithEvents ucrReceiverDOY As ucrReceiverSingle Friend WithEvents ucrReceiverDate As ucrReceiverSingle Friend WithEvents lblStation As Label @@ -337,4 +336,5 @@ Partial Class dlgClimaticSummary Friend WithEvents ucrChkAddDateColumn As ucrCheck Friend WithEvents ucrChkOmitMissing As ucrCheck Friend WithEvents cmdMissingOptions As Button + Friend WithEvents ucrReceiverElements As ucrReceiverMultiple End Class diff --git a/instat/dlgClimaticSummary.resx b/instat/dlgClimaticSummary.resx index c702d88144a..f21511c5fa9 100644 --- a/instat/dlgClimaticSummary.resx +++ b/instat/dlgClimaticSummary.resx @@ -256,7 +256,7 @@ $this - 11 + 12 True @@ -286,7 +286,7 @@ $this - 10 + 11 True @@ -295,7 +295,7 @@ NoControl - 282, 191 + 282, 245 66, 13 @@ -316,7 +316,7 @@ $this - 8 + 9 True @@ -346,19 +346,19 @@ $this - 7 + 8 NoControl - 282, 317 + 282, 371 120, 26 - 18 + 17 Summaries @@ -373,7 +373,7 @@ $this - 6 + 7 True @@ -382,7 +382,7 @@ NoControl - 282, 273 + 282, 327 65, 13 @@ -403,7 +403,7 @@ $this - 5 + 6 NoControl @@ -544,7 +544,7 @@ 266, 136 - 17 + 18 Options @@ -559,19 +559,19 @@ $this - 2 + 3 NoControl - 10, 386 + 10, 397 105, 26 - 20 + 19 Day Range @@ -586,7 +586,7 @@ $this - 1 + 2 True @@ -595,7 +595,7 @@ NoControl - 282, 232 + 282, 286 32, 13 @@ -616,16 +616,16 @@ $this - 9 + 10 - 128, 390 + 116, 400 242, 22 - 21 + 20 ucrInputFilterPreview @@ -637,7 +637,7 @@ $this - 0 + 1 10, 48 @@ -661,7 +661,7 @@ $this - 3 + 4 True @@ -672,8 +672,32 @@ 415, 480 + + 282, 164 + + + 0, 0, 0, 0 + + + 123, 78 + + + 10 + + + ucrReceiverElements + + + instat.ucrReceiverMultiple, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 0 + - 282, 207 + 282, 262 0, 0, 0, 0 @@ -694,10 +718,10 @@ $this - 12 + 13 - 282, 248 + 282, 302 0, 0, 0, 0 @@ -718,10 +742,10 @@ $this - 13 + 14 - 282, 125 + 282, 124 0, 0, 0, 0 @@ -742,7 +766,7 @@ $this - 14 + 15 282, 84 @@ -766,30 +790,6 @@ $this - 15 - - - 282, 166 - - - 0, 0, 0, 0 - - - 120, 20 - - - 10 - - - ucrReceiverElement - - - instat.ucrReceiverSingle, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - $this - - 16 @@ -799,7 +799,7 @@ 399, 52 - 22 + 21 ucrBase @@ -847,7 +847,7 @@ System.Windows.Forms.Form, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 282, 289 + 282, 342 0, 0, 0, 0 @@ -868,6 +868,6 @@ $this - 4 + 5 \ No newline at end of file From d3aa5400f85dccb7179088e13bd5345f76e49f2e Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Mon, 19 Oct 2020 16:57:46 +0300 Subject: [PATCH 246/277] setting up multiple receiver and adjusting label and receiver positions --- instat/dlgClimaticSummary.vb | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index 1cc92c0ff31..166b363bda6 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -108,12 +108,11 @@ Public Class dlgClimaticSummary ucrReceiverDOY.strSelectorHeading = "Day Variables" ' summary - ucrReceiverElement.SetParameter(New RParameter("columns_to_summarise", 0)) - ucrReceiverElement.SetParameterIsString() - ucrReceiverElement.strSelectorHeading = "Variables" - ucrReceiverElement.Selector = ucrSelectorVariable - ucrReceiverElement.SetIncludedDataTypes({"numeric"}) - ucrReceiverElement.bAutoFill = True + ucrReceiverElements.SetParameter(New RParameter("columns_to_summarise", 0)) + ucrReceiverElements.SetParameterIsString() + ucrReceiverElements.strSelectorHeading = "Variables" + ucrReceiverElements.Selector = ucrSelectorVariable + ucrReceiverElements.SetIncludedDataTypes({"numeric"}) ' Other checkbox options ucrChkStoreResults.SetParameter(New RParameter("store_results", 3)) @@ -170,7 +169,7 @@ Public Class dlgClimaticSummary bResetSubdialog = True ucrSelectorVariable.Reset() - ucrReceiverElement.SetMeAsReceiver() + ucrReceiverElements.SetMeAsReceiver() 'TODO: this changes to from >= receiver and to <= receiver if annual-variable is checekd. clsFromAndToConditionOperator.bToScriptAsRString = True @@ -222,7 +221,7 @@ Public Class dlgClimaticSummary ucrChkAddDateColumn.SetRCode(clsAddDateFunction, bReset) ucrSelectorVariable.SetRCode(clsDefaultFunction, bReset) - ucrReceiverElement.SetRCode(clsDefaultFunction, bReset) + ucrReceiverElements.SetRCode(clsDefaultFunction, bReset) ucrChkStoreResults.SetRCode(clsDefaultFunction, bReset) ucrChkPrintOutput.SetRCode(clsDefaultFunction, bReset) ucrChkOmitMissing.SetRCode(clsDefaultFunction, bReset) @@ -233,7 +232,7 @@ Public Class dlgClimaticSummary 'TODO: run these things at the correct times Public Sub TestOKEnabled() - If Not clsSummariesList.clsParameters.Count = 0 AndAlso Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElement.IsEmpty AndAlso sdgSummaries.bOkEnabled Then + If Not clsSummariesList.clsParameters.Count = 0 AndAlso Not ucrReceiverDate.IsEmpty AndAlso Not ucrReceiverElements.IsEmpty AndAlso sdgSummaries.bOkEnabled Then If rdoAnnual.Checked Then If Not ucrReceiverDOY.IsEmpty AndAlso (Not ucrReceiverYear.IsEmpty OrElse Not ucrReceiverStation.IsEmpty) Then ucrBase.OKEnabled(True) @@ -282,8 +281,8 @@ Public Class dlgClimaticSummary Private Sub WithinYearLabelReceiverLocation() If rdoWithinYear.Checked Then - lblWithinYear.Location = New Point(lblWithinYear.Location.X, iReceiverMaxY / 1.25) - ucrReceiverWithinYear.Location = New Point(ucrReceiverWithinYear.Location.X, iReceiverLabelMaxY / 1.11) + lblWithinYear.Location = New Point(lblWithinYear.Location.X, iReceiverMaxY / 1.19) + ucrReceiverWithinYear.Location = New Point(ucrReceiverWithinYear.Location.X, iReceiverLabelMaxY / 1.08) Else lblWithinYear.Location = New Point(lblWithinYear.Location.X, iReceiverLabelMaxY) ucrReceiverWithinYear.Location = New Point(ucrReceiverWithinYear.Location.X, iReceiverMaxY) @@ -329,7 +328,7 @@ Public Class dlgClimaticSummary WithinYearLabelReceiverLocation() SetFactors() If (rdoWithinYear.Checked AndAlso (ucrSelectorVariable.CurrentReceiver Is ucrReceiverYear)) OrElse (rdoAnnual.Checked AndAlso (ucrSelectorVariable.CurrentReceiver Is ucrReceiverWithinYear)) Then - ucrReceiverElement.SetMeAsReceiver() + ucrReceiverElements.SetMeAsReceiver() End If End Sub @@ -382,11 +381,11 @@ Public Class dlgClimaticSummary End If End Sub - Private Sub Receivers_controlValueChanged(ucrChangedControl As Control) Handles ucrReceiverStation.ControlValueChanged, ucrReceiverWithinYear.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrReceiverElement.ControlValueChanged, ucrReceiverDOY.ControlValueChanged, ucrReceiverDate.ControlValueChanged + Private Sub Receivers_controlValueChanged(ucrChangedControl As Control) Handles ucrReceiverStation.ControlValueChanged, ucrReceiverWithinYear.ControlValueChanged, ucrReceiverYear.ControlValueChanged, ucrReceiverElements.ControlValueChanged, ucrReceiverDOY.ControlValueChanged, ucrReceiverDate.ControlValueChanged SetFactors() End Sub - Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverElement.ControlContentsChanged, ucrReceiverWithinYear.ControlContentsChanged, ucrPnlAnnualWithin.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged + Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverWithinYear.ControlContentsChanged, ucrPnlAnnualWithin.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged TestOKEnabled() End Sub End Class \ No newline at end of file From 8fd746a00bc117bb5e56fa772210ef1a19003a87 Mon Sep 17 00:00:00 2001 From: N-thony Date: Tue, 20 Oct 2020 09:09:28 +0200 Subject: [PATCH 247/277] Fixing the bug on ucrSaveDetails --- instat/dlgInventoryPlot.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index 38d496b5e67..f7278ece2c0 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -162,8 +162,8 @@ Public Class dlgInventoryPlot ucrPnlOptions.AddRSyntaxContainsFunctionNamesCondition(rdoGraph, {frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot"}) ucrPnlOptions.AddToLinkedControls({ucrChkDisplayRainDays, ucrChkFlipCoordinates, ucrChkShowNonMissing, ucrPnlPlotType, ucrSaveGraph, ucrInputTitle, ucrInputFacetBy}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlOptions.AddToLinkedControls({ucrChkSummary}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlOptions.AddToLinkedControls({ucrChkSummary, ucrChkDetails}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDetails.AddToLinkedControls({ucrChkDay, ucrSaveDetails}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrPnlOrder}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkSummary.AddToLinkedControls({ucrChkOmitStart, ucrChkOmitEnd}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDay.SetLinkedDisplayControl(grpDetailsOptions) From 3466d489eb9744699588b0c94c0f9a682e9dde9c Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 20 Oct 2020 11:02:04 +0300 Subject: [PATCH 248/277] 1. Removed extra controls 2. Set TestOk 3. Modify the code. --- instat/dlgVisualizeData.Designer.vb | 75 --------------------------- instat/dlgVisualizeData.vb | 78 +++++++++-------------------- 2 files changed, 25 insertions(+), 128 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 69c15dec724..69d29527460 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -27,18 +27,12 @@ Partial Class dlgVisualizeData Me.rdoVisGuess = New System.Windows.Forms.RadioButton() Me.rdoWholeDataFrame = New System.Windows.Forms.RadioButton() Me.rdoSelectedColumn = New System.Windows.Forms.RadioButton() - Me.lblPalette = New System.Windows.Forms.Label() Me.lblMaximumSize = New System.Windows.Forms.Label() Me.lblMillionDataPoints = New System.Windows.Forms.Label() Me.lblPaltte = New System.Windows.Forms.Label() - Me.lblMaximumS = New System.Windows.Forms.Label() - Me.lblDataPoints = New System.Windows.Forms.Label() Me.lblSampling = New System.Windows.Forms.Label() Me.ucrNudSamplingFunction = New instat.ucrNud() - Me.ucrNudMaximum = New instat.ucrNud() Me.ucrNudMaximumSize = New instat.ucrNud() - Me.ucrInputComboboxPaletteGuess = New instat.ucrInputComboBox() - Me.ucrChkSortMiss = New instat.ucrCheck() Me.ucrChkSortVariables = New instat.ucrCheck() Me.ucrInputComboboxPalette = New instat.ucrInputComboBox() Me.ucrReceiverVisualizeData = New instat.ucrReceiverMultiple() @@ -119,15 +113,6 @@ Partial Class dlgVisualizeData Me.rdoSelectedColumn.Text = "Selected Variables" Me.rdoSelectedColumn.UseVisualStyleBackColor = True ' - 'lblPalette - ' - Me.lblPalette.AutoSize = True - Me.lblPalette.Location = New System.Drawing.Point(10, 269) - Me.lblPalette.Name = "lblPalette" - Me.lblPalette.Size = New System.Drawing.Size(43, 13) - Me.lblPalette.TabIndex = 13 - Me.lblPalette.Text = "Palette:" - ' 'lblMaximumSize ' Me.lblMaximumSize.AutoSize = True @@ -155,24 +140,6 @@ Partial Class dlgVisualizeData Me.lblPaltte.TabIndex = 21 Me.lblPaltte.Text = "Palette:" ' - 'lblMaximumS - ' - Me.lblMaximumS.AutoSize = True - Me.lblMaximumS.Location = New System.Drawing.Point(10, 296) - Me.lblMaximumS.Name = "lblMaximumS" - Me.lblMaximumS.Size = New System.Drawing.Size(77, 13) - Me.lblMaximumS.TabIndex = 24 - Me.lblMaximumS.Text = "Maximum Size:" - ' - 'lblDataPoints - ' - Me.lblDataPoints.AutoSize = True - Me.lblDataPoints.Location = New System.Drawing.Point(149, 296) - Me.lblDataPoints.Name = "lblDataPoints" - Me.lblDataPoints.Size = New System.Drawing.Size(94, 13) - Me.lblDataPoints.TabIndex = 25 - Me.lblDataPoints.Text = "Million Data Points" - ' 'lblSampling ' Me.lblSampling.AutoSize = True @@ -196,18 +163,6 @@ Partial Class dlgVisualizeData Me.ucrNudSamplingFunction.TabIndex = 26 Me.ucrNudSamplingFunction.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrNudMaximum - ' - Me.ucrNudMaximum.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaximum.Increment = New Decimal(New Integer() {1, 0, 0, 0}) - Me.ucrNudMaximum.Location = New System.Drawing.Point(93, 293) - Me.ucrNudMaximum.Maximum = New Decimal(New Integer() {100, 0, 0, 0}) - Me.ucrNudMaximum.Minimum = New Decimal(New Integer() {0, 0, 0, 0}) - Me.ucrNudMaximum.Name = "ucrNudMaximum" - Me.ucrNudMaximum.Size = New System.Drawing.Size(50, 20) - Me.ucrNudMaximum.TabIndex = 23 - Me.ucrNudMaximum.Value = New Decimal(New Integer() {0, 0, 0, 0}) - ' 'ucrNudMaximumSize ' Me.ucrNudMaximumSize.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) @@ -220,24 +175,6 @@ Partial Class dlgVisualizeData Me.ucrNudMaximumSize.TabIndex = 22 Me.ucrNudMaximumSize.Value = New Decimal(New Integer() {0, 0, 0, 0}) ' - 'ucrInputComboboxPaletteGuess - ' - Me.ucrInputComboboxPaletteGuess.AddQuotesIfUnrecognised = True - Me.ucrInputComboboxPaletteGuess.GetSetSelectedIndex = -1 - Me.ucrInputComboboxPaletteGuess.IsReadOnly = False - Me.ucrInputComboboxPaletteGuess.Location = New System.Drawing.Point(58, 266) - Me.ucrInputComboboxPaletteGuess.Name = "ucrInputComboboxPaletteGuess" - Me.ucrInputComboboxPaletteGuess.Size = New System.Drawing.Size(85, 21) - Me.ucrInputComboboxPaletteGuess.TabIndex = 20 - ' - 'ucrChkSortMiss - ' - Me.ucrChkSortMiss.Checked = False - Me.ucrChkSortMiss.Location = New System.Drawing.Point(13, 242) - Me.ucrChkSortMiss.Name = "ucrChkSortMiss" - Me.ucrChkSortMiss.Size = New System.Drawing.Size(145, 20) - Me.ucrChkSortMiss.TabIndex = 19 - ' 'ucrChkSortVariables ' Me.ucrChkSortVariables.Checked = False @@ -315,17 +252,11 @@ Partial Class dlgVisualizeData Me.ClientSize = New System.Drawing.Size(417, 405) Me.Controls.Add(Me.lblSampling) Me.Controls.Add(Me.ucrNudSamplingFunction) - Me.Controls.Add(Me.lblDataPoints) - Me.Controls.Add(Me.lblMaximumS) - Me.Controls.Add(Me.ucrNudMaximum) Me.Controls.Add(Me.ucrNudMaximumSize) Me.Controls.Add(Me.lblPaltte) - Me.Controls.Add(Me.ucrInputComboboxPaletteGuess) - Me.Controls.Add(Me.ucrChkSortMiss) Me.Controls.Add(Me.ucrChkSortVariables) Me.Controls.Add(Me.lblMillionDataPoints) Me.Controls.Add(Me.lblMaximumSize) - Me.Controls.Add(Me.lblPalette) Me.Controls.Add(Me.ucrInputComboboxPalette) Me.Controls.Add(Me.ucrReceiverVisualizeData) Me.Controls.Add(Me.rdoSelectedColumn) @@ -361,17 +292,11 @@ Partial Class dlgVisualizeData Friend WithEvents rdoSelectedColumn As RadioButton Friend WithEvents ucrReceiverVisualizeData As ucrReceiverMultiple Friend WithEvents ucrInputComboboxPalette As ucrInputComboBox - Friend WithEvents lblPalette As Label Friend WithEvents lblMillionDataPoints As Label Friend WithEvents lblMaximumSize As Label Friend WithEvents ucrChkSortVariables As ucrCheck - Friend WithEvents ucrChkSortMiss As ucrCheck - Friend WithEvents ucrInputComboboxPaletteGuess As ucrInputComboBox Friend WithEvents lblPaltte As Label Friend WithEvents ucrNudMaximumSize As ucrNud - Friend WithEvents ucrNudMaximum As ucrNud - Friend WithEvents lblMaximumS As Label - Friend WithEvents lblDataPoints As Label Friend WithEvents lblSampling As Label Friend WithEvents ucrNudSamplingFunction As ucrNud End Class \ No newline at end of file diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index e796fa73fe3..6f56762ed49 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -55,27 +55,19 @@ Public Class dlgVisualizeData ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisMiss, "vis_miss") ucrPnlVisualizeData.AddFunctionNamesCondition(rdoVisGuess, "vis_guess") - ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortMiss, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPaletteGuess, {rdoVisGuess}, bNewLinkedHideIfParameterMissing:=True) - ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximumSize, {rdoVisDat}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.9) - ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximum, {rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.9) + ucrPnlVisualizeData.AddToLinkedControls(ucrChkSortVariables, {rdoVisDat, rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrInputComboboxPalette, {rdoVisDat, rdoVisGuess}, bNewLinkedHideIfParameterMissing:=True) + ucrPnlVisualizeData.AddToLinkedControls(ucrNudMaximumSize, {rdoVisDat, rdoVisMiss}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True, bNewLinkedChangeToDefaultState:=True, objNewDefaultState:=0.9) ucrPnlSelectData.AddRadioButton(rdoWholeDataFrame) ucrPnlSelectData.AddRadioButton(rdoSelectedColumn) ucrPnlSelectData.AddParameterPresentCondition(rdoWholeDataFrame, "data") ucrPnlSelectData.AddParameterPresentCondition(rdoSelectedColumn, "x") - ucrChkSortVariables.SetParameter(New RParameter("sort_type", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=False) + ucrChkSortVariables.SetParameter(New RParameter("sort_type", 1), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=False) ucrChkSortVariables.SetText("Sort Variables") ucrChkSortVariables.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - - ucrChkSortMiss.SetParameter(New RParameter("sort_miss", 2), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=False) - ucrChkSortMiss.SetText("Sort Variables") - ucrChkSortMiss.SetValuesCheckedAndUnchecked("TRUE", "FALSE") - ucrInputComboboxPalette.SetParameter(New RParameter("palette", 2)) dctPalette.Add("default", Chr(34) & "default" & Chr(34)) dctPalette.Add("qual", Chr(34) & "qual" & Chr(34)) @@ -83,22 +75,12 @@ Public Class dlgVisualizeData ucrInputComboboxPalette.SetDropDownStyleAsNonEditable() ucrInputComboboxPalette.SetItems(dctPalette) - ucrInputComboboxPaletteGuess.SetParameter(New RParameter("palette", 1)) - dctPaletteGuess.Add("default", Chr(34) & "default" & Chr(34)) - dctPaletteGuess.Add("qual", Chr(34) & "qual" & Chr(34)) - dctPaletteGuess.Add("cb_safe", Chr(34) & "cb_safe" & Chr(34)) - ucrInputComboboxPaletteGuess.SetDropDownStyleAsNonEditable() - ucrInputComboboxPaletteGuess.SetItems(dctPaletteGuess) - - ucrNudMaximumSize.SetParameter(New RParameter("large_data_size", 4)) ucrNudMaximumSize.DecimalPlaces = 1 - ucrNudMaximumSize.Increment = 0.1 - ucrNudMaximumSize.SetMinMax(0.1, Integer.MaxValue) - ucrNudMaximum.SetParameter(New RParameter("large_data_size", 5)) - ucrNudMaximum.DecimalPlaces = 1 - ucrNudMaximum.Increment = 0.1 - ucrNudMaximum.SetMinMax(0.1, Integer.MaxValue) + ucrNudMaximumSize.Increment = 0.1 + ucrNudMaximumSize.Minimum = 0.1 + ucrNudMaximumSize.Maximum = Integer.MaxValue + ''ucrNudMaximumSize.SetMinMax(0.1, Integer.MaxValue) ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() @@ -107,10 +89,6 @@ Public Class dlgVisualizeData ucrReceiverVisualizeData.SetMeAsReceiver() ucrInputComboboxPalette.SetLinkedDisplayControl(lblPaltte) - ucrInputComboboxPaletteGuess.SetLinkedDisplayControl(lblPalette) - lstMaximumControls.Add(lblMaximumS) - lstMaximumControls.Add(lblDataPoints) - ucrNudMaximum.SetLinkedDisplayControl(lstMaximumControls) lstMaximumSizeControls.Add(lblMillionDataPoints) lstMaximumSizeControls.Add(lblMaximumSize) ucrNudMaximumSize.SetLinkedDisplayControl(lstMaximumSizeControls) @@ -154,7 +132,6 @@ Public Class dlgVisualizeData clsVisGuessFunction.SetPackageName("visdat") clsVisGuessFunction.SetRCommand("vis_guess") clsVisGuessFunction.AddParameter("data", clsRFunctionParameter:=ucrSelectorVisualizeData.ucrAvailableDataFrames.clsCurrDataFrame, bIncludeArgumentName:=False, iPosition:=0) - clsVisGuessFunction.AddParameter("palette", Chr(34) & "default" & Chr(34), iPosition:=1) clsCurrBaseFunction.SetAssignTo("last_graph", strTempDataframe:=ucrSelectorVisualizeData.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") ucrBase.clsRsyntax.SetBaseRFunction(clsCurrBaseFunction) @@ -165,19 +142,19 @@ Public Class dlgVisualizeData ucrReceiverVisualizeData.AddAdditionalCodeParameterPair(clsVisGuessFunction, New RParameter("x", 0), 2) ucrSaveGraph.AddAdditionalRCode(clsVisMissFunction, iAdditionalPairNo:=1) ucrSaveGraph.AddAdditionalRCode(clsVisGuessFunction, iAdditionalPairNo:=2) + ucrInputComboboxPalette.AddAdditionalCodeParameterPair(clsVisGuessFunction, New RParameter("palette", 1), iAdditionalPairNo:=1) + ucrChkSortVariables.AddAdditionalCodeParameterPair(clsVisMissFunction, New RParameter("sort_miss", 2), iAdditionalPairNo:=1) ucrPnlSelectData.SetRCode(clsCurrBaseFunction, bReset) ucrPnlVisualizeData.SetRCode(clsCurrBaseFunction, bReset) ucrReceiverVisualizeData.SetRCode(clsVisDatFunction, bReset) ucrSaveGraph.SetRCode(clsVisDatFunction, bReset) - ucrChkSortVariables.SetRCode(clsVisDatFunction, bReset) - ucrChkSortMiss.SetRCode(clsVisMissFunction, bReset) ucrInputComboboxPalette.SetRCode(clsVisDatFunction, bReset) - ucrInputComboboxPaletteGuess.SetRCode(clsVisGuessFunction, bReset) + ucrChkSortVariables.SetRCode(clsVisDatFunction) End Sub Private Sub TestOkEnabled() - If ucrSelectorVisualizeData.ucrAvailableDataFrames.cboAvailableDataFrames.Text = "" OrElse (rdoSelectedColumn.Checked AndAlso ucrReceiverVisualizeData.IsEmpty) OrElse Not ucrSaveGraph.IsComplete() Then + If ucrSelectorVisualizeData.ucrAvailableDataFrames.cboAvailableDataFrames.Text = "" OrElse (rdoSelectedColumn.Checked AndAlso ucrReceiverVisualizeData.IsEmpty) OrElse Not ucrSaveGraph.IsComplete() OrElse (ucrNudMaximumSize.Visible = True AndAlso ucrNudMaximumSize.GetText = "") Then ucrBase.OKEnabled(False) Else ucrBase.OKEnabled(True) @@ -189,11 +166,10 @@ Public Class dlgVisualizeData SetRCodeForControls(True) TestOkEnabled() ' Temporary fix for resetting the maximum value when the default is not changed - ConvertToDecimal() MaximumDataPoint() End Sub - Private Sub ucrCore_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVisualizeData.ControlContentsChanged, ucrSelectorVisualizeData.ControlContentsChanged, ucrPnlSelectData.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged + Private Sub ucrCore_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverVisualizeData.ControlContentsChanged, ucrSelectorVisualizeData.ControlContentsChanged, ucrPnlSelectData.ControlContentsChanged, ucrSaveGraph.ControlContentsChanged, ucrNudMaximumSize.ControlValueChanged TestOkEnabled() End Sub @@ -228,29 +204,25 @@ Public Class dlgVisualizeData End If End Sub - Private Sub ucrControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSelectData.ControlValueChanged, ucrSelectorVisualizeData.ControlValueChanged, ucrReceiverVisualizeData.ControlValueChanged, ucrInputComboboxPalette.ControlValueChanged, ucrInputComboboxPaletteGuess.ControlValueChanged + Private Sub ucrControls_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlSelectData.ControlValueChanged, ucrSelectorVisualizeData.ControlValueChanged, ucrReceiverVisualizeData.ControlValueChanged, ucrInputComboboxPalette.ControlValueChanged AddRemoveDataHideOptionsButtons() End Sub - Private Sub ConvertToDecimal() - Dim Value As Decimal = System.Convert.ToDecimal(ucrNudMaximumSize.GetText()) - Dim strLargeDataSizeParamVal As Integer = Value * 1000000 - - clsVisDatFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=4) - End Sub - + ''' + '''This sub converts the maximum size nud's value To millions + ''' Private Sub MaximumDataPoint() - Dim Value As Decimal = System.Convert.ToDecimal(ucrNudMaximum.GetText()) - Dim strLargeDataSizeParamVal As Integer = Value * 1000000 - - clsVisMissFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=5) + Dim strNudValue As String = ucrNudMaximumSize.GetText() + Dim dcNudValue As Decimal + Dim strLargeDataSizeParamVal As Integer + If Decimal.TryParse(strNudValue, dcNudValue) Then + strLargeDataSizeParamVal = dcNudValue * 1000000 + clsVisMissFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=5) + clsVisDatFunction.AddParameter("large_data_size", strParameterValue:=strLargeDataSizeParamVal, iPosition:=4) + End If End Sub Private Sub ucrNudMaximumSize_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaximumSize.ControlValueChanged - ConvertToDecimal() - End Sub - - Private Sub ucrNudMaximum_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrNudMaximum.ControlValueChanged MaximumDataPoint() End Sub End Class \ No newline at end of file From 0e03b6aa162f7829cfbc16746000874a687751bc Mon Sep 17 00:00:00 2001 From: N-thony Date: Tue, 20 Oct 2020 12:51:15 +0200 Subject: [PATCH 249/277] Resolving comments --- instat/dlgInventoryPlot.resx | 12 ++++++------ instat/dlgInventoryPlot.vb | 13 +++++-------- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/instat/dlgInventoryPlot.resx b/instat/dlgInventoryPlot.resx index 22030ed9f00..49a4099b563 100644 --- a/instat/dlgInventoryPlot.resx +++ b/instat/dlgInventoryPlot.resx @@ -292,7 +292,7 @@ NoControl - 10, 215 + 7, 215 121, 23 @@ -322,7 +322,7 @@ NoControl - 10, 240 + 7, 240 121, 23 @@ -511,7 +511,7 @@ 6 - 10, 254 + 7, 254 381, 60 @@ -694,7 +694,7 @@ 6 - 10, 316 + 7, 316 381, 114 @@ -829,7 +829,7 @@ 2 - 10, 269 + 7, 269 201, 53 @@ -1093,7 +1093,7 @@ 21 - 10, 32 + 7, 32 0, 0, 0, 0 diff --git a/instat/dlgInventoryPlot.vb b/instat/dlgInventoryPlot.vb index f7278ece2c0..e0dcc02fb94 100644 --- a/instat/dlgInventoryPlot.vb +++ b/instat/dlgInventoryPlot.vb @@ -163,14 +163,11 @@ Public Class dlgInventoryPlot ucrPnlOptions.AddToLinkedControls({ucrChkDisplayRainDays, ucrChkFlipCoordinates, ucrChkShowNonMissing, ucrPnlPlotType, ucrSaveGraph, ucrInputTitle, ucrInputFacetBy}, {rdoGraph}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrPnlOptions.AddToLinkedControls({ucrChkSummary, ucrChkDetails}, {rdoMissing}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) - ucrChkDetails.AddToLinkedControls({ucrChkDay, ucrSaveDetails}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) + ucrChkDetails.AddToLinkedControls({ucrChkDay}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDetails.AddToLinkedControls({ucrPnlOrder}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkSummary.AddToLinkedControls({ucrChkOmitStart, ucrChkOmitEnd}, {True}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrChkDay.SetLinkedDisplayControl(grpDetailsOptions) - ucrChkSummary.SetLinkedDisplayControl(ucrPnlOrder) ucrChkSummary.SetLinkedDisplayControl(grpOptions) - ucrPnlOrder.SetLinkedDisplayControl(rdoDateOrder) - ucrPnlOrder.SetLinkedDisplayControl(rdoElementOrder) ucrPnlPlotType.SetLinkedDisplayControl(grpPlotType) ucrInputTitle.SetLinkedDisplayControl(lblGraphTitle) ucrInputFacetBy.SetLinkedDisplayControl(lblFacetBy) @@ -190,9 +187,9 @@ Public Class dlgInventoryPlot ucrSaveDetails.Reset() clsInventoryPlot.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$make_inventory_plot") - clsInventoryPlot.AddParameter("coord_flip", "FALSE") - clsInventoryPlot.AddParameter("year_doy_plot", "FALSE") - clsInventoryPlot.AddParameter("facet_by", "NULL") + clsInventoryPlot.AddParameter("coord_flip", "FALSE", iPosition:=4) + clsInventoryPlot.AddParameter("year_doy_plot", "FALSE", iPosition:=6) + clsInventoryPlot.AddParameter("facet_by", "NULL", iPosition:=8) clsInventoryPlot.SetAssignTo("last_graph", strTempDataframe:=ucrInventoryPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempGraph:="last_graph") clsClimaticMissing.SetRCommand("climatic_missing") @@ -323,7 +320,7 @@ Public Class dlgInventoryPlot End Sub - Private Sub ucrBase_ClickClose(sender As Object, e As EventArgs) Handles ucrBase.ClickClose + Private Sub ucrBase_ClickClose(sender As Object, e As EventArgs) Handles ucrBase.ClickClose, Me.Closing If rdoMissing.Checked AndAlso Not (ucrChkSummary.Checked OrElse ucrChkDetails.Checked) Then ucrBase.clsRsyntax.AddToAfterCodes(clsClimaticMissing, iPosition:=1) clsClimaticDetails.iCallType = 2 From eda91507197e0a9245fe2f626f6d6648067899c7 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Tue, 20 Oct 2020 15:04:50 +0300 Subject: [PATCH 250/277] Changed to lower case the variable name(calc1) --- instat/dlgCalculator.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 055538f06e7..f6b0d6dc7b9 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -78,7 +78,7 @@ Public Class dlgCalculator ucrBase.clsRsyntax.AddToBeforeCodes(clsAttach) ucrBase.clsRsyntax.AddToAfterCodes(clsDetach) ucrBase.clsRsyntax.SetCommandString("") - ucrCalc.ucrSaveResultInto.SetPrefix("Calc") + ucrCalc.ucrSaveResultInto.SetPrefix("calc") ucrCalc.ucrSaveResultInto.SetSaveTypeAsColumn() ucrCalc.ucrSaveResultInto.SetIsTextBox() ucrCalc.ucrSaveResultInto.SetLabelText("Save Result Into:") From 0efa915c3d25cce72ff81b63a70a083f83da962e Mon Sep 17 00:00:00 2001 From: N-thony Date: Tue, 20 Oct 2020 18:26:09 +0200 Subject: [PATCH 251/277] Making elements and levels as factors --- instat/static/InstatObject/R/stand_alone_functions.R | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/instat/static/InstatObject/R/stand_alone_functions.R b/instat/static/InstatObject/R/stand_alone_functions.R index a7f8d907b3f..63541eba7d5 100644 --- a/instat/static/InstatObject/R/stand_alone_functions.R +++ b/instat/static/InstatObject/R/stand_alone_functions.R @@ -1382,7 +1382,8 @@ climatic_details <- function(data, date, elements = ..., stations, data.stack <- data %>% tidyr::pivot_longer(cols = c({{ elements }}), names_to = "Element", - values_to = "Value") + values_to = "Value") %>% + dplyr::mutate(Element = as.factor(Element)) # sort start/end times @@ -1479,7 +1480,8 @@ climatic_details <- function(data, date, elements = ..., stations, list_tables[[i]] <- detail.table.year } - detail.table.all <- plyr::ldply(list_tables, data.frame) + detail.table.all <- plyr::ldply(list_tables, data.frame) %>% + dplyr::mutate(Level = as.factor(Level)) return(detail.table.all) From 5e20d4df75d987bf652d510dc42e989a0b40ff5b Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 20 Oct 2020 20:01:13 +0300 Subject: [PATCH 252/277] renaming climatic>file>Open Gridded Data --- instat/frmMain.Designer.vb | 12 +- instat/frmMain.resx | 1264 ++++++++++++++++++------------------ instat/frmMain.vb | 2 +- 3 files changed, 639 insertions(+), 639 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index bc0bbb2c4d0..d3dce50d290 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -181,7 +181,7 @@ Partial Class frmMain Me.mnuClimatic = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticFile = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticFileOpensst = New System.Windows.Forms.ToolStripMenuItem() - Me.mnuClimaticFileOpenGriddedData = New System.Windows.Forms.ToolStripMenuItem() + Me.mnuClimaticFileImportfromIRIDataLibrary = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticFileImportandTidyNetCDF = New System.Windows.Forms.ToolStripMenuItem() Me.mnuClimaticFileOpenandTidyShapefile = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripSeparator20 = New System.Windows.Forms.ToolStripSeparator() @@ -1453,7 +1453,7 @@ Partial Class frmMain ' 'mnuClimaticFile ' - Me.mnuClimaticFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFileOpensst, Me.mnuClimaticFileOpenGriddedData, Me.mnuClimaticFileImportandTidyNetCDF, Me.mnuClimaticFileOpenandTidyShapefile, Me.ToolStripSeparator20, Me.mnuClimateFileImportFromClimSoft, Me.mnuClimateFileImportFromClimSoftWizard, Me.mnuClimaticFileImportFromCliData, Me.ToolStripSeparator15, Me.mnuClimaticFileExportToCPT}) + Me.mnuClimaticFile.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticFileOpensst, Me.mnuClimaticFileImportfromIRIDataLibrary, Me.mnuClimaticFileImportandTidyNetCDF, Me.mnuClimaticFileOpenandTidyShapefile, Me.ToolStripSeparator20, Me.mnuClimateFileImportFromClimSoft, Me.mnuClimateFileImportFromClimSoftWizard, Me.mnuClimaticFileImportFromCliData, Me.ToolStripSeparator15, Me.mnuClimaticFileExportToCPT}) Me.mnuClimaticFile.Name = "mnuClimaticFile" resources.ApplyResources(Me.mnuClimaticFile, "mnuClimaticFile") ' @@ -1462,10 +1462,10 @@ Partial Class frmMain Me.mnuClimaticFileOpensst.Name = "mnuClimaticFileOpensst" resources.ApplyResources(Me.mnuClimaticFileOpensst, "mnuClimaticFileOpensst") ' - 'mnuClimaticFileOpenGriddedData + 'mnuClimaticFileImportfromIRIDataLibrary ' - Me.mnuClimaticFileOpenGriddedData.Name = "mnuClimaticFileOpenGriddedData" - resources.ApplyResources(Me.mnuClimaticFileOpenGriddedData, "mnuClimaticFileOpenGriddedData") + Me.mnuClimaticFileImportfromIRIDataLibrary.Name = "mnuClimaticFileImportfromIRIDataLibrary" + resources.ApplyResources(Me.mnuClimaticFileImportfromIRIDataLibrary, "mnuClimaticFileImportfromIRIDataLibrary") ' 'mnuClimaticFileImportandTidyNetCDF ' @@ -4512,7 +4512,7 @@ Partial Class frmMain Friend WithEvents ucrDataFrameMeta As ucrDataFrameMetadata Friend WithEvents ucrLogWindow As ucrLog Friend WithEvents ucrScriptWindow As ucrScript - Friend WithEvents mnuClimaticFileOpenGriddedData As ToolStripMenuItem + Friend WithEvents mnuClimaticFileImportfromIRIDataLibrary As ToolStripMenuItem Friend WithEvents mnuDescribeOneVariableRatingData As ToolStripMenuItem Friend WithEvents mnuPrepareFactorViewLabels As ToolStripMenuItem Friend WithEvents mnuDescribeViewGraph As ToolStripMenuItem diff --git a/instat/frmMain.resx b/instat/frmMain.resx index fd4bcfed5ef..51e2711a10f 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -118,18 +118,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 64, 20 - - - Describe - - - 172, 22 - - - One Variable - 146, 22 @@ -157,11 +145,11 @@ Rating Data... - + 172, 22 - - Two Variables + + One Variable 146, 22 @@ -184,11 +172,11 @@ Frequencies... - + 172, 22 - - Three Variables + + Two Variables @@ -218,11 +206,11 @@ Frequencies - + 172, 22 - - Specific + + Three Variables 209, 22 @@ -311,11 +299,11 @@ Mosaic Plot... - + 172, 22 - - General + + Specific 188, 22 @@ -347,14 +335,14 @@ Use Summaries... - - 169, 6 - - + 172, 22 - - Multivariate + + General + + + 169, 6 203, 22 @@ -374,6 +362,12 @@ Canonical Correlations... + + 172, 22 + + + Multivariate + 169, 6 @@ -404,17 +398,11 @@ View Graph... - - 53, 20 - - - Model - - - 201, 22 + + 64, 20 - - Probability Distributions + + Describe 242, 22 @@ -437,14 +425,14 @@ Random Samples (Use Model)... - - 198, 6 - - + 201, 22 - - Fit Model + + Probability Distributions + + + 198, 6 223, 22 @@ -494,11 +482,11 @@ Fit Model Keyboard... - + 201, 22 - - Compare Models + + Fit Model 149, 22 @@ -506,11 +494,11 @@ One Variable... - + 201, 22 - - Use Model + + Compare Models 192, 22 @@ -554,14 +542,11 @@ Use Model Keyboard... - - False - - + 201, 22 - - Other (One Variable) + + Use Model 166, 22 @@ -596,14 +581,14 @@ Goodness of Fit... - + False - + 201, 22 - - Other (Two Variables) + + Other (One Variable) False @@ -650,14 +635,14 @@ Non Parameteric One Way ANOVA... - + False - + 201, 22 - - Other (Three Variable) + + Other (Two Variables) False @@ -680,14 +665,14 @@ Chi-square Test... - + False - + 201, 22 - - Other (General) + + Other (Three Variable) False @@ -716,6 +701,21 @@ Log Linear... + + False + + + 201, 22 + + + Other (General) + + + 53, 20 + + + Model + False @@ -740,15 +740,6 @@ False - - 212, 22 - - - Evaporation - - - False - False @@ -767,13 +758,13 @@ Penman... - + 212, 22 - - Crop + + Evaporation - + False @@ -794,6 +785,15 @@ Water Satisfaction Index... + + 212, 22 + + + Crop + + + False + False @@ -806,12 +806,6 @@ False - - 44, 20 - - - View - 211, 22 @@ -878,11 +872,11 @@ Reset to Default Layout - + 44, 20 - - Help + + View 221, 22 @@ -944,12 +938,6 @@ 218, 6 - - 221, 22 - - - Guides - 166, 22 @@ -971,6 +959,12 @@ More... + + 221, 22 + + + Guides + False @@ -992,6 +986,12 @@ Acknowlegments + + 44, 20 + + + Help + 538, 56 @@ -1001,29 +1001,17 @@ 638, 56 - - 63, 20 - - - Climatic - - - 212, 22 - - - File - 247, 22 Open SST... - + 247, 22 - - Open Gridded Data (IRI)... + + Import from IRI Data Library... 247, 22 @@ -1070,14 +1058,14 @@ Export to CPT... - - 209, 6 - - + 212, 22 - - Tidy and Examine + + File + + + 209, 6 211, 22 @@ -1157,11 +1145,11 @@ One Variable Frequencies - + 212, 22 - - Dates + + Tidy and Examine 162, 22 @@ -1205,17 +1193,17 @@ Use Time... - + 212, 22 - - Define Climatic Data... + + Dates - + 212, 22 - - Check Data + + Define Climatic Data... 178, 22 @@ -1262,11 +1250,11 @@ Homogenization... - + 212, 22 - - Prepare + + Check Data 189, 22 @@ -1427,14 +1415,14 @@ False - - 209, 6 - - + 212, 22 - - Describe + + Prepare + + + 209, 6 False @@ -1454,18 +1442,18 @@ Temperature... - - 199, 22 - - - Wind Speed/Direction... - 139, 22 Wind Rose... + + 199, 22 + + + Wind Speed/Direction... + False @@ -1490,11 +1478,11 @@ 196, 6 - + 212, 22 - - PICSA + + Describe 246, 22 @@ -1523,11 +1511,11 @@ Crops... - + 212, 22 - - CM SAF + + PICSA 231, 22 @@ -1541,11 +1529,11 @@ Export to CM SAF R Toolbox... - + 212, 22 - - Compare + + CM SAF 198, 22 @@ -1604,17 +1592,17 @@ Taylor Diagram... - + 212, 22 - - Mapping... + + Compare - + 212, 22 - - Model + + Mapping... 180, 22 @@ -1637,14 +1625,14 @@ Markov Modelling... - - 209, 6 - - + 212, 22 - - Seasonal Forecast Support + + Model + + + 209, 6 246, 22 @@ -1685,20 +1673,11 @@ Cumulative/Exceedance Graph... - + 212, 22 - - Climate Methods - - - False - - - 199, 22 - - - Data Manipulation + + Seasonal Forecast Support False @@ -1835,11 +1814,11 @@ Output for CDT... - + 199, 22 - - Graphics + + Data Manipulation False @@ -1958,6 +1937,12 @@ Three Summaries... + + 199, 22 + + + Graphics + False @@ -1967,12 +1952,6 @@ Model... - - 199, 22 - - - Additional - False @@ -2018,6 +1997,12 @@ Water Balance... + + 199, 22 + + + Additional + False @@ -2027,6 +2012,21 @@ Create Climate Object... + + 212, 22 + + + Climate Methods + + + False + + + 63, 20 + + + Climatic + Ctrl+S @@ -2037,12 +2037,6 @@ Save... - - 232, 22 - - - Save As - 164, 22 @@ -2067,6 +2061,12 @@ Save Script As... + + 232, 22 + + + Save As + False @@ -2097,12 +2097,6 @@ Exit - - 39, 20 - - - Edit - False @@ -2187,12 +2181,24 @@ Select All + + 39, 20 + + + Edit + 775, 56 946, 56 + + 119, 17 + + + No worksheet loaded + 0, 460 @@ -2217,42 +2223,9 @@ 1 - - 119, 17 - - - No worksheet loaded - 17, 95 - - 0, 24 - - - No - - - 834, 37 - - - 7 - - - Tool - - - Tool_strip - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 2 - Magenta @@ -2316,6 +2289,18 @@ Edit Last Dialog + + 57, 6 + + + False + + + 57, 6 + + + False + Magenta @@ -2325,17 +2310,17 @@ Last 10 Dialogs - - 57, 6 + + 128, 22 - - False + + R Viewer... - - 57, 6 + + 128, 22 - - False + + Plotly... @@ -2375,18 +2360,6 @@ View Last Graph - - 128, 22 - - - R Viewer... - - - 128, 22 - - - Plotly... - 6, 37 @@ -2408,6 +2381,18 @@ Output Window + + 196, 22 + + + Column Metadata... + + + 196, 22 + + + Data Frame Metadata... + iVBORw0KGgoAAAANSUhEUgAAAG8AAABvCAYAAADixZ5gAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -2464,17 +2449,17 @@ Column Metadata - - 196, 22 + + 160, 22 - - Column Metadata... + + Log Window... - - 196, 22 + + 160, 22 - - Data Frame Metadata... + + Script Window... @@ -2604,18 +2589,6 @@ Log Window - - 160, 22 - - - Log Window... - - - 160, 22 - - - Script Window... - Magenta @@ -2637,245 +2610,38 @@ He&lp - - 122, 95 - - - On - - - 37, 20 - - - File - - - 59, 20 - - - Prepare - - - 192, 22 - - - Define... - - - 192, 22 - - - Calculator... - - - 192, 22 - - - Summaries... - - - 189, 6 - - - False - - - 192, 22 - - - Scatter Plot... - - - False - - - 192, 22 - - - Density Plot... - - - False - - - 192, 22 - - - Rose Plot... - - - 189, 6 - - - 192, 22 - - - Wind Rose... - - - False - - - 192, 22 - - - Wind/Pollution Rose... - - - False - - - 180, 22 - - - Percentile Rose... - - - False - - - 180, 22 - - - Polar Plot... - - - False - - - 180, 22 - - - Polar Frequency... - - - False - - - 180, 22 - - - Polar Cluster... - - - False - - - 180, 22 - - - Polar Annulus... - - - 192, 22 - - - Other Rose Plots - - - 189, 6 - - - False - - - 192, 22 - - - Circlize... - - - 186, 22 - - - Circular - - - 186, 22 - - - Low_Flow - - - 186, 22 - - - Survival - - - 186, 22 - - - Time Series - - - 183, 6 - - - 186, 22 - - - Climatic... - - - 186, 22 - - - Procurement... - - - 186, 22 - - - Options by Context... - - - 74, 20 - - - Structured - - - 88, 20 - - - Procurement - - - 122, 20 - - - Options by Context - - - 46, 20 - - - Tools + + 0, 24 - - 0, 0 + + No - - 834, 24 + + 834, 37 - - 6 + + 7 - - Menu_strip + + Tool - - mnuBar + + Tool_strip - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + $this - - 3 + + 2 + + + 122, 95 + + + On Ctrl+N @@ -2949,12 +2715,6 @@ 229, 6 - - 232, 22 - - - Export - 204, 22 @@ -2979,6 +2739,12 @@ Export Graph As Image... + + 232, 22 + + + Export + 232, 22 @@ -2988,11 +2754,11 @@ 229, 6 - - 172, 22 + + 37, 20 - - Data Frame + + File 200, 22 @@ -3102,11 +2868,11 @@ Colour by Property... - + 172, 22 - - Check Data + + Data Frame 245, 22 @@ -3201,6 +2967,12 @@ Anonymise ID Column... + + 172, 22 + + + Check Data + 169, 6 @@ -3210,12 +2982,6 @@ Calculator... - - 172, 22 - - - Column: Calculate - 179, 22 @@ -3270,11 +3036,11 @@ Permute Columns... - + 172, 22 - - Column: Factor + + Column: Calculate 179, 22 @@ -3363,11 +3129,11 @@ Factor Data Frame... - + 172, 22 - - Column: Text + + Column: Factor 152, 22 @@ -3408,11 +3174,11 @@ Distance... - + 172, 22 - - Column: Date + + Column: Text 162, 22 @@ -3456,11 +3222,11 @@ Use Time... - + 172, 22 - - Column: Define + + Column: Date 176, 22 @@ -3477,14 +3243,14 @@ Circular... - - 169, 6 - - + 172, 22 - - Data Reshape + + Column: Define + + + 169, 6 193, 22 @@ -3546,14 +3312,14 @@ Transpose... - - 169, 6 - - + 172, 22 - - Keys and Links + + Data Reshape + + + 169, 6 207, 22 @@ -3585,11 +3351,11 @@ Add Comment... - + 172, 22 - - Data Object + + Keys and Links False @@ -3660,44 +3426,191 @@ Reorder Metadata... - + + False + + + 210, 22 + + + Delete Metadata... + + + 172, 22 + + + Data Object + + + 126, 22 + + + View... + + + 126, 22 + + + Rename... + + + 126, 22 + + + Reorder... + + + 126, 22 + + + Delete... + + + 172, 22 + + + R Objects + + + 59, 20 + + + Prepare + + + 192, 22 + + + Define... + + + 192, 22 + + + Calculator... + + + 192, 22 + + + Summaries... + + + 189, 6 + + + False + + + 192, 22 + + + Scatter Plot... + + + False + + + 192, 22 + + + Density Plot... + + + False + + + 192, 22 + + + Rose Plot... + + + 189, 6 + + + 192, 22 + + + Wind Rose... + + + False + + + 192, 22 + + + Wind/Pollution Rose... + + + False + + + 168, 22 + + + Percentile Rose... + + + False + + + 168, 22 + + + Polar Plot... + + + False + + + 168, 22 + + + Polar Frequency... + + False - - 210, 22 + + 168, 22 - - Delete Metadata... + + Polar Cluster... - - 172, 22 + + False - - R Objects + + 168, 22 - - 126, 22 + + Polar Annulus... - - View... + + 192, 22 - - 126, 22 + + Other Rose Plots - - Rename... + + 189, 6 - - 126, 22 + + False - - Reorder... + + 192, 22 - - 126, 22 + + Circlize... - - Delete... + + 186, 22 + + + Circular 117, 22 @@ -3705,12 +3618,24 @@ Define... + + 186, 22 + + + Low_Flow + 117, 22 Define... + + 186, 22 + + + Survival + 119, 22 @@ -3720,12 +3645,6 @@ 116, 6 - - 119, 22 - - - Describe - 149, 22 @@ -3738,14 +3657,14 @@ General... - - 116, 6 - - + 119, 22 - - Model + + Describe + + + 116, 6 149, 22 @@ -3759,9 +3678,48 @@ General... + + 119, 22 + + + Model + 116, 6 + + 186, 22 + + + Time Series + + + 183, 6 + + + 186, 22 + + + Climatic... + + + 186, 22 + + + Procurement... + + + 186, 22 + + + Options by Context... + + + 74, 20 + + + Structured + 216, 22 @@ -3774,12 +3732,6 @@ Define Procurement Data... - - 216, 22 - - - Prepare - 358, 22 @@ -3834,11 +3786,11 @@ Merge Additional Data... - + 216, 22 - - Describe + + Prepare 211, 22 @@ -3855,12 +3807,6 @@ 208, 6 - - 211, 22 - - - Categorical - 319, 22 @@ -3900,11 +3846,11 @@ Display Top N... - + 211, 22 - - Numeric + + Categorical 258, 22 @@ -3927,11 +3873,17 @@ Correlations (Red Flags or others)... - + + 211, 22 + + + Numeric + + 216, 22 - - Mapping + + Describe 189, 22 @@ -3939,11 +3891,11 @@ Map Country Values... - + 216, 22 - - Model + + Mapping 292, 22 @@ -3957,6 +3909,12 @@ Fit Model... + + 216, 22 + + + Model + 213, 6 @@ -3966,12 +3924,6 @@ Define Red Flag Variables... - - 216, 22 - - - Corruption Risk Index - 278, 22 @@ -3984,11 +3936,17 @@ Summarise CRI by Country (or other)... - - 250, 22 + + 216, 22 - - Check Data + + Corruption Risk Index + + + 88, 20 + + + Procurement 215, 22 @@ -4023,17 +3981,17 @@ One Variable Frequencies... - + 250, 22 - - Define Options by Context Data... + + Check Data - + 250, 22 - - Prepare + + Define Options by Context Data... 282, 22 @@ -4062,11 +4020,11 @@ Unstack... - + 250, 22 - - Describe + + Prepare 224, 22 @@ -4089,11 +4047,11 @@ Boxplot... - + 250, 22 - - Model + + Describe 176, 22 @@ -4107,6 +4065,18 @@ General Fit Model... + + 250, 22 + + + Model + + + 122, 20 + + + Options by Context + False @@ -4173,6 +4143,36 @@ Options... + + 46, 20 + + + Tools + + + 0, 0 + + + 834, 24 + + + 6 + + + Menu_strip + + + mnuBar + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 + 126, 22 @@ -7263,10 +7263,10 @@ System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - mnuClimaticFileOpenGriddedData + + mnuClimaticFileImportfromIRIDataLibrary - + System.Windows.Forms.ToolStripMenuItem, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 056de3c66cb..227c738f340 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -1408,7 +1408,7 @@ Public Class frmMain ctrActive = ucrDataFrameMeta End Sub - Private Sub mnuClimaticFileOpenGriddedData_Click(sender As Object, e As EventArgs) Handles mnuClimaticFileOpenGriddedData.Click + Private Sub mnuClimaticFileImportfromIRIDataLibrary_Click(sender As Object, e As EventArgs) Handles mnuClimaticFileImportfromIRIDataLibrary.Click dlgImportGriddedData.ShowDialog() End Sub From 3eb59442597e6d5b76205f1d7447afccd5c8054c Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 20 Oct 2020 20:23:56 +0300 Subject: [PATCH 253/277] added ... --- instat/frmMain.resx | 64 ++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 51e2711a10f..85015ed0564 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -744,7 +744,7 @@ False - 127, 22 + 180, 22 Site... @@ -753,7 +753,7 @@ False - 127, 22 + 180, 22 Penman... @@ -1068,82 +1068,82 @@ 209, 6 - 211, 22 + 215, 22 - Visualise Data + Visualise Data... - 211, 22 + 215, 22 Tidy Daily Data... - 211, 22 + 215, 22 Non-numeric Cases... - 211, 22 + 215, 22 Replace Values... - 211, 22 + 215, 22 Duplicates... - 208, 6 + 212, 6 - 211, 22 + 215, 22 Stack... - 211, 22 + 215, 22 Unstack... - 211, 22 + 215, 22 Merge... - 211, 22 + 215, 22 Append... - 208, 6 + 212, 6 - 211, 22 + 215, 22 One Variable Summarise... - 211, 22 + 215, 22 One Variable Graph... - 211, 22 + 215, 22 - One Variable Frequencies + One Variable Frequencies... 212, 22 @@ -1152,25 +1152,25 @@ Tidy and Examine - 162, 22 + 180, 22 Generate Dates... - 162, 22 + 180, 22 Make Date... - 162, 22 + 180, 22 Fill Date Gaps... - 162, 22 + 180, 22 Use Date... @@ -1179,7 +1179,7 @@ False - 162, 22 + 180, 22 Make Time... @@ -1188,7 +1188,7 @@ False - 162, 22 + 180, 22 Use Time... @@ -1206,46 +1206,46 @@ Define Climatic Data... - 178, 22 + 180, 22 Inventory... - 178, 22 + 180, 22 Fill Missing Values... - 175, 6 + 177, 6 - 178, 22 + 180, 22 Display Daily... - 178, 22 + 180, 22 Boxplot... - 178, 22 + 180, 22 QC Temperatures... - 178, 22 + 180, 22 QC Rainfall... - 178, 22 + 180, 22 Homogenization... From 9d3540bf381ea68305c3d9b8f88115e9c524d9d9 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Tue, 20 Oct 2020 20:58:32 +0300 Subject: [PATCH 254/277] swapping display daily with infill missing values. Fixes#6031 --- instat/frmMain.Designer.vb | 2 +- instat/frmMain.resx | 1100 ++++++++++++++++++------------------ 2 files changed, 551 insertions(+), 551 deletions(-) diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index d3dce50d290..68e2230b066 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -1632,7 +1632,7 @@ Partial Class frmMain ' 'mnuClimaticCheckData ' - Me.mnuClimaticCheckData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCheckDataInventory, Me.mnuClimaticCheckDataFillMissingValues, Me.ToolStripSeparator65, Me.mnuClimaticCheckDataDisplayDaily, Me.mnuClimaticCheckDataBoxplot, Me.mnuClimaticCheckDataQCTemperatures, Me.mnuClimaticCheckDataQCRainfall, Me.mnuClimaticCheckDataHomogenization}) + Me.mnuClimaticCheckData.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuClimaticCheckDataInventory, Me.mnuClimaticCheckDataDisplayDaily, Me.ToolStripSeparator65, Me.mnuClimaticCheckDataFillMissingValues, Me.mnuClimaticCheckDataBoxplot, Me.mnuClimaticCheckDataQCTemperatures, Me.mnuClimaticCheckDataQCRainfall, Me.mnuClimaticCheckDataHomogenization}) Me.mnuClimaticCheckData.Name = "mnuClimaticCheckData" resources.ApplyResources(Me.mnuClimaticCheckData, "mnuClimaticCheckData") ' diff --git a/instat/frmMain.resx b/instat/frmMain.resx index 85015ed0564..9921bcac2e5 100644 --- a/instat/frmMain.resx +++ b/instat/frmMain.resx @@ -118,6 +118,18 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 64, 20 + + + Describe + + + 172, 22 + + + One Variable + 146, 22 @@ -145,11 +157,11 @@ Rating Data... - + 172, 22 - - One Variable + + Two Variables 146, 22 @@ -172,11 +184,11 @@ Frequencies... - + 172, 22 - - Two Variables + + Three Variables @@ -206,11 +218,11 @@ Frequencies - + 172, 22 - - Three Variables + + Specific 209, 22 @@ -299,11 +311,11 @@ Mosaic Plot... - + 172, 22 - - Specific + + General 188, 22 @@ -335,15 +347,15 @@ Use Summaries... - - 172, 22 - - - General - 169, 6 + + 172, 22 + + + Multivariate + 203, 22 @@ -362,12 +374,6 @@ Canonical Correlations... - - 172, 22 - - - Multivariate - 169, 6 @@ -398,11 +404,17 @@ View Graph... - - 64, 20 + + 53, 20 - - Describe + + Model + + + 201, 22 + + + Probability Distributions 242, 22 @@ -425,15 +437,15 @@ Random Samples (Use Model)... - - 201, 22 - - - Probability Distributions - 198, 6 + + 201, 22 + + + Fit Model + 223, 22 @@ -482,11 +494,11 @@ Fit Model Keyboard... - + 201, 22 - - Fit Model + + Compare Models 149, 22 @@ -494,11 +506,11 @@ One Variable... - + 201, 22 - - Compare Models + + Use Model 192, 22 @@ -542,11 +554,14 @@ Use Model Keyboard... - + + False + + 201, 22 - - Use Model + + Other (One Variable) 166, 22 @@ -581,14 +596,14 @@ Goodness of Fit... - + False - + 201, 22 - - Other (One Variable) + + Other (Two Variables) False @@ -635,14 +650,14 @@ Non Parameteric One Way ANOVA... - + False - + 201, 22 - - Other (Two Variables) + + Other (Three Variable) False @@ -665,14 +680,14 @@ Chi-square Test... - + False - + 201, 22 - - Other (Three Variable) + + Other (General) False @@ -701,21 +716,6 @@ Log Linear... - - False - - - 201, 22 - - - Other (General) - - - 53, 20 - - - Model - False @@ -740,6 +740,15 @@ False + + 212, 22 + + + Evaporation + + + False + False @@ -758,13 +767,13 @@ Penman... - + 212, 22 - - Evaporation + + Crop - + False @@ -785,15 +794,6 @@ Water Satisfaction Index... - - 212, 22 - - - Crop - - - False - False @@ -806,6 +806,12 @@ False + + 44, 20 + + + View + 211, 22 @@ -872,11 +878,11 @@ Reset to Default Layout - + 44, 20 - - View + + Help 221, 22 @@ -938,6 +944,12 @@ 218, 6 + + 221, 22 + + + Guides + 166, 22 @@ -959,48 +971,183 @@ More... - + + False + + 221, 22 - - Guides + + About R-Instat - - False + + 221, 22 + + + Licence... + + + 221, 22 + + + Acknowlegments + + + 538, 56 + + + 209, 6 + + + 638, 56 + + + 212, 22 + + + File + + + 209, 6 + + + 212, 22 + + + Tidy and Examine + + + 212, 22 + + + Dates + + + 212, 22 + + + Define Climatic Data... + + + 180, 22 + + + Inventory... + + + 180, 22 + + + Display Daily... + + + 177, 6 + + + 180, 22 + + + Fill Missing Values... + + + 180, 22 + + + Boxplot... + + + 180, 22 + + + QC Temperatures... + + + 180, 22 + + + QC Rainfall... + + + 180, 22 + + + Homogenization... + + + 212, 22 + + + Check Data + + + 212, 22 + + + Prepare + + + 209, 6 + + + 212, 22 + + + Describe + + + 212, 22 + + + PICSA + + + 212, 22 + + + CM SAF + + + 212, 22 + + + Compare + + + 212, 22 + + + Mapping... - - 221, 22 + + 212, 22 - - About R-Instat + + Model - - 221, 22 + + 209, 6 - - Licence... + + 212, 22 - - 221, 22 + + Seasonal Forecast Support - - Acknowlegments + + 212, 22 - - 44, 20 + + Climate Methods - - Help + + False - - 538, 56 - - - 209, 6 + + 63, 20 + + + Climatic - - 638, 56 - 247, 22 @@ -1058,15 +1205,6 @@ Export to CPT... - - 212, 22 - - - File - - - 209, 6 - 215, 22 @@ -1145,12 +1283,6 @@ One Variable Frequencies... - - 212, 22 - - - Tidy and Examine - 180, 22 @@ -1193,69 +1325,6 @@ Use Time... - - 212, 22 - - - Dates - - - 212, 22 - - - Define Climatic Data... - - - 180, 22 - - - Inventory... - - - 180, 22 - - - Fill Missing Values... - - - 177, 6 - - - 180, 22 - - - Display Daily... - - - 180, 22 - - - Boxplot... - - - 180, 22 - - - QC Temperatures... - - - 180, 22 - - - QC Rainfall... - - - 180, 22 - - - Homogenization... - - - 212, 22 - - - Check Data - 189, 22 @@ -1415,15 +1484,6 @@ False - - 212, 22 - - - Prepare - - - 209, 6 - False @@ -1442,18 +1502,18 @@ Temperature... - - 139, 22 - - - Wind Rose... - 199, 22 Wind Speed/Direction... + + 139, 22 + + + Wind Rose... + False @@ -1478,12 +1538,6 @@ 196, 6 - - 212, 22 - - - Describe - 246, 22 @@ -1511,12 +1565,6 @@ Crops... - - 212, 22 - - - PICSA - 231, 22 @@ -1529,12 +1577,6 @@ Export to CM SAF R Toolbox... - - 212, 22 - - - CM SAF - 198, 22 @@ -1592,18 +1634,6 @@ Taylor Diagram... - - 212, 22 - - - Compare - - - 212, 22 - - - Mapping... - 180, 22 @@ -1625,15 +1655,6 @@ Markov Modelling... - - 212, 22 - - - Model - - - 209, 6 - 246, 22 @@ -1673,11 +1694,11 @@ Cumulative/Exceedance Graph... - - 212, 22 + + 199, 22 - - Seasonal Forecast Support + + Data Manipulation False @@ -1814,11 +1835,11 @@ Output for CDT... - + 199, 22 - - Data Manipulation + + Graphics False @@ -1937,12 +1958,6 @@ Three Summaries... - - 199, 22 - - - Graphics - False @@ -1952,6 +1967,12 @@ Model... + + 199, 22 + + + Additional + False @@ -1997,12 +2018,6 @@ Water Balance... - - 199, 22 - - - Additional - False @@ -2012,21 +2027,6 @@ Create Climate Object... - - 212, 22 - - - Climate Methods - - - False - - - 63, 20 - - - Climatic - Ctrl+S @@ -2037,6 +2037,12 @@ Save... + + 232, 22 + + + Save As + 164, 22 @@ -2061,12 +2067,6 @@ Save Script As... - - 232, 22 - - - Save As - False @@ -2097,6 +2097,12 @@ Exit + + 39, 20 + + + Edit + False @@ -2178,14 +2184,8 @@ 183, 22 - - Select All - - - 39, 20 - - - Edit + + Select All 775, 56 @@ -2193,12 +2193,6 @@ 946, 56 - - 119, 17 - - - No worksheet loaded - 0, 460 @@ -2223,9 +2217,42 @@ 1 + + 119, 17 + + + No worksheet loaded + 17, 95 + + 0, 24 + + + No + + + 834, 37 + + + 7 + + + Tool + + + Tool_strip + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 2 + Magenta @@ -2289,18 +2316,6 @@ Edit Last Dialog - - 57, 6 - - - False - - - 57, 6 - - - False - Magenta @@ -2310,17 +2325,17 @@ Last 10 Dialogs - - 128, 22 + + 57, 6 - - R Viewer... + + False - - 128, 22 + + 57, 6 - - Plotly... + + False @@ -2360,6 +2375,18 @@ View Last Graph + + 128, 22 + + + R Viewer... + + + 128, 22 + + + Plotly... + 6, 37 @@ -2381,18 +2408,6 @@ Output Window - - 196, 22 - - - Column Metadata... - - - 196, 22 - - - Data Frame Metadata... - iVBORw0KGgoAAAANSUhEUgAAAG8AAABvCAYAAADixZ5gAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -2449,17 +2464,17 @@ Column Metadata - - 160, 22 + + 196, 22 - - Log Window... + + Column Metadata... - - 160, 22 + + 196, 22 - - Script Window... + + Data Frame Metadata... @@ -2589,6 +2604,18 @@ Log Window + + 160, 22 + + + Log Window... + + + 160, 22 + + + Script Window... + Magenta @@ -2610,38 +2637,71 @@ He&lp - - 0, 24 + + 122, 95 + + + On - - No + + 37, 20 - - 834, 37 + + File - - 7 + + 59, 20 - - Tool + + Prepare - - Tool_strip + + 74, 20 - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + Structured - - $this + + 88, 20 - - 2 + + Procurement - - 122, 95 - - - On + + 122, 20 + + + Options by Context + + + 46, 20 + + + Tools + + + 0, 0 + + + 834, 24 + + + 6 + + + Menu_strip + + + mnuBar + + + System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 3 Ctrl+N @@ -2715,6 +2775,12 @@ 229, 6 + + 232, 22 + + + Export + 204, 22 @@ -2739,12 +2805,6 @@ Export Graph As Image... - - 232, 22 - - - Export - 232, 22 @@ -2754,11 +2814,11 @@ 229, 6 - - 37, 20 + + 172, 22 - - File + + Data Frame 200, 22 @@ -2868,11 +2928,11 @@ Colour by Property... - + 172, 22 - - Data Frame + + Check Data 245, 22 @@ -2967,12 +3027,6 @@ Anonymise ID Column... - - 172, 22 - - - Check Data - 169, 6 @@ -2982,6 +3036,12 @@ Calculator... + + 172, 22 + + + Column: Calculate + 179, 22 @@ -3036,11 +3096,11 @@ Permute Columns... - + 172, 22 - - Column: Calculate + + Column: Factor 179, 22 @@ -3129,11 +3189,11 @@ Factor Data Frame... - + 172, 22 - - Column: Factor + + Column: Text 152, 22 @@ -3174,11 +3234,11 @@ Distance... - + 172, 22 - - Column: Text + + Column: Date 162, 22 @@ -3222,11 +3282,11 @@ Use Time... - + 172, 22 - - Column: Date + + Column: Define 176, 22 @@ -3243,15 +3303,15 @@ Circular... - - 172, 22 - - - Column: Define - 169, 6 + + 172, 22 + + + Data Reshape + 193, 22 @@ -3312,15 +3372,15 @@ Transpose... - - 172, 22 - - - Data Reshape - 169, 6 + + 172, 22 + + + Keys and Links + 207, 22 @@ -3351,11 +3411,11 @@ Add Comment... - + 172, 22 - - Keys and Links + + Data Object False @@ -3435,11 +3495,11 @@ Delete Metadata... - + 172, 22 - - Data Object + + R Objects 126, 22 @@ -3465,17 +3525,11 @@ Delete... - - 172, 22 - - - R Objects - - - 59, 20 + + 186, 22 - - Prepare + + Circular 192, 22 @@ -3543,6 +3597,12 @@ Wind/Pollution Rose... + + 192, 22 + + + Other Rose Plots + False @@ -3588,12 +3648,6 @@ Polar Annulus... - - 192, 22 - - - Other Rose Plots - 189, 6 @@ -3606,11 +3660,11 @@ Circlize... - + 186, 22 - - Circular + + Low_Flow 117, 22 @@ -3618,11 +3672,11 @@ Define... - + 186, 22 - - Low_Flow + + Survival 117, 22 @@ -3630,11 +3684,11 @@ Define... - + 186, 22 - - Survival + + Time Series 119, 22 @@ -3645,6 +3699,12 @@ 116, 6 + + 119, 22 + + + Describe + 149, 22 @@ -3657,15 +3717,15 @@ General... - - 119, 22 - - - Describe - 116, 6 + + 119, 22 + + + Model + 149, 22 @@ -3678,21 +3738,9 @@ General... - - 119, 22 - - - Model - 116, 6 - - 186, 22 - - - Time Series - 183, 6 @@ -3714,12 +3762,6 @@ Options by Context... - - 74, 20 - - - Structured - 216, 22 @@ -3732,6 +3774,12 @@ Define Procurement Data... + + 216, 22 + + + Prepare + 358, 22 @@ -3786,11 +3834,11 @@ Merge Additional Data... - + 216, 22 - - Prepare + + Describe 211, 22 @@ -3807,6 +3855,12 @@ 208, 6 + + 211, 22 + + + Categorical + 319, 22 @@ -3846,11 +3900,11 @@ Display Top N... - + 211, 22 - - Categorical + + Numeric 258, 22 @@ -3873,17 +3927,11 @@ Correlations (Red Flags or others)... - - 211, 22 - - - Numeric - - + 216, 22 - - Describe + + Mapping 189, 22 @@ -3891,11 +3939,11 @@ Map Country Values... - + 216, 22 - - Mapping + + Model 292, 22 @@ -3909,12 +3957,6 @@ Fit Model... - - 216, 22 - - - Model - 213, 6 @@ -3924,6 +3966,12 @@ Define Red Flag Variables... + + 216, 22 + + + Corruption Risk Index + 278, 22 @@ -3936,17 +3984,11 @@ Summarise CRI by Country (or other)... - - 216, 22 - - - Corruption Risk Index - - - 88, 20 + + 250, 22 - - Procurement + + Check Data 215, 22 @@ -3981,18 +4023,18 @@ One Variable Frequencies... - - 250, 22 - - - Check Data - 250, 22 Define Options by Context Data... + + 250, 22 + + + Prepare + 282, 22 @@ -4020,11 +4062,11 @@ Unstack... - + 250, 22 - - Prepare + + Describe 224, 22 @@ -4047,11 +4089,11 @@ Boxplot... - + 250, 22 - - Describe + + Model 176, 22 @@ -4065,18 +4107,6 @@ General Fit Model... - - 250, 22 - - - Model - - - 122, 20 - - - Options by Context - False @@ -4143,36 +4173,6 @@ Options... - - 46, 20 - - - Tools - - - 0, 0 - - - 834, 24 - - - 6 - - - Menu_strip - - - mnuBar - - - System.Windows.Forms.MenuStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 3 - 126, 22 From 603c03985b673cd46acc213e3e4f63453ee147f5 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 20 Oct 2020 19:51:07 +0100 Subject: [PATCH 255/277] finished tidy climatic data function, added duplicates check if unstacking, added unstack elements option and visual changes to dialog, fixed bug in ucrReceiverMultiple --- instat/dlgTidyDailyData.Designer.vb | 46 ++-- instat/dlgTidyDailyData.resx | 202 ++++++++++++------ instat/dlgTidyDailyData.vb | 49 +++-- .../static/InstatObject/R/instat_object_R6.R | 50 +++-- instat/ucrReceiverMultiple.vb | 2 +- 5 files changed, 240 insertions(+), 109 deletions(-) diff --git a/instat/dlgTidyDailyData.Designer.vb b/instat/dlgTidyDailyData.Designer.vb index 7ff9416b679..ee16eb20ff9 100644 --- a/instat/dlgTidyDailyData.Designer.vb +++ b/instat/dlgTidyDailyData.Designer.vb @@ -36,12 +36,16 @@ Partial Class dlgTidyDailyData Me.lblColumnstoStack = New System.Windows.Forms.Label() Me.lblMultipleElement = New System.Windows.Forms.Label() Me.grpElements = New System.Windows.Forms.GroupBox() + Me.ucrChkUnstackElements = New instat.ucrCheck() Me.lblOr = New System.Windows.Forms.Label() Me.ucrTextBoxElementName = New instat.ucrInputTextBox() Me.ucrReceiverElement = New instat.ucrReceiverSingle() Me.grpOptions = New System.Windows.Forms.GroupBox() Me.ucrChkIgnoreInvalid = New instat.ucrCheck() Me.ucrChkSilent = New instat.ucrCheck() + Me.lblNewDataFrameName = New System.Windows.Forms.Label() + Me.ttReshapeType = New System.Windows.Forms.ToolTip(Me.components) + Me.ucrInputNewDataFrame = New instat.ucrInputTextBox() Me.ucrReceiverMultipleStack = New instat.ucrReceiverMultiple() Me.ucrReceiverMonth = New instat.ucrReceiverSingle() Me.ucrReceiverDayofMonth = New instat.ucrReceiverSingle() @@ -50,9 +54,7 @@ Partial Class dlgTidyDailyData Me.ucrSelectorTidyDailyData = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrReceiverStation = New instat.ucrReceiverSingle() Me.ucrBase = New instat.ucrButtons() - Me.ucrInputNewDataFrame = New instat.ucrInputTextBox() - Me.lblNewDataFrameName = New System.Windows.Forms.Label() - Me.ttReshapeType = New System.Windows.Forms.ToolTip(Me.components) + Me.lblNColumns = New System.Windows.Forms.Label() Me.grpElements.SuspendLayout() Me.grpOptions.SuspendLayout() Me.SuspendLayout() @@ -129,6 +131,7 @@ Partial Class dlgTidyDailyData ' 'grpElements ' + Me.grpElements.Controls.Add(Me.ucrChkUnstackElements) Me.grpElements.Controls.Add(Me.lblOr) Me.grpElements.Controls.Add(Me.lblElementName) Me.grpElements.Controls.Add(Me.ucrTextBoxElementName) @@ -138,6 +141,12 @@ Partial Class dlgTidyDailyData Me.grpElements.Name = "grpElements" Me.grpElements.TabStop = False ' + 'ucrChkUnstackElements + ' + Me.ucrChkUnstackElements.Checked = False + resources.ApplyResources(Me.ucrChkUnstackElements, "ucrChkUnstackElements") + Me.ucrChkUnstackElements.Name = "ucrChkUnstackElements" + ' 'lblOr ' resources.ApplyResources(Me.lblOr, "lblOr") @@ -180,6 +189,19 @@ Partial Class dlgTidyDailyData resources.ApplyResources(Me.ucrChkSilent, "ucrChkSilent") Me.ucrChkSilent.Name = "ucrChkSilent" ' + 'lblNewDataFrameName + ' + resources.ApplyResources(Me.lblNewDataFrameName, "lblNewDataFrameName") + Me.lblNewDataFrameName.Name = "lblNewDataFrameName" + ' + 'ucrInputNewDataFrame + ' + Me.ucrInputNewDataFrame.AddQuotesIfUnrecognised = True + Me.ucrInputNewDataFrame.IsMultiline = False + Me.ucrInputNewDataFrame.IsReadOnly = False + resources.ApplyResources(Me.ucrInputNewDataFrame, "ucrInputNewDataFrame") + Me.ucrInputNewDataFrame.Name = "ucrInputNewDataFrame" + ' 'ucrReceiverMultipleStack ' Me.ucrReceiverMultipleStack.frmParent = Me @@ -243,23 +265,17 @@ Partial Class dlgTidyDailyData resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'ucrInputNewDataFrame - ' - Me.ucrInputNewDataFrame.AddQuotesIfUnrecognised = True - Me.ucrInputNewDataFrame.IsMultiline = False - Me.ucrInputNewDataFrame.IsReadOnly = False - resources.ApplyResources(Me.ucrInputNewDataFrame, "ucrInputNewDataFrame") - Me.ucrInputNewDataFrame.Name = "ucrInputNewDataFrame" - ' - 'lblNewDataFrameName + 'lblNColumns ' - resources.ApplyResources(Me.lblNewDataFrameName, "lblNewDataFrameName") - Me.lblNewDataFrameName.Name = "lblNewDataFrameName" + resources.ApplyResources(Me.lblNColumns, "lblNColumns") + Me.lblNColumns.ForeColor = System.Drawing.Color.Red + Me.lblNColumns.Name = "lblNColumns" ' 'dlgTidyDailyData ' resources.ApplyResources(Me, "$this") Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.Controls.Add(Me.lblNColumns) Me.Controls.Add(Me.lblNewDataFrameName) Me.Controls.Add(Me.ucrInputNewDataFrame) Me.Controls.Add(Me.grpOptions) @@ -322,4 +338,6 @@ Partial Class dlgTidyDailyData Friend WithEvents lblNewDataFrameName As Label Friend WithEvents ucrInputNewDataFrame As ucrInputTextBox Friend WithEvents ttReshapeType As ToolTip + Friend WithEvents ucrChkUnstackElements As ucrCheck + Friend WithEvents lblNColumns As Label End Class diff --git a/instat/dlgTidyDailyData.resx b/instat/dlgTidyDailyData.resx index d5cef0eeb3b..e52d870a1ed 100644 --- a/instat/dlgTidyDailyData.resx +++ b/instat/dlgTidyDailyData.resx @@ -145,7 +145,7 @@ $this - 17 + 18 Button @@ -157,7 +157,7 @@ NoControl - 284, 30 + 284, 17 120, 27 @@ -181,7 +181,7 @@ $this - 13 + 14 Button @@ -193,7 +193,7 @@ NoControl - 166, 30 + 166, 17 120, 27 @@ -217,7 +217,7 @@ $this - 14 + 15 Button @@ -229,7 +229,7 @@ NoControl - 48, 30 + 48, 17 120, 27 @@ -253,7 +253,7 @@ $this - 15 + 16 True @@ -262,7 +262,7 @@ NoControl - 279, 258 + 279, 239 40, 13 @@ -283,7 +283,7 @@ $this - 8 + 9 True @@ -292,7 +292,7 @@ NoControl - 279, 210 + 279, 191 32, 13 @@ -313,7 +313,7 @@ $this - 10 + 11 True @@ -322,7 +322,7 @@ NoControl - 279, 258 + 279, 239 76, 13 @@ -343,7 +343,7 @@ $this - 11 + 12 True @@ -352,7 +352,7 @@ NoControl - 279, 307 + 279, 288 43, 13 @@ -373,7 +373,7 @@ $this - 6 + 7 True @@ -403,7 +403,7 @@ grpElements - 1 + 2 True @@ -412,7 +412,7 @@ NoControl - 279, 80 + 279, 61 75, 13 @@ -433,7 +433,7 @@ $this - 4 + 5 True @@ -463,7 +463,28 @@ grpElements - 3 + 4 + + + 13, 126 + + + 120, 20 + + + 21 + + + ucrChkUnstackElements + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpElements + + + 0 True @@ -493,7 +514,7 @@ grpElements - 0 + 1 13, 32 @@ -514,7 +535,7 @@ grpElements - 2 + 3 True @@ -525,9 +546,42 @@ 452, 578 + + True + + + NoControl + + + 385, 61 + + + 19, 13 + + + 28 + + + (0) + + + lblNColumns + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 0 + True + + NoControl + 12, 498 @@ -550,7 +604,7 @@ $this - 0 + 1 134, 495 @@ -571,16 +625,7 @@ $this - 1 - - - 8, 19 - - - 209, 20 - - - 22 + 2 ucrChkIgnoreInvalid @@ -594,15 +639,6 @@ 0 - - 8, 53 - - - 209, 20 - - - 23 - ucrChkSilent @@ -616,7 +652,7 @@ 1 - 10, 289 + 10, 270 223, 83 @@ -637,10 +673,10 @@ $this - 2 + 3 - 282, 98 + 282, 79 0, 0, 0, 0 @@ -661,10 +697,10 @@ $this - 5 + 6 - 282, 276 + 282, 257 0, 0, 0, 0 @@ -685,10 +721,10 @@ $this - 7 + 8 - 282, 276 + 282, 257 0, 0, 0, 0 @@ -709,10 +745,10 @@ $this - 9 + 10 - 282, 228 + 282, 209 0, 0, 0, 0 @@ -733,10 +769,10 @@ $this - 12 + 13 - 41, 26 + 41, 13 372, 35 @@ -754,10 +790,10 @@ $this - 16 + 17 - 10, 85 + 10, 66 0, 0, 0, 0 @@ -778,10 +814,10 @@ $this - 18 + 19 - 282, 325 + 282, 306 0, 0, 0, 0 @@ -802,7 +838,7 @@ $this - 19 + 20 10, 524 @@ -823,7 +859,7 @@ $this - 20 + 21 CenterScreen @@ -865,13 +901,13 @@ grpElements - 4 + 5 - 269, 356 + 269, 337 - 144, 132 + 144, 152 15 @@ -886,7 +922,49 @@ $this - 3 + 4 + + + 8, 19 + + + 209, 20 + + + 22 + + + ucrChkIgnoreInvalid + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpOptions + + + 0 + + + 8, 53 + + + 209, 20 + + + 23 + + + ucrChkSilent + + + instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpOptions + + + 1 17, 17 diff --git a/instat/dlgTidyDailyData.vb b/instat/dlgTidyDailyData.vb index 838c8cde746..752e7462558 100644 --- a/instat/dlgTidyDailyData.vb +++ b/instat/dlgTidyDailyData.vb @@ -60,40 +60,54 @@ Public Class dlgTidyDailyData ucrSelectorTidyDailyData.SetParameterIsrfunction() ucrReceiverStation.Selector = ucrSelectorTidyDailyData - ucrReceiverMultipleStack.Selector = ucrSelectorTidyDailyData - ucrReceiverElement.Selector = ucrSelectorTidyDailyData - - ucrReceiverYear.Selector = ucrSelectorTidyDailyData - ucrReceiverMonth.Selector = ucrSelectorTidyDailyData - ucrReceiverDayofMonth.Selector = ucrSelectorTidyDailyData + ucrReceiverStation.SetParameter(New RParameter("station", 6)) + ucrReceiverStation.SetParameterIsString() + ucrReceiverStation.bExcludeFromSelector = True + ucrReceiverStation.SetLinkedDisplayControl(lblStation) + ucrReceiverMultipleStack.Selector = ucrSelectorTidyDailyData ucrReceiverMultipleStack.SetParameter(New RParameter("stack_cols", 2)) ucrReceiverMultipleStack.SetParameterIsString() + ucrReceiverMultipleStack.bExcludeFromSelector = True - ucrReceiverStation.SetParameter(New RParameter("station", 6)) - ucrReceiverStation.SetParameterIsString() - + ucrReceiverElement.Selector = ucrSelectorTidyDailyData ucrReceiverElement.SetParameter(New RParameter("element", 7)) ucrReceiverElement.SetParameterIsString() + ucrReceiverElement.bExcludeFromSelector = True + ucrReceiverElement.SetLinkedDisplayControl(lblMultipleElement) ucrTextBoxElementName.SetParameter(New RParameter("element_name", 8)) ucrTextBoxElementName.SetRDefault(Chr(34) & "value" & Chr(34)) ucrTextBoxElementName.SetValidationTypeAsRVariable() + ucrTextBoxElementName.SetLinkedDisplayControl(lblElementName) + + ucrChkUnstackElements.SetText("Unstack elements") + ucrChkUnstackElements.SetParameter(New RParameter("unstack_elements", 12), bNewChangeParameterValue:=True) + ucrChkUnstackElements.SetRDefault("TRUE") 'rdoYear - 'TODO; Receivers for Station, Month and Day might be added later for the "Year Columns" format. + 'TODO Receivers for Station, Month and Day might be added later for the "Year Columns" format but not currently needed from the "Instat" format. 'rdoMonth + ucrReceiverYear.Selector = ucrSelectorTidyDailyData ucrReceiverYear.SetParameter(New RParameter("year", 5)) ucrReceiverYear.SetParameterIsString() + ucrReceiverYear.bExcludeFromSelector = True + ucrReceiverYear.SetLinkedDisplayControl(lblYear) + ucrReceiverDayofMonth.Selector = ucrSelectorTidyDailyData ucrReceiverDayofMonth.SetParameter(New RParameter("day", 3)) ucrReceiverDayofMonth.SetParameterIsString() + ucrReceiverDayofMonth.bExcludeFromSelector = True + ucrReceiverDayofMonth.SetLinkedDisplayControl(lblDayofMonth) 'rdoDay + ucrReceiverMonth.Selector = ucrSelectorTidyDailyData ucrReceiverMonth.SetParameter(New RParameter("month", 4)) ucrReceiverMonth.SetParameterIsString() + ucrReceiverMonth.bExcludeFromSelector = True + ucrReceiverMonth.SetLinkedDisplayControl(lblMonth) 'Checkboxes ucrChkIgnoreInvalid.SetParameter(New RParameter("ignore_invalid", 9)) @@ -116,16 +130,6 @@ Public Class dlgTidyDailyData ucrPnlReshapeClimaticData.AddParameterValuesCondition(rdoMonth, "format", Chr(34) & "months" & Chr(34)) ucrPnlReshapeClimaticData.AddParameterValuesCondition(rdoDay, "format", Chr(34) & "days" & Chr(34)) - ucrReceiverStation.SetLinkedDisplayControl(lblStation) - - ucrReceiverYear.SetLinkedDisplayControl(lblYear) - ucrReceiverDayofMonth.SetLinkedDisplayControl(lblDayofMonth) - - ucrReceiverMonth.SetLinkedDisplayControl(lblMonth) - - ucrReceiverElement.SetLinkedDisplayControl(lblMultipleElement) - ucrTextBoxElementName.SetLinkedDisplayControl(lblElementName) - ucrInputNewDataFrame.SetParameter(New RParameter("new_name", iNewPosition:=12)) ucrInputNewDataFrame.SetDefaultTypeAsDataFrame() End Sub @@ -233,9 +237,11 @@ Public Class dlgTidyDailyData If Not ucrReceiverElement.IsEmpty Then clsTidyClimaticFunction.RemoveParameterByName("element_name") ucrTextBoxElementName.Enabled = False + ucrChkUnstackElements.Visible = True Else clsTidyClimaticFunction.AddParameter("element_name", Chr(34) & ucrTextBoxElementName.GetText & Chr(34), iPosition:=8) ucrTextBoxElementName.Enabled = True + ucrChkUnstackElements.Visible = False End If End Sub @@ -259,4 +265,7 @@ Public Class dlgTidyDailyData ElementAddRemoveParam() End Sub + Private Sub ucrReceiverMultipleStack_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrReceiverMultipleStack.ControlValueChanged + lblNColumns.Text = "(" & ucrReceiverMultipleStack.lstSelectedVariables.Items.Count & ")" + End Sub End Class diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index e5d338a7e6d..93c6a50f0d9 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1821,7 +1821,7 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r #' @param ignore_invalid If TRUE, rows with non missing element values on invalid dates e.g. 31 Sep or 29 Feb in non leap years, will be removed. #' If FALSE (the default) an error will be given with details of where the values occur. #' Strongly recommended to first run with FALSE and then TRUE after examining or correcting any issues. -#' @param silent If TRUE, rows with non missing element values on invalid dates will not be reported. +#' @param silent If TRUE, detailed output, such as rows with non missing element values on invalid dates or duplicate values will be suppressed. #' @param unstack_elements If TRUE, when there are multiple elements there will be one column for each element (unstacked), otherwise there will be an element #' column and a value column. This also applies to flag columns if included. #' @param new_name Name for the new data frame. @@ -1842,6 +1842,8 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(!missing(year) && !year %in% names(x)) stop("year column not found in x.") if(!missing(station) && !station %in% names(x)) stop("station column not found in x.") if(!missing(element) && !element %in% names(x)) stop("element column not found in x.") + # Default to FALSE and updated if format == "days" + flags <- FALSE # check day column is valid (if specified) if(!missing(day)) { @@ -2045,6 +2047,7 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(sum(invalid_ind) > 0) { cat("There are:", sum(invalid_ind), "measurement values on invalid dates.\n") if(!silent) { + cat("\n*** Invalid dates ***\n\n") invalid_data <- dplyr::filter(y, invalid_ind) if(format == "days" || format == "months") { invalid_data_display <- invalid_data %>% select(year, month, day) @@ -2063,8 +2066,8 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, } if(ignore_invalid) cat("Warning: These rows have been removed.\n") else { - # Don't use a stop here so that output can be displayed by R-Instat - cat("There are:", sum(invalid_ind), "measurement values on invalid dates. Correct these or specify ignore_invalid = TRUE to ignore them. See output for more details.") + # This should be a stop but then detailed output can't be displayed by R-Instat + cat("There are:", sum(invalid_ind), "measurement values on invalid dates. Correct these or specify ignore_invalid = TRUE to ignore them. See output for more details.\n") continue <- FALSE } } @@ -2089,19 +2092,42 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, # pivot_wider allows unstacking multiple column sets, used when flags included. values_from <- c(element_name) if(flags) values_from <- c(values_from, flag_name) - z <- tidyr::pivot_wider(z, names_from = element, values_from = tidyselect::all_of(values_from)) + # first check for unique combinations to ensure no duplicates + z_dup <- duplicated(z %>% dplyr::select(-tidyselect::all_of(values_from))) + if(any(z_dup > 0)) { + # This should be a stop but then detailed output can't be displayed by R-Instat + cat("\nError: Cannot tidy data as some elements have multiple values on the same date. Check and resolve duplicates first.\n") + z_check <- z %>% filter(z_dup > 0) + if(!silent) { + cat("\n*** Duplicates ***\n\n") + print(z_check, row.names = FALSE) + } + continue <- FALSE + } + else z <- tidyr::pivot_wider(z, names_from = element, values_from = tidyselect::all_of(values_from)) } # If not unstacking then need to sort by element column else id_cols <- c(id_cols, "element") } - # Add this last to ensure date varies fastest - id_cols <- c(id_cols, "date") - #z <- z %>% dplyr::arrange(tidyselect::all_of(id_cols)) - - if(missing(new_name) || new_name == "") new_name <- next_default_item("data", existing_names = self$get_data_names()) - data_list <- list(z) - names(data_list) <- new_name - self$import_data(data_tables=data_list) + if(continue) { + # Add this last to ensure date varies fastest + id_cols <- c(id_cols, "date") + print(id_cols) + # TODO Find a better way to do this. Update if there could be more the 3 id cols. + if(length(id_cols) == 1) { + z <- z %>% dplyr::arrange(.data[[id_cols[1]]]) + } + else if(length(id_cols) == 2) { + z <- z %>% dplyr::arrange(.data[[id_cols[1]]], .data[[id_cols[2]]]) + } + else if(length(id_cols) == 3) { + z <- z %>% dplyr::arrange(.data[[id_cols[1]]], .data[[id_cols[2]]], .data[[id_cols[3]]]) + } + if(missing(new_name) || new_name == "") new_name <- next_default_item("data", existing_names = self$get_data_names()) + data_list <- list(z) + names(data_list) <- new_name + self$import_data(data_tables=data_list) + } } } ) diff --git a/instat/ucrReceiverMultiple.vb b/instat/ucrReceiverMultiple.vb index 343eb99f52f..a60dc0fc198 100644 --- a/instat/ucrReceiverMultiple.vb +++ b/instat/ucrReceiverMultiple.vb @@ -92,6 +92,7 @@ Public Class ucrReceiverMultiple Selector.RemoveFromVariablesList(strTempItem) Next OnSelectionChanged() + MyBase.RemoveSelected() End If End Sub @@ -103,7 +104,6 @@ Public Class ucrReceiverMultiple strItems.Add(lviVar.Text) Next Remove(strItems.ToArray()) - 'RemoveSelected() End Sub Public Overrides Function IsEmpty() As Boolean From 7156ccfaec883eabbd10276965517811a366f971 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Tue, 20 Oct 2020 20:02:28 +0100 Subject: [PATCH 256/277] ensured station column is factor, removed print --- instat/static/InstatObject/R/instat_object_R6.R | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 93c6a50f0d9..f02c151ad23 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2074,7 +2074,7 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(continue) { # Standard format of slowest varying structure variables first (station then element then date) followed by measurements - if(!missing(station)) z <- data.frame(station = y$station, date = y$date) + if(!missing(station)) z <- data.frame(station = forcats::as_factor(y$station), date = y$date) else z <- data.frame(date = y$date) if(!missing(element)) z$element <- y$element z[[element_name]] <- y[[element_name]] @@ -2112,7 +2112,6 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(continue) { # Add this last to ensure date varies fastest id_cols <- c(id_cols, "date") - print(id_cols) # TODO Find a better way to do this. Update if there could be more the 3 id cols. if(length(id_cols) == 1) { z <- z %>% dplyr::arrange(.data[[id_cols[1]]]) From 2def28ba05d5f8ebe679ae37bb46e68a65934802 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 21 Oct 2020 11:07:26 +0300 Subject: [PATCH 257/277] dialog label and fixed min/max date for ARC2 data to 1983 --- instat/dlgImportGriddedData.Designer.vb | 128 +++++------ instat/dlgImportGriddedData.resx | 287 ++++++++++++++++-------- instat/dlgImportGriddedData.vb | 14 +- 3 files changed, 270 insertions(+), 159 deletions(-) diff --git a/instat/dlgImportGriddedData.Designer.vb b/instat/dlgImportGriddedData.Designer.vb index a30b5260f35..03bdf661616 100644 --- a/instat/dlgImportGriddedData.Designer.vb +++ b/instat/dlgImportGriddedData.Designer.vb @@ -52,26 +52,26 @@ Partial Class dlgImportGriddedData Me.rdoEntireRange = New System.Windows.Forms.RadioButton() Me.lblTo = New System.Windows.Forms.Label() Me.lblFrom = New System.Windows.Forms.Label() + Me.ucrDtpMinDate = New instat.ucrDateTimePicker() + Me.ucrDtpMaxDate = New instat.ucrDateTimePicker() + Me.ucrPnlDateRange = New instat.UcrPanel() Me.grpLocationRange = New System.Windows.Forms.GroupBox() Me.rdoPoint = New System.Windows.Forms.RadioButton() Me.rdoArea = New System.Windows.Forms.RadioButton() + Me.ucrPnlLocationRange = New instat.UcrPanel() Me.lblMinLon = New System.Windows.Forms.Label() Me.lblMinLat = New System.Windows.Forms.Label() + Me.ucrInputMinLon = New instat.ucrInputTextBox() + Me.ucrInputMinLat = New instat.ucrInputTextBox() + Me.ucrInputMaxLat = New instat.ucrInputTextBox() + Me.ucrInputMaxLon = New instat.ucrInputTextBox() Me.lblSaveDownloadedFileTo = New System.Windows.Forms.Label() Me.ucrInputNewDataFrameName = New instat.ucrInputTextBox() Me.ucrChkDontImportData = New instat.ucrCheck() - Me.ucrDtpMinDate = New instat.ucrDateTimePicker() - Me.ucrDtpMaxDate = New instat.ucrDateTimePicker() - Me.ucrPnlDateRange = New instat.UcrPanel() Me.ucrInputFilePath = New instat.ucrInputTextBox() Me.ucrInputData = New instat.ucrInputComboBox() Me.ucrInputSource = New instat.ucrInputComboBox() Me.ucrBase = New instat.ucrButtons() - Me.ucrPnlLocationRange = New instat.UcrPanel() - Me.ucrInputMinLon = New instat.ucrInputTextBox() - Me.ucrInputMinLat = New instat.ucrInputTextBox() - Me.ucrInputMaxLat = New instat.ucrInputTextBox() - Me.ucrInputMaxLon = New instat.ucrInputTextBox() Me.grpDateRange.SuspendLayout() Me.grpLocationRange.SuspendLayout() Me.SuspendLayout() @@ -164,6 +164,25 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.lblFrom, "lblFrom") Me.lblFrom.Name = "lblFrom" ' + 'ucrDtpMinDate + ' + resources.ApplyResources(Me.ucrDtpMinDate, "ucrDtpMinDate") + Me.ucrDtpMinDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.ucrDtpMinDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.ucrDtpMinDate.Name = "ucrDtpMinDate" + ' + 'ucrDtpMaxDate + ' + resources.ApplyResources(Me.ucrDtpMaxDate, "ucrDtpMaxDate") + Me.ucrDtpMaxDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) + Me.ucrDtpMaxDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) + Me.ucrDtpMaxDate.Name = "ucrDtpMaxDate" + ' + 'ucrPnlDateRange + ' + resources.ApplyResources(Me.ucrPnlDateRange, "ucrPnlDateRange") + Me.ucrPnlDateRange.Name = "ucrPnlDateRange" + ' 'grpLocationRange ' Me.grpLocationRange.Controls.Add(Me.rdoPoint) @@ -207,6 +226,11 @@ Partial Class dlgImportGriddedData Me.rdoArea.Tag = "" Me.rdoArea.UseVisualStyleBackColor = False ' + 'ucrPnlLocationRange + ' + resources.ApplyResources(Me.ucrPnlLocationRange, "ucrPnlLocationRange") + Me.ucrPnlLocationRange.Name = "ucrPnlLocationRange" + ' 'lblMinLon ' resources.ApplyResources(Me.lblMinLon, "lblMinLon") @@ -217,6 +241,38 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.lblMinLat, "lblMinLat") Me.lblMinLat.Name = "lblMinLat" ' + 'ucrInputMinLon + ' + Me.ucrInputMinLon.AddQuotesIfUnrecognised = True + Me.ucrInputMinLon.IsMultiline = False + Me.ucrInputMinLon.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMinLon, "ucrInputMinLon") + Me.ucrInputMinLon.Name = "ucrInputMinLon" + ' + 'ucrInputMinLat + ' + Me.ucrInputMinLat.AddQuotesIfUnrecognised = True + Me.ucrInputMinLat.IsMultiline = False + Me.ucrInputMinLat.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMinLat, "ucrInputMinLat") + Me.ucrInputMinLat.Name = "ucrInputMinLat" + ' + 'ucrInputMaxLat + ' + Me.ucrInputMaxLat.AddQuotesIfUnrecognised = True + Me.ucrInputMaxLat.IsMultiline = False + Me.ucrInputMaxLat.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMaxLat, "ucrInputMaxLat") + Me.ucrInputMaxLat.Name = "ucrInputMaxLat" + ' + 'ucrInputMaxLon + ' + Me.ucrInputMaxLon.AddQuotesIfUnrecognised = True + Me.ucrInputMaxLon.IsMultiline = False + Me.ucrInputMaxLon.IsReadOnly = False + resources.ApplyResources(Me.ucrInputMaxLon, "ucrInputMaxLon") + Me.ucrInputMaxLon.Name = "ucrInputMaxLon" + ' 'lblSaveDownloadedFileTo ' resources.ApplyResources(Me.lblSaveDownloadedFileTo, "lblSaveDownloadedFileTo") @@ -236,25 +292,6 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.ucrChkDontImportData, "ucrChkDontImportData") Me.ucrChkDontImportData.Name = "ucrChkDontImportData" ' - 'ucrDtpMinDate - ' - resources.ApplyResources(Me.ucrDtpMinDate, "ucrDtpMinDate") - Me.ucrDtpMinDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) - Me.ucrDtpMinDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) - Me.ucrDtpMinDate.Name = "ucrDtpMinDate" - ' - 'ucrDtpMaxDate - ' - resources.ApplyResources(Me.ucrDtpMaxDate, "ucrDtpMaxDate") - Me.ucrDtpMaxDate.MaxDate = New Date(9998, 12, 31, 0, 0, 0, 0) - Me.ucrDtpMaxDate.MinDate = New Date(1753, 1, 1, 0, 0, 0, 0) - Me.ucrDtpMaxDate.Name = "ucrDtpMaxDate" - ' - 'ucrPnlDateRange - ' - resources.ApplyResources(Me.ucrPnlDateRange, "ucrPnlDateRange") - Me.ucrPnlDateRange.Name = "ucrPnlDateRange" - ' 'ucrInputFilePath ' Me.ucrInputFilePath.AddQuotesIfUnrecognised = True @@ -284,43 +321,6 @@ Partial Class dlgImportGriddedData resources.ApplyResources(Me.ucrBase, "ucrBase") Me.ucrBase.Name = "ucrBase" ' - 'ucrPnlLocationRange - ' - resources.ApplyResources(Me.ucrPnlLocationRange, "ucrPnlLocationRange") - Me.ucrPnlLocationRange.Name = "ucrPnlLocationRange" - ' - 'ucrInputMinLon - ' - Me.ucrInputMinLon.AddQuotesIfUnrecognised = True - Me.ucrInputMinLon.IsMultiline = False - Me.ucrInputMinLon.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMinLon, "ucrInputMinLon") - Me.ucrInputMinLon.Name = "ucrInputMinLon" - ' - 'ucrInputMinLat - ' - Me.ucrInputMinLat.AddQuotesIfUnrecognised = True - Me.ucrInputMinLat.IsMultiline = False - Me.ucrInputMinLat.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMinLat, "ucrInputMinLat") - Me.ucrInputMinLat.Name = "ucrInputMinLat" - ' - 'ucrInputMaxLat - ' - Me.ucrInputMaxLat.AddQuotesIfUnrecognised = True - Me.ucrInputMaxLat.IsMultiline = False - Me.ucrInputMaxLat.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMaxLat, "ucrInputMaxLat") - Me.ucrInputMaxLat.Name = "ucrInputMaxLat" - ' - 'ucrInputMaxLon - ' - Me.ucrInputMaxLon.AddQuotesIfUnrecognised = True - Me.ucrInputMaxLon.IsMultiline = False - Me.ucrInputMaxLon.IsReadOnly = False - resources.ApplyResources(Me.ucrInputMaxLon, "ucrInputMaxLon") - Me.ucrInputMaxLon.Name = "ucrInputMaxLon" - ' 'dlgImportGriddedData ' resources.ApplyResources(Me, "$this") diff --git a/instat/dlgImportGriddedData.resx b/instat/dlgImportGriddedData.resx index bb3ebf48273..5c927f188a1 100644 --- a/instat/dlgImportGriddedData.resx +++ b/instat/dlgImportGriddedData.resx @@ -597,6 +597,201 @@ 3 + + 48, 65 + + + 180, 20 + + + 1 + + + ucrDtpMinDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 4 + + + 48, 90 + + + 180, 20 + + + 3 + + + ucrDtpMaxDate + + + instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 5 + + + 101, 20 + + + 206, 37 + + + 23 + + + ucrPnlDateRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpDateRange + + + 6 + + + rdoPoint + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLocationRange + + + 0 + + + rdoArea + + + System.Windows.Forms.RadioButton, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLocationRange + + + 1 + + + ucrPnlLocationRange + + + instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 2 + + + lblMinLon + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLocationRange + + + 3 + + + lblMinLat + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + grpLocationRange + + + 4 + + + ucrInputMinLon + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 5 + + + ucrInputMinLat + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 6 + + + ucrInputMaxLat + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 9 + + + ucrInputMaxLon + + + instat.ucrInputTextBox, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + grpLocationRange + + + 10 + + + 3, 174 + + + 408, 117 + + + 5 + + + Location Range + + + grpLocationRange + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + + 12 + Button @@ -834,30 +1029,6 @@ 10 - - 3, 174 - - - 408, 117 - - - 5 - - - Location Range - - - grpLocationRange - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - $this - - - 12 - True @@ -930,69 +1101,6 @@ 2 - - 48, 65 - - - 180, 20 - - - 1 - - - ucrDtpMinDate - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 4 - - - 48, 90 - - - 180, 20 - - - 3 - - - ucrDtpMaxDate - - - instat.ucrDateTimePicker, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 5 - - - 101, 20 - - - 206, 37 - - - 23 - - - ucrPnlDateRange - - - instat.UcrPanel, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpDateRange - - - 6 - 150, 297 @@ -1086,14 +1194,11 @@ 420, 424 - - NoControl - CenterScreen - Import From IRI + Import From IRI (Internet connection needed) dlgImportGriddedData diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 5af662ad6ba..66fee3ba9b6 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -157,13 +157,9 @@ Public Class dlgImportGriddedData dctFiles.Add("RFE2 Daily Precipitation", Chr(34) & "daily_rfev2_est_prcp" & Chr(34)) dctFiles.Add("RFE2 10-day Precipitation", Chr(34) & "10day_rfev2_est_prcp" & Chr(34)) dctFiles.Add("ARC2 Daily Precipitation", Chr(34) & "daily_est_prcp" & Chr(34)) - dctFiles.Add("ARC2 Monthly Precipitation", Chr(34) & "monthly_est_prcp" & Chr(34)) - ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "RFE2 Daily Precipitation" - ucrDtpMinDate.MinDate = New Date(2000, 10, 31) - ucrDtpMaxDate.MinDate = New Date(2000, 10, 31) Case "TAMSAT_v3.0" dctFiles = New Dictionary(Of String, String) dctFiles.Add("v3.0 Daily Rainfall", Chr(34) & "daily_rfe" & Chr(34)) @@ -240,6 +236,16 @@ Public Class dlgImportGriddedData End If End Sub + Private Sub ucrInputData_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrInputData.ControlValueChanged + If ucrInputData.GetText = "RFE2 Daily Precipitation" OrElse ucrInputData.GetText = "RFE2 10-day Precipitation" Then + ucrDtpMinDate.MinDate = New Date(2000, 10, 31) + ucrDtpMaxDate.MinDate = New Date(2000, 10, 31) + ElseIf ucrInputData.GetText = "ARC2 Daily Precipitation" OrElse ucrInputData.GetText = "ARC2 Monthly Precipitation" Then + ucrDtpMinDate.MinDate = New Date(1983, 1, 1) + ucrDtpMaxDate.MinDate = New Date(1983, 1, 1) + End If + End Sub + Private Sub Controls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrInputNewDataFrameName.ControlContentsChanged, ucrInputMinLon.ControlContentsChanged, ucrInputMaxLon.ControlContentsChanged, ucrInputMinLat.ControlContentsChanged, ucrInputMaxLat.ControlContentsChanged, ucrInputFilePath.ControlContentsChanged, ucrDtpMinDate.ControlContentsChanged, ucrDtpMaxDate.ControlContentsChanged, ucrPnlDateRange.ControlContentsChanged TestOkEnabled() End Sub From ce7d1c5c47cd7bf196ad63e634155bba71c83359 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 21 Oct 2020 12:05:13 +0300 Subject: [PATCH 258/277] removed _ from display names --- instat/dlgImportGriddedData.vb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 66fee3ba9b6..947e65f0434 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -41,9 +41,9 @@ Public Class dlgImportGriddedData ucrInputSource.SetParameter(New RParameter("source", 0)) dctDownloadPairs.Add("NASA", Chr(34) & "NASA" & Chr(34)) dctDownloadPairs.Add("NOAA", Chr(34) & "NOAA" & Chr(34)) - dctDownloadPairs.Add("TAMSAT_v3.0", Chr(34) & "TAMSAT_v3.0" & Chr(34)) - dctDownloadPairs.Add("TAMSAT_v3.1", Chr(34) & "TAMSAT_v3.1" & Chr(34)) - dctDownloadPairs.Add("UCSB_CHIRPS", Chr(34) & "UCSB_CHIRPS" & Chr(34)) + dctDownloadPairs.Add("TAMSAT v3.0", Chr(34) & "TAMSAT_v3.0" & Chr(34)) + dctDownloadPairs.Add("TAMSAT v3.1", Chr(34) & "TAMSAT_v3.1" & Chr(34)) + dctDownloadPairs.Add("UCSB CHIRPS", Chr(34) & "UCSB_CHIRPS" & Chr(34)) ucrInputSource.SetItems(dctDownloadPairs) ucrInputSource.SetDropDownStyleAsNonEditable() @@ -160,7 +160,7 @@ Public Class dlgImportGriddedData dctFiles.Add("ARC2 Monthly Precipitation", Chr(34) & "monthly_est_prcp" & Chr(34)) ucrInputData.SetItems(dctFiles) ucrInputData.cboInput.SelectedItem = "RFE2 Daily Precipitation" - Case "TAMSAT_v3.0" + Case "TAMSAT v3.0" dctFiles = New Dictionary(Of String, String) dctFiles.Add("v3.0 Daily Rainfall", Chr(34) & "daily_rfe" & Chr(34)) dctFiles.Add("v3.0 Dekadal Rainfall", Chr(34) & "dekadal_rfe" & Chr(34)) @@ -170,7 +170,7 @@ Public Class dlgImportGriddedData ucrInputData.cboInput.SelectedItem = "v3.0 Daily Rainfall" ucrDtpMinDate.MinDate = New Date(1983, 1, 1) ucrDtpMaxDate.MinDate = New Date(1983, 1, 1) - Case "TAMSAT_v3.1" + Case "TAMSAT v3.1" dctFiles = New Dictionary(Of String, String) dctFiles.Add("v3.1 Daily Rainfall", Chr(34) & "daily_rfe" & Chr(34)) dctFiles.Add("v3.1 Daily Rainfall Complete (Filled)", Chr(34) & "daily_rfe_filled" & Chr(34)) @@ -182,7 +182,7 @@ Public Class dlgImportGriddedData ucrInputData.cboInput.SelectedItem = "v3.1 Daily Rainfall" ucrDtpMinDate.MinDate = New Date(1983, 1, 1) ucrDtpMaxDate.MinDate = New Date(1983, 1, 1) - Case "UCSB_CHIRPS" + Case "UCSB CHIRPS" dctFiles = New Dictionary(Of String, String) dctFiles.Add("Daily Precipitation 0.05 degree", Chr(34) & "daily_improved_global_0p05_prcp" & Chr(34)) dctFiles.Add("Dekad Precipitation 0.05 degree", Chr(34) & "dekad_prcp" & Chr(34)) From 09320dca852e1c35689fc887e222c493610c71fb Mon Sep 17 00:00:00 2001 From: Shadrack Kibet Date: Wed, 21 Oct 2020 12:26:48 +0300 Subject: [PATCH 259/277] Update instat/dlgColumnStats.vb Co-authored-by: Danny Parsons --- instat/dlgColumnStats.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgColumnStats.vb b/instat/dlgColumnStats.vb index c0bc334ad30..40d4ac03bfd 100644 --- a/instat/dlgColumnStats.vb +++ b/instat/dlgColumnStats.vb @@ -192,7 +192,7 @@ Public Class dlgColumnStats Else clsDefaultFunction.RemoveParameterByName("use") End If - If Not ucrChkOmitMissing.Checked AndAlso clsDefaultFunction.ContainsParameter("na_type") Then + If Not ucrChkOmitMissing.Checked Then clsDefaultFunction.RemoveParameterByName("na_type") Else clsDefaultFunction.AddParameter("na_type", clsRFunctionParameter:=clsConcFunction, iPosition:=9) @@ -233,4 +233,4 @@ Public Class dlgColumnStats Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrChkPrintOutput.ControlContentsChanged, ucrChkStoreResults.ControlContentsChanged TestOKEnabled() End Sub -End Class \ No newline at end of file +End Class From 87f4bcdccb14a76f1e5e6cf6edf6323703b57ea2 Mon Sep 17 00:00:00 2001 From: Shadrack Kibet Date: Wed, 21 Oct 2020 12:27:14 +0300 Subject: [PATCH 260/277] Update instat/dlgClimaticSummary.vb Co-authored-by: Danny Parsons --- instat/dlgClimaticSummary.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/dlgClimaticSummary.vb b/instat/dlgClimaticSummary.vb index 166b363bda6..5c6d972c2a2 100644 --- a/instat/dlgClimaticSummary.vb +++ b/instat/dlgClimaticSummary.vb @@ -295,7 +295,7 @@ Public Class dlgClimaticSummary Else clsDefaultFunction.RemoveParameterByName("use") End If - If Not ucrChkOmitMissing.Checked AndAlso clsDefaultFunction.ContainsParameter("na_type") Then + If Not ucrChkOmitMissing.Checked Then clsDefaultFunction.RemoveParameterByName("na_type") Else clsDefaultFunction.AddParameter("na_type", clsRFunctionParameter:=clsConcFunction, iPosition:=9) @@ -388,4 +388,4 @@ Public Class dlgClimaticSummary Private Sub CoreControls_ControlContentsChanged(ucrChangedControl As ucrCore) Handles ucrReceiverDate.ControlContentsChanged, ucrReceiverYear.ControlContentsChanged, ucrReceiverDOY.ControlContentsChanged, ucrReceiverElements.ControlContentsChanged, ucrReceiverWithinYear.ControlContentsChanged, ucrPnlAnnualWithin.ControlContentsChanged, ucrReceiverStation.ControlContentsChanged TestOKEnabled() End Sub -End Class \ No newline at end of file +End Class From 892f800f4f988bf877e4020555f8fff826933b31 Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 21 Oct 2020 12:39:43 +0300 Subject: [PATCH 261/277] setting min/max --- instat/sdgMissingOptions.vb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/instat/sdgMissingOptions.vb b/instat/sdgMissingOptions.vb index 1ed41b9afc3..70a9a337189 100644 --- a/instat/sdgMissingOptions.vb +++ b/instat/sdgMissingOptions.vb @@ -47,11 +47,13 @@ Public Class sdgMissingOptions ucrInputPercentage.AddQuotesIfUnrecognised = False ucrNudNumber.SetParameter(New RParameter("na_max_n", 11)) + ucrNudNumber.SetMinMax(0, iNewMax:=Integer.MaxValue) ucrNudNumberNotMissing.SetParameter(New RParameter("na_min_n", 12)) ucrNudNumberNotMissing.SetMinMax(0, iNewMax:=Integer.MaxValue) ucrNudConsecutive.SetParameter(New RParameter("na_consecutive_n", 13)) + ucrNudConsecutive.SetMinMax(0, iNewMax:=Integer.MaxValue) lstCheckboxes.AddRange({ucrChkMaxNumMissing, ucrChkMinNumNonMissing, ucrChkMaxPercMissing, ucrChkConsecutiveMissing}) For Each ctrTemp As ucrCheck In lstCheckboxes From 482446330355085d3bb61d4afcf5651fca58b61d Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 21 Oct 2020 15:04:04 +0300 Subject: [PATCH 262/277] Update instat/clsRecentFiles.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/clsRecentFiles.vb | 380 +++++++++++++++++++-------------------- 1 file changed, 190 insertions(+), 190 deletions(-) diff --git a/instat/clsRecentFiles.vb b/instat/clsRecentFiles.vb index a45285180d1..d36dc1659b5 100644 --- a/instat/clsRecentFiles.vb +++ b/instat/clsRecentFiles.vb @@ -1,162 +1,162 @@ -' R- Instat -' Copyright (C) 2015-2017 -' -' This program is free software: you can redistribute it and/or modify -' it under the terms of the GNU General Public License as published by -' the Free Software Foundation, either version 3 of the License, or -' (at your option) any later version. -' -' This program is distributed in the hope that it will be useful, -' but WITHOUT ANY WARRANTY; without even the implied warranty of -' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -' GNU General Public License for more details. -' -' You should have received a copy of the GNU General Public License -' along with this program. If not, see . - -Imports System.IO -Public Class clsRecentFiles - Public mnuItems As New List(Of Form) - Private strRecentFilesPath As String - Private mnuTbShowLast10 As ToolStripDropDownItem - Private mnuFile As ToolStripMenuItem - Private mnuFileIcon As ToolStripSplitButton - Private sepStart As ToolStripSeparator - Private sepEnd As ToolStripSeparator - ' declare a variable to contain the most recent opened items +' R- Instat +' Copyright (C) 2015-2017 +' +' This program is free software: you can redistribute it and/or modify +' it under the terms of the GNU General Public License as published by +' the Free Software Foundation, either version 3 of the License, or +' (at your option) any later version. +' +' This program is distributed in the hope that it will be useful, +' but WITHOUT ANY WARRANTY; without even the implied warranty of +' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +' GNU General Public License for more details. +' +' You should have received a copy of the GNU General Public License +' along with this program. If not, see . + +Imports System.IO +Public Class clsRecentFiles + Public mnuItems As New List(Of Form) + Private strRecentFilesPath As String + Private mnuTbShowLast10 As ToolStripDropDownItem + Private mnuFile As ToolStripMenuItem + Private mnuFileIcon As ToolStripSplitButton + Private sepStart As ToolStripSeparator + Private sepEnd As ToolStripSeparator + ' declare a variable to contain the most recent opened items Private strListMRU As New List(Of String) ''' ''' stores reference to the the data view window used in frmMain. - ''' will be used to add recent files menu items to to it. + ''' will be used to add recent files menu items to it. ''' - Private ucrDataViewWindow As ucrDataView - - Public Sub setToolStripItems(dfMnuFile As ToolStripMenuItem, dfMnuFileIcon As ToolStripSplitButton, dfMnuToolStripDropdown As ToolStripDropDownItem, dfSepStart As ToolStripSeparator, dfSepEnd As ToolStripSeparator) - mnuFile = dfMnuFile - mnuFileIcon = dfMnuFileIcon - mnuTbShowLast10 = dfMnuToolStripDropdown - sepStart = dfSepStart - sepEnd = dfSepEnd - sepStart.Visible = False - sepEnd.Visible = False - End Sub - + Private ucrDataViewWindow As ucrDataView + + Public Sub setToolStripItems(dfMnuFile As ToolStripMenuItem, dfMnuFileIcon As ToolStripSplitButton, dfMnuToolStripDropdown As ToolStripDropDownItem, dfSepStart As ToolStripSeparator, dfSepEnd As ToolStripSeparator) + mnuFile = dfMnuFile + mnuFileIcon = dfMnuFileIcon + mnuTbShowLast10 = dfMnuToolStripDropdown + sepStart = dfSepStart + sepEnd = dfSepEnd + sepStart.Visible = False + sepEnd.Visible = False + End Sub + Public Sub SetDataViewWindow(ucrDataViewWindow As ucrDataView) Me.ucrDataViewWindow = ucrDataViewWindow - End Sub - - Public Sub checkOnLoad() - 'Checks for the existence of the file on form load - ' load recently opened files - strRecentFilesPath = Path.Combine(frmMain.strAppDataPath, "recent.mru") - If (File.Exists(strRecentFilesPath)) Then - ' read file - Dim sPaths() As String = File.ReadAllLines(strRecentFilesPath) - For Each sPath As String In sPaths - If Not String.IsNullOrEmpty(sPath) Then - ' Disabled this so that you can still see files that don't exist in the list - ' only add files that still exist... - 'If File.Exists(sPath) Then - ' ' add to the list of recently opened files - ' strListMRU.Add(sPath) - 'End If - strListMRU.Add(sPath) - End If - Next - End If - ' display the recently opened files if there are any items to display in the file - UpdateItemsMenu() - End Sub - - Public Sub saveOnClose() - Dim sPath As String - - strRecentFilesPath = Path.Combine(frmMain.strAppDataPath, "recent.mru") - 'saves the list of opened files on form close - ' save MRU - delete existing files first - File.WriteAllText(strRecentFilesPath, "") - 'Write each item to the file... - For Each sPath In strListMRU - File.AppendAllText(strRecentFilesPath, sPath & Environment.NewLine) - Next - End Sub - - Public Sub addToMenu(ByVal tempObj As Object) - Dim dialog As Form 'store reccently opened dialogs - Dim path As String 'to store recently opened files - If TypeOf (tempObj) Is Form AndAlso mnuItems IsNot Nothing Then - dialog = tempObj - 'Checks for existance, else add it to the beginning - If mnuItems.Contains(dialog) Then mnuItems.Remove(dialog) - 'adds to the list - mnuItems.Add(dialog) - 'checks that only 1o items are allowed - While mnuItems.Count > 10 - mnuItems.RemoveAt(0) - End While - Else - path = tempObj - If strListMRU.Contains(path) Then strListMRU.Remove(path) - ' add to MRU list.. - strListMRU.Add(path) - 'make sure there are only ever 30 items... - 'todo. add this to the general options on the number of recently files to show - While strListMRU.Count > 30 - strListMRU.RemoveAt(0) - End While - End If - - 'updates the interfaces - UpdateItemsMenu() - - End Sub - - Private Sub UpdateItemsMenu() - 'clears the menu items first - Dim clsItems As New List(Of ToolStripItem) - If mnuTbShowLast10 IsNot Nothing AndAlso mnuFile IsNot Nothing AndAlso mnuFileIcon IsNot Nothing AndAlso clsItems IsNot Nothing AndAlso mnuItems IsNot Nothing AndAlso strListMRU IsNot Nothing Then - 'temp collection for recent dialogs - For Each clsMenu As ToolStripItem In mnuTbShowLast10.DropDownItems - If Not clsMenu.Tag Is Nothing Then - If (clsMenu.Tag.ToString().StartsWith("Last")) Then - clsItems.Add(clsMenu) - End If - End If - Next - 'temp collection for recent files - For Each clsMenu As ToolStripItem In mnuFile.DropDownItems - If Not clsMenu.Tag Is Nothing Then - If (clsMenu.Tag.ToString().StartsWith("MRU:")) Then - clsItems.Add(clsMenu) - End If - End If - Next - 'temp collection for recent files - For Each clsMenu As ToolStripItem In mnuFileIcon.DropDownItems - If Not clsMenu.Tag Is Nothing Then - If (clsMenu.Tag.ToString().StartsWith("MRU:")) Then - clsItems.Add(clsMenu) - End If - End If - Next - 'go through the list and remove each from the menu - For Each clsMenu As ToolStripItem In clsItems - mnuTbShowLast10.DropDownItems.Remove(clsMenu) - mnuFile.DropDownItems.Remove(clsMenu) - mnuFileIcon.DropDownItems.Remove(clsMenu) + End Sub + + Public Sub checkOnLoad() + 'Checks for the existence of the file on form load + ' load recently opened files + strRecentFilesPath = Path.Combine(frmMain.strAppDataPath, "recent.mru") + If (File.Exists(strRecentFilesPath)) Then + ' read file + Dim sPaths() As String = File.ReadAllLines(strRecentFilesPath) + For Each sPath As String In sPaths + If Not String.IsNullOrEmpty(sPath) Then + ' Disabled this so that you can still see files that don't exist in the list + ' only add files that still exist... + 'If File.Exists(sPath) Then + ' ' add to the list of recently opened files + ' strListMRU.Add(sPath) + 'End If + strListMRU.Add(sPath) + End If + Next + End If + ' display the recently opened files if there are any items to display in the file + UpdateItemsMenu() + End Sub + + Public Sub saveOnClose() + Dim sPath As String + + strRecentFilesPath = Path.Combine(frmMain.strAppDataPath, "recent.mru") + 'saves the list of opened files on form close + ' save MRU - delete existing files first + File.WriteAllText(strRecentFilesPath, "") + 'Write each item to the file... + For Each sPath In strListMRU + File.AppendAllText(strRecentFilesPath, sPath & Environment.NewLine) + Next + End Sub + + Public Sub addToMenu(ByVal tempObj As Object) + Dim dialog As Form 'store reccently opened dialogs + Dim path As String 'to store recently opened files + If TypeOf (tempObj) Is Form AndAlso mnuItems IsNot Nothing Then + dialog = tempObj + 'Checks for existance, else add it to the beginning + If mnuItems.Contains(dialog) Then mnuItems.Remove(dialog) + 'adds to the list + mnuItems.Add(dialog) + 'checks that only 1o items are allowed + While mnuItems.Count > 10 + mnuItems.RemoveAt(0) + End While + Else + path = tempObj + If strListMRU.Contains(path) Then strListMRU.Remove(path) + ' add to MRU list.. + strListMRU.Add(path) + 'make sure there are only ever 30 items... + 'todo. add this to the general options on the number of recently files to show + While strListMRU.Count > 30 + strListMRU.RemoveAt(0) + End While + End If + + 'updates the interfaces + UpdateItemsMenu() + + End Sub + + Private Sub UpdateItemsMenu() + 'clears the menu items first + Dim clsItems As New List(Of ToolStripItem) + If mnuTbShowLast10 IsNot Nothing AndAlso mnuFile IsNot Nothing AndAlso mnuFileIcon IsNot Nothing AndAlso clsItems IsNot Nothing AndAlso mnuItems IsNot Nothing AndAlso strListMRU IsNot Nothing Then + 'temp collection for recent dialogs + For Each clsMenu As ToolStripItem In mnuTbShowLast10.DropDownItems + If Not clsMenu.Tag Is Nothing Then + If (clsMenu.Tag.ToString().StartsWith("Last")) Then + clsItems.Add(clsMenu) + End If + End If + Next + 'temp collection for recent files + For Each clsMenu As ToolStripItem In mnuFile.DropDownItems + If Not clsMenu.Tag Is Nothing Then + If (clsMenu.Tag.ToString().StartsWith("MRU:")) Then + clsItems.Add(clsMenu) + End If + End If + Next + 'temp collection for recent files + For Each clsMenu As ToolStripItem In mnuFileIcon.DropDownItems + If Not clsMenu.Tag Is Nothing Then + If (clsMenu.Tag.ToString().StartsWith("MRU:")) Then + clsItems.Add(clsMenu) + End If + End If + Next + 'go through the list and remove each from the menu + For Each clsMenu As ToolStripItem In clsItems + mnuTbShowLast10.DropDownItems.Remove(clsMenu) + mnuFile.DropDownItems.Remove(clsMenu) + mnuFileIcon.DropDownItems.Remove(clsMenu) Next 'displays items (_in reverse order) for dialogs - For icounter As Integer = mnuItems.Count - 1 To 0 Step -1 - Dim dialog As Form = mnuItems(icounter) - 'creates new toolstripitem, displaying name of the dialog - Dim clsItem As New ToolStripMenuItem(dialog.Text) - 'sets the tag - clsItem.Tag = "Last" - AddHandler clsItem.Click, AddressOf mnuFile_Click - 'insert into the dropdownitems - mnuTbShowLast10.DropDownItems.Insert(mnuTbShowLast10.DropDownItems.Count - 1, clsItem) + For icounter As Integer = mnuItems.Count - 1 To 0 Step -1 + Dim dialog As Form = mnuItems(icounter) + 'creates new toolstripitem, displaying name of the dialog + Dim clsItem As New ToolStripMenuItem(dialog.Text) + 'sets the tag + clsItem.Tag = "Last" + AddHandler clsItem.Click, AddressOf mnuFile_Click + 'insert into the dropdownitems + mnuTbShowLast10.DropDownItems.Insert(mnuTbShowLast10.DropDownItems.Count - 1, clsItem) Next 'remove all the data view window recent file menu items @@ -166,7 +166,7 @@ Public Class clsRecentFiles Dim strPath As String Dim strFileName As String For iCounter As Integer = strListMRU.Count - 1 To 0 Step -1 - strPath = strListMRU(iCounter) + strPath = strListMRU(iCounter) Try strFileName = Path.GetFileName(strPath) ' create new ToolStripItem, displaying the name of the file... @@ -206,19 +206,19 @@ Public Class clsRecentFiles End If Catch ex As Exception 'TODO it would be good to remove the invalid line from the file in this case - End Try - Next - - ' show separator - 'frmMain.sepEndMRU.Visible = True - sepStart.Visible = True - sepEnd.Visible = True - End If - End Sub - - Private Sub mnuFileMRU_Click(ByVal sender As Object, ByVal e As EventArgs) - Dim strFilePath As String = "" - + End Try + Next + + ' show separator + 'frmMain.sepEndMRU.Visible = True + sepStart.Visible = True + sepEnd.Visible = True + End If + End Sub + + Private Sub mnuFileMRU_Click(ByVal sender As Object, ByVal e As EventArgs) + Dim strFilePath As String = "" + If TypeOf sender Is ToolStripItem Then strFilePath = DirectCast(sender, ToolStripItem).Tag.ToString().Substring(4) ElseIf TypeOf sender Is LinkLabel Then @@ -231,31 +231,31 @@ Public Class clsRecentFiles End If End If - If File.Exists(strFilePath) Then - 'dlgImportDataset.SetFilePath(DirectCast(sender, ToolStripItem).Tag.ToString().Substring(4)) - 'dlgImportDataset.SetDataName(Path.GetFileNameWithoutExtension(sender.ToString)) - 'Not working as I would like because of the changes made to the Import Dataset - dlgImportDataset.strFileToOpenOn = strFilePath - dlgImportDataset.ShowDialog() - Else - 'removes the path to the non existent file - If DialogResult.Yes = MessageBox.Show(frmMain, "File not accessible. It may have been renamed, moved or deleted." & Environment.NewLine & Environment.NewLine & "Would you like to remove this file from the list?", "Cannot access file", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) Then - strListMRU.RemoveAt(strListMRU.FindLastIndex(Function(value As String) - Return value.Contains(sender.ToString) - End Function)) - 'updates the interfaces - UpdateItemsMenu() - End If - End If - End Sub - - Private Sub mnuFile_Click(ByVal sender As Object, ByVal e As EventArgs) - For Each dfTemp As Form In mnuItems - If dfTemp.Text = sender.ToString Then - dfTemp.ShowDialog() - Exit Sub - End If - Next + If File.Exists(strFilePath) Then + 'dlgImportDataset.SetFilePath(DirectCast(sender, ToolStripItem).Tag.ToString().Substring(4)) + 'dlgImportDataset.SetDataName(Path.GetFileNameWithoutExtension(sender.ToString)) + 'Not working as I would like because of the changes made to the Import Dataset + dlgImportDataset.strFileToOpenOn = strFilePath + dlgImportDataset.ShowDialog() + Else + 'removes the path to the non existent file + If DialogResult.Yes = MessageBox.Show(frmMain, "File not accessible. It may have been renamed, moved or deleted." & Environment.NewLine & Environment.NewLine & "Would you like to remove this file from the list?", "Cannot access file", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) Then + strListMRU.RemoveAt(strListMRU.FindLastIndex(Function(value As String) + Return value.Contains(sender.ToString) + End Function)) + 'updates the interfaces + UpdateItemsMenu() + End If + End If + End Sub + + Private Sub mnuFile_Click(ByVal sender As Object, ByVal e As EventArgs) + For Each dfTemp As Form In mnuItems + If dfTemp.Text = sender.ToString Then + dfTemp.ShowDialog() + Exit Sub + End If + Next End Sub ''' @@ -281,5 +281,5 @@ Public Class clsRecentFiles 'TODO it would be good to remove the invalid line from the file in this case End Try Next - End Sub -End Class + End Sub +End Class From 6606b56bb8357dd90f0ad7bffc46627355f9322f Mon Sep 17 00:00:00 2001 From: shadrack kibet Date: Wed, 21 Oct 2020 15:07:01 +0300 Subject: [PATCH 263/277] shortened if statement --- instat/dlgImportGriddedData.vb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/instat/dlgImportGriddedData.vb b/instat/dlgImportGriddedData.vb index 947e65f0434..25eb1e8290a 100644 --- a/instat/dlgImportGriddedData.vb +++ b/instat/dlgImportGriddedData.vb @@ -217,13 +217,8 @@ Public Class dlgImportGriddedData End Sub Private Sub ucrPnlLocationRange_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlLocationRange.ControlValueChanged - If rdoArea.Checked Then - lblMinLon.Visible = True - lblMinLat.Visible = True - ElseIf rdoPoint.Checked Then - lblMinLon.Visible = False - lblMinLat.Visible = False - End If + lblMinLon.Visible = rdoArea.Checked + lblMinLat.Visible = rdoArea.Checked End Sub Private Sub ucrPnlDateRange_ControlValueChanged(ucrChangedControl As ucrCore) Handles ucrPnlDateRange.ControlValueChanged From 1788775a4b5896e07f102cfde011cc1deade97de Mon Sep 17 00:00:00 2001 From: patowhiz Date: Wed, 21 Oct 2020 15:08:54 +0300 Subject: [PATCH 264/277] Update instat/clsRecentFiles.vb Co-authored-by: lloyddewit <57253949+lloyddewit@users.noreply.github.com> --- instat/clsRecentFiles.vb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/instat/clsRecentFiles.vb b/instat/clsRecentFiles.vb index d36dc1659b5..fe11885ed6e 100644 --- a/instat/clsRecentFiles.vb +++ b/instat/clsRecentFiles.vb @@ -223,11 +223,10 @@ Public Class clsRecentFiles strFilePath = DirectCast(sender, ToolStripItem).Tag.ToString().Substring(4) ElseIf TypeOf sender Is LinkLabel Then 'if tag is empty then its more link that was clicked - If String.IsNullOrEmpty(DirectCast(sender, LinkLabel).Tag.ToString()) Then + strFilePath = DirectCast(sender, LinkLabel).Tag.ToString() + If String.IsNullOrEmpty(strFilePath) Then ShowAllRecentFiles() Exit Sub - Else - strFilePath = DirectCast(sender, LinkLabel).Tag.ToString() End If End If From 6d01b3713a8db5b68d78526f60990340996ee7d6 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 21 Oct 2020 15:39:55 +0100 Subject: [PATCH 265/277] removed n variables label default text to avoid resetting on reopening --- instat/dlgTidyDailyData.resx | 65 +++++++++++------------------------- 1 file changed, 19 insertions(+), 46 deletions(-) diff --git a/instat/dlgTidyDailyData.resx b/instat/dlgTidyDailyData.resx index e52d870a1ed..27ea82b14f6 100644 --- a/instat/dlgTidyDailyData.resx +++ b/instat/dlgTidyDailyData.resx @@ -556,14 +556,11 @@ 385, 61 - 19, 13 + 0, 13 28 - - (0) - lblNColumns @@ -627,6 +624,15 @@ 2 + + 8, 19 + + + 209, 20 + + + 22 + ucrChkIgnoreInvalid @@ -639,6 +645,15 @@ 0 + + 8, 53 + + + 209, 20 + + + 23 + ucrChkSilent @@ -924,48 +939,6 @@ 4 - - 8, 19 - - - 209, 20 - - - 22 - - - ucrChkIgnoreInvalid - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpOptions - - - 0 - - - 8, 53 - - - 209, 20 - - - 23 - - - ucrChkSilent - - - instat.ucrCheck, instat, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null - - - grpOptions - - - 1 - 17, 17 From adad4a93fac43973a5138a95fb23a47be86d5806 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 21 Oct 2020 22:19:11 +0100 Subject: [PATCH 266/277] updated R version to 4.0.3 and updated R packages --- instat/clsRLink.vb | 6 +- instat/static/InstatObject/R/Rsetup.R | 283 +++++++++--------- .../static/InstatObject/R/install_packages.R | 8 +- 3 files changed, 155 insertions(+), 142 deletions(-) diff --git a/instat/clsRLink.vb b/instat/clsRLink.vb index 8f61f26a3a2..113453355b5 100644 --- a/instat/clsRLink.vb +++ b/instat/clsRLink.vb @@ -156,16 +156,16 @@ Public Class RLink ''' The R version major required. - Private strRVersionMajorRequired As String = "3" + Private strRVersionMajorRequired As String = "4" ''' The R version minor required. - Private strRVersionMinorRequired As String = "6" + Private strRVersionMinorRequired As String = "0" ''' The R version required. Private strRVersionRequired As String = strRVersionMajorRequired & "." & strRVersionMinorRequired & ".0" ''' The R bundled version. - Private strRBundledVersion As String = "3.6.2" + Private strRBundledVersion As String = "4.0.3" '''-------------------------------------------------------------------------------------------- diff --git a/instat/static/InstatObject/R/Rsetup.R b/instat/static/InstatObject/R/Rsetup.R index 5608f31b5f5..887585d1192 100644 --- a/instat/static/InstatObject/R/Rsetup.R +++ b/instat/static/InstatObject/R/Rsetup.R @@ -1,151 +1,164 @@ -# Packages including dependencies (generated from miniCRAN package) -packs <- c("abind", "acepack", "agricolae", - "agridat", "AlgDesign", "ash", "askpass", - "assertthat", "automap", "backports", "base64enc", - "bayestestR", "BH", "bitops", "boot", - "brew", "broom", "callr", "candisc", - "car", "carData", "caTools", "cellranger", - "checkmate", "chron", "circlize", "CircStats", - "circular", "class", "classInt", "cli", - "clifro", "climdex.pcic", "clipr", "clisymbols", - "cluster", "cmsaf", "codetools", "colorRamps", - "colorspace", "combinat", "commonmark", "covr", - "cowplot", "crayon", "crosstalk", "curl", - "dae", "data.table", "DBI", "dendextend", - "DEoptimR", "desc", "DescTools", "devtools", - "digest", "distillery", "dotCall64", "dplyr", - "DT", "dtw", "dummies", "e1071", "effectsize", +# Packages including dependencies +# Generated from install_packages.R, do not edit manually! +packs <- c("abind", "agricolae", "agridat", + "AlgDesign", "animation", "ash", "askpass", + "assertthat", "backports", "base64enc", "bayestestR", + "BH", "bitops", "boot", "brew", "broom", + "callr", "candisc", "car", "carData", + "cellranger", "changepoint", "checkmate", "chillR", + "chron", "circlize", "CircStats", "circular", + "class", "classInt", "cli", "clifro", + "climdex.pcic", "clipr", "cluster", "cmsaf", + "cmsafops", "cmsafvis", "colorRamps", "colorspace", + "colourpicker", "combinat", "commonmark", "conquer", + "corrplot", "countrycode", "covr", "cowplot", + "cpp11", "crayon", "crosstalk", "curl", + "DAAG", "dae", "data.table", "date", + "DBI", "dendextend", "DEoptimR", "desc", + "devtools", "digest", "distillery", "dotCall64", + "dplyr", "DT", "dummies", "e1071", "effectsize", "ellipse", "ellipsis", "emmeans", "EnvStats", "estimability", "evaluate", "Evapotranspiration", - "expm", "extrafont", "extrafontdb", "extRemes", + "extraDistr", "extrafont", "extrafontdb", "extRemes", "factoextra", "FactoMineR", "fansi", "faraway", "farver", "fastmap", "fields", "fitdistrplus", - "flashClust", "FNN", "forcats", "foreach", - "foreign", "Formula", "fs", "gapminder", - "gdata", "gdtools", "generics", "geosphere", + "flashClust", "FNN", "forcats", "forecast", + "foreign", "Formula", "fracdiff", "fs", + "gapminder", "gdtools", "generics", "geosphere", "getPass", "GGally", "ggalt", "ggdendro", - "ggeffects", "ggfittext", "ggformula", "ggfortify", - "ggmosaic", "ggplot2", "ggpmisc", "ggpubr", - "ggrepel", "ggsci", "ggsignif", "ggstance", - "ggthemes", "gh", "git2r", "GlobalOptions", - "glue", "goftest", "gplots", "gridExtra", - "gstat", "gtable", "gtools", "haven", - "heplots", "hexbin", "highr", "Hmisc", - "hms", "htmlTable", "htmltools", "htmlwidgets", - "httpuv", "httr", "hydroGOF", "hydroTSM", - "ini", "insight", "intervals", "iterators", - "JBTools", "jpeg", "jsonlite", "KernSmooth", - "klaR", "knitr", "labeling", "labelled", - "Lahman", "later", "lattice", "latticeExtra", - "lazyeval", "leaflet", "leaflet.providers", - "leaps", "lifecycle", "lme4", "lmomco", - "Lmoments", "lsei", "lubridate", "magrittr", - "mapdata", "mapproj", "maps", "maptools", - "markdown", "MASS", "Matrix", "MatrixModels", + "ggeffects", "ggfittext", "ggforce", "ggformula", + "ggfortify", "ggmosaic", "ggplot2", "ggpmisc", + "ggpubr", "ggrepel", "ggridges", "ggsci", + "ggsignif", "ggstance", "ggtext", "ggthemes", + "gh", "git2r", "GlobalOptions", "glue", + "goftest", "gridExtra", "gridtext", "gtable", + "haven", "heplots", "hexbin", "highr", + "Hmisc", "hms", "htmlTable", "htmltools", + "htmlwidgets", "httpuv", "httr", "imputeTS", + "ini", "insight", "isoband", "jpeg", + "jsonlite", "Kendall", "KernSmooth", "klaR", + "knitr", "labeling", "labelled", "Lahman", + "later", "lattice", "latticeExtra", "lazyeval", + "leaflet.providers", "leaflet", "leaps", "lifecycle", + "lme4", "lmomco", "Lmoments", "lmtest", + "lubridate", "magick", "magrittr", "mapdata", + "mapproj", "maps", "maptools", "markdown", + "MASS", "Matrix", "MatrixModels", "matrixStats", "memoise", "mgcv", "mime", "miniUI", "minqa", "modelr", "mosaic", "mosaicCore", - "mosaicData", "munsell", "mvtnorm", "ncdf.tools", - "ncdf4", "ncdf4.helpers", "nlme", "nloptr", - "nnet", "nortest", "npsurv", "numDeriv", - "nycflights13", "openair", "openssl", "openxlsx", - "parameters", "pbkrtest", "PCICt", "performance", - "pillar", "pkgbuild", "pkgconfig", "pkgload", - "plogr", "plotly", "plotrix", "plyr", - "png", "polynom", "praise", "prettyunits", - "processx", "productplots", "progress", "proj4", - "promises", "proxy", "ps", "purrr", "quantreg", - "questionr", "R.methodsS3", "R.oo", "R6", - "rainfarmr", "raster", "rcmdcheck", "RColorBrewer", - "Rcpp", "RcppArmadillo", "RcppEigen", "RcppRoll", - "RCurl", "readODS", "readr", "readxl", - "rematch", "remotes", "reshape", "reshape2", + "mosaicData", "munsell", "mvtnorm", "ncdf4", + "nlme", "nloptr", "nnet", "nortest", + "numDeriv", "nycflights13", "openair", "openssl", + "openxlsx", "parameters", "patchwork", "pbkrtest", + "pbs", "PCICt", "performance", "pillar", + "pkgbuild", "pkgconfig", "pkgload", "plotly", + "plotrix", "pls", "plyr", "png", "polyclip", + "polynom", "praise", "prettyunits", "processx", + "productplots", "progress", "proj4", "promises", + "ps", "purrr", "quadprog", "quantmod", + "quantreg", "questionr", "R.cache", "R.methodsS3", + "R.oo", "R.utils", "R6", "rainfarmr", + "raster", "rcmdcheck", "RColorBrewer", "Rcpp", + "RcppArmadillo", "RcppEigen", "RcppRoll", "RCurl", + "readODS", "readr", "readxl", "rematch", + "rematch2", "remotes", "reshape", "reshape2", "rex", "rio", "rje", "rlang", "rlist", - "RMySQL", "RNetCDF", "robustbase", "roxygen2", - "rpart", "rprojroot", "rrefine", "rstudioapi", - "rtf", "Rttf2pt1", "rversions", "rworldmap", - "rworldxtra", "scales", "scatterplot3d", "sessioninfo", - "sf", "shades", "shape", "shiny", "signmedian.test", + "RMAWGEN", "RMySQL", "robustbase", "roxygen2", + "rpart", "rprojroot", "rrefine", "rstatix", + "rstudioapi", "rtf", "Rttf2pt1", "rversions", + "rvest", "rworldmap", "rworldxtra", "sandwich", + "scales", "scatterplot3d", "selectr", "sessioninfo", + "sf", "shades", "shape", "shiny", "shinyFiles", + "shinyjs", "shinythemes", "signmedian.test", "sjlabelled", "sjmisc", "sjPlot", "sjstats", - "sourcetools", "sp", "spacetime", "spam", - "SparseM", "spatial", "SPEI", "splus2R", - "stringi", "stringr", "survival", "svglite", - "sys", "systemfonts", "testthat", "tibble", - "tidyr", "tidyselect", "translations", "treemapify", - "units", "usethis", "utf8", "vctrs", - "verification", "viridis", "viridisLite", "visreg", + "sourcetools", "sp", "spam", "SparseM", + "SPEI", "splus2R", "statmod", "stinepack", + "stringdist", "stringi", "stringr", "strucchange", + "styler", "survival", "svglite", "sys", + "systemfonts", "testthat", "tibble", "tidyr", + "tidyselect", "timeDate", "treemapify", "trend", + "tseries", "TTR", "tweenr", "units", + "urca", "usethis", "utf8", "vars", "vctrs", + "viridis", "viridisLite", "visdat", "visreg", "wakefield", "weathermetrics", "whisker", "withr", "xfun", "XML", "xml2", "xopen", "xtable", "xts", "yaml", "zip", "zoo") -versions <- c("1.4-5", "1.4.1", "1.3-2", "1.16", - "1.2.0", "1.0-15", "1.1", "0.2.1", "1.0-14", - "1.1.5", "0.1-3", "0.5.1", "1.72.0-3", - "1.0-6", "1.3-24", "1.0-6", "0.5.4", - "3.4.1", "0.8-0", "3.0-6", "3.0-3", "1.18.0", - "1.1.0", "1.9.4", "2.3-55", "0.4.8", - "0.2-6", "0.4-93", "7.3-15", "0.4-2", - "2.0.1", "3.2-2", "1.1-11", "0.7.0", - "1.2.0", "2.1.0", "2.0.1", "0.2-16", - "2.3", "1.4-1", "0.0-8", "1.7", "3.4.0", - "1.0.0", "1.3.4", "1.0.0", "4.3", "3.1-21", - "1.12.8", "1.1.0", "1.13.2", "1.0-8", - "1.2.0", "0.99.32", "2.2.1", "0.6.23", - "1.0-6", "1.0-0", "0.8.3", "0.12", "1.21-3", - "1.5.6", "1.7-3", "0.1.1", "0.4.1", "0.3.0", - "1.4.4", "2.3.1", "1.3", "0.14", "1.14", - "0.999-4", "0.17", "1.0", "2.0-11", "1.0.6", - "2.2", "0.4.1", "1.0.7", "2.0.3", "1.0.1", - "10.3", "1.0-14", "1.01-2", "1.1.3", - "0.4.0", "1.4.7", "0.8-75", "1.2-3", - "1.3.1", "0.3.0", "2.18.0", "0.2.1", - "0.0.2", "1.5-10", "0.2-2", "1.4.0", - "0.4.0", "0.1-20", "0.14.1", "0.8.1", - "0.9.2", "0.4.8", "0.2.0", "3.2.1", "0.3.3", - "0.2.4", "0.8.1", "2.9", "0.6.0", "0.3.3", - "4.2.0", "1.1.0", "0.26.1", "0.1.1", - "1.3.1", "1.2-2", "3.0.1.2", "2.3", "2.0-4", - "0.3.0", "3.8.1", "2.2.0", "1.3-5", "1.28.1", - "0.8", "4.3-0", "0.5.3", "1.13.3", "0.4.0", - "1.5.1", "1.5.2", "1.4.1", "0.3-10", - "0.5-1", "0.3.1", "0.8.1", "0.15.1", - "1.0.12", "0.7.2.9", "0.1-8.1", "1.6.1", - "2.23-16", "0.6-14", "1.27", "0.3", "2.2.2", - "7.0-1", "1.0.0", "0.20-38", "0.6-29", - "0.2.2", "2.0.3", "1.9.0", "3.1", "0.1.0", - "1.1-21", "2.3.2", "1.3-1", "1.2-0", - "1.7.4", "1.5", "2.3.0", "1.2.7", "3.3.0", - "0.9-9", "1.1", "7.3-51.5", "1.2-18", - "0.4-1", "1.1.0", "1.8-31", "0.8", "0.1.1.1", - "1.2.4", "0.1.5", "1.5.0", "0.6.0", "0.17.0", - "0.5.0", "1.0-11", "0.7.1.295", "1.17", - "0.3-4", "3.1-143", "1.2.1", "7.3-12", - "1.0-4", "0.4-0", "2016.8-1.1", "1.0.1", - "2.7-0", "1.4.1", "4.1.4", "0.4.1", "0.4-7", - "0.5-4.1", "0.4.3", "1.4.3", "1.0.6", - "2.0.3", "1.0.2", "0.2.0", "4.9.1", "3.7-7", - "1.8.5", "0.1-7", "1.4-0", "1.0.0", "1.1.1", - "3.4.1", "0.1.1", "1.2.2", "1.0-8.1", - "1.1.0", "0.4-23", "1.3.0", "0.3.3", - "5.54", "0.7.0", "1.7.1", "1.23.0", "2.4.1", - "0.1", "3.0-12", "1.3.3", "1.1-2", "1.0.3", - "0.9.800.4.0", "0.3.3.7.0", "0.3.0", "1.98-1.1", - "1.6.7", "1.3.1", "1.3.1", "1.0.1", "2.1.0", - "0.8.8", "1.4.3", "1.1.2", "0.5.16", - "1.10.13", "0.4.3", "0.4.6.1", "0.10.19", - "2.1-1", "0.93-5", "7.0.2", "4.1-15", - "1.3-2", "1.0", "0.10", "0.4-14", "1.3.8", - "2.0.1", "1.3-6", "1.01", "1.1.0", "0.3-41", - "1.1.1", "0.8-1", "1.4.0", "1.4.4", "1.4.0", - "1.5.1", "1.1.3", "2.8.3", "2.8.2", "0.17.8", - "0.1.7", "1.3-2", "1.2-3", "2.5-1", "1.78", - "7.3-11", "1.7", "1.2-2", "1.4.4", "1.4.0", - "3.1-8", "1.2.2", "3.3", "0.1.1", "2.3.1", - "2.1.3", "1.0.2", "0.2.5", "3.6.2", "2.5.3", - "0.6-5", "1.5.1", "1.1.4", "0.2.2", "1.42", - "0.5.1", "0.3.0", "2.6-0", "0.3.3", "1.2.2", - "0.4", "2.1.2", "0.12", "3.99-0.3", "1.2.2", - "1.0.0", "1.8-4", "0.12-0", "2.2.1", - "2.0.4", "1.8-7") +versions <- c("1.4-5", "1.3-3", "1.17", "1.2.0", + "2.6", "1.0-15", "1.1", "0.2.1", "1.1.10", + "0.1-3", "0.7.2", "1.72.0-3", "1.0-6", + "1.3-25", "1.0-6", "0.7.1", "3.5.1", + "0.8-3", "3.0-10", "3.0-4", "1.1.0", + "2.2.2", "2.0.0", "0.70.24", "2.3-56", + "0.4.10", "0.2-6", "0.4-93", "7.3-17", + "0.4-3", "2.1.0", "3.2-3", "1.1-11", + "0.7.1", "2.1.0", "3.0.0", "1.0.0", "1.0.1", + "2.3", "1.4-1", "1.1.0", "0.0-8", "1.7", + "1.0.2", "0.84", "1.2.0", "3.5.1", "1.1.0", + "0.2.3", "1.3.4", "1.1.0.1", "4.3", "1.24", + "3.1-27", "1.13.0", "1.2-39", "1.1.0", + "1.14.0", "1.0-8", "1.2.0", "2.3.2", + "0.6.25", "1.1", "1.0-0", "1.0.2", "0.16", + "1.5.6", "1.7-4", "0.3.3", "0.4.2", "0.3.1", + "1.5.1", "2.3.1", "1.3", "0.14", "1.15", + "1.9.1", "0.17", "1.0", "2.0-12", "1.0.7", + "2.3", "0.4.1", "1.0.7", "2.0.3", "1.0.1", + "11.6", "1.1-1", "1.01-2", "1.1.3", "0.5.0", + "8.13", "0.8-80", "1.2-3", "1.5-1", "1.5.0", + "0.3.0", "0.2.2", "0.0.2", "1.5-10", + "0.2-2", "2.0.0", "0.4.0", "0.1.22", + "0.16.0", "0.9.0", "0.3.2", "0.9.4", + "0.4.11", "0.2.0", "3.3.2", "0.3.6", + "0.4.0", "0.8.2", "0.5.2", "2.9", "0.6.0", + "0.3.4", "0.1.0", "4.2.0", "1.1.0", "0.27.1", + "0.1.2", "1.4.2", "1.2-2", "2.3", "0.1.1", + "0.3.0", "2.3.1", "1.3-5", "1.28.1", + "0.8", "4.4-1", "0.5.3", "2.1.0", "0.5.0", + "1.5.2", "1.5.4", "1.4.2", "3.1", "0.3.1", + "0.9.6", "0.2.2", "0.1-8.1", "1.7.1", + "2.2", "2.23-17", "0.6-15", "1.30", "0.3", + "2.7.0", "8.0-0", "1.1.0.1", "0.20-41", + "0.6-29", "0.2.2", "1.9.0", "2.0.3", + "3.1", "0.2.0", "1.1-23", "2.3.6", "1.3-1", + "0.9-38", "1.7.9", "2.4.0", "1.5", "2.3.0", + "1.2.7", "3.3.0", "1.0-2", "1.1", "7.3-53", + "1.2-18", "0.4-1", "0.57.0", "1.1.0", + "1.8-33", "0.9", "0.1.1.1", "1.2.4", + "0.1.8", "1.8.2", "0.8.0", "0.20.1", + "0.5.0", "1.1-1", "1.17", "3.1-149", + "1.2.2.2", "7.3-14", "1.0-4", "2016.8-1.1", + "1.0.1", "2.7-6", "1.4.3", "4.2.2", "0.8.6", + "1.0.1", "0.4-8.6", "1.1", "0.5-4.1", + "0.5.0", "1.4.6", "1.1.0", "2.0.3", "1.1.0", + "4.9.2.1", "3.7-8", "2.7-3", "1.8.6", + "0.1-7", "1.10-0", "1.4-0", "1.0.0", + "1.1.1", "3.4.4", "0.1.1", "1.2.2", "1.0-10", + "1.1.1", "1.4.0", "0.3.4", "1.5-8", "0.4.17", + "5.73", "0.7.3", "0.14.0", "1.8.1", "1.24.0", + "2.10.1", "2.4.1", "0.1", "3.3-13", "1.3.3", + "1.1-2", "1.0.5", "0.9.900.3.0", "0.3.3.7.0", + "0.3.0", "1.98-1.2", "1.7.0", "1.4.0", + "1.3.1", "1.0.1", "2.1.2", "2.2.0", "0.8.8", + "1.4.4", "1.2.0", "0.5.16", "1.10.16", + "0.4.8", "0.4.6.1", "1.3.7", "0.10.20", + "0.93-6", "7.1.1", "4.1-15", "1.3-2", + "1.1.0", "0.6.0", "0.11", "0.4-14.1", + "1.3.8", "2.0.2", "0.3.6", "1.3-6", "1.01", + "3.0-0", "1.1.1", "0.3-41", "0.4-2", + "1.1.1", "0.9-6", "1.4.0", "1.4.5", "1.5.0", + "0.8.0", "2.0.0", "1.1.2", "1.5.1", "1.1.7", + "2.8.5", "2.8.5", "0.18.0", "0.1.7", + "1.4-4", "2.5-1", "1.78", "1.7", "1.2-2", + "1.4.34", "1.4", "0.9.6.3", "1.5.3", + "1.4.0", "1.5-2", "1.3.2", "3.2-7", "1.2.3.2", + "3.4", "0.3.2", "2.3.2", "3.0.4", "1.1.2", + "1.1.0", "3043.102", "2.5.3", "1.1.4", + "0.10-47", "0.24.2", "1.0.1", "0.6-7", + "1.3-0", "1.6.3", "1.1.4", "1.5-3", "0.3.4", + "0.5.1", "0.3.0", "0.5.3", "2.7.0", "0.3.6", + "1.2.2", "0.4", "2.3.0", "0.18", "3.99-0.5", + "1.3.2", "1.0.0", "1.8-4", "0.12.1", + "2.2.1", "2.1.1", "1.8-8") ################################################## diff --git a/instat/static/InstatObject/R/install_packages.R b/instat/static/InstatObject/R/install_packages.R index f8297fe0480..d63a5cba414 100644 --- a/instat/static/InstatObject/R/install_packages.R +++ b/instat/static/InstatObject/R/install_packages.R @@ -1,9 +1,9 @@ require("miniCRAN") -r_version <- "3.6" +r_version <- "4.0" # Specify list of packages to download -pkgs <- c("reshape2", "lubridate","plyr", "dplyr", "rtf", "openxlsx", "ggplot2", "extRemes", "GGally", "agridat", "DAAG", "FactoMineR", "plotrix", "candisc", "R6", "openair", "circular", "survival", "Evapotranspiration", "clifro", "devtools", "factoextra", "circlize", "CircStats", "gridExtra", "ggfortify", "rio", "readxl", "lme4", "dummies", "ggthemes", "lazyeval", "stringr", "httr", "jsonlite", "fitdistrplus", "visreg", "climdex.pcic", "mosaic", "ncdf4", "getPass", "RMySQL", "DBI", "EnvStats", "signmedian.test", "sjPlot", "sjmisc", "plotly", "svglite", "htmlTable", "rje", "tidyr", "faraway", "ncdf.tools", "rrefine", "dae", "gapminder", "questionr", "nycflights13", "Lahman", "RcppRoll", "cmsaf", "sjlabelled", "maptools", "RColorBrewer", "colorRamps", "mapdata", "rworldmap", "rworldxtra", "e1071", "robustbase", "wakefield", "Hmisc", "SPEI", "agricolae", "sf", "weathermetrics", "geosphere", "ggmosaic", "readODS", "ggalt", "ggpmisc", "treemapify") +pkgs <- c("reshape2", "lubridate","plyr", "dplyr", "rtf", "openxlsx", "ggplot2", "extRemes", "GGally", "agridat", "DAAG", "FactoMineR", "plotrix", "candisc", "R6", "openair", "circular", "survival", "Evapotranspiration", "clifro", "devtools", "factoextra", "circlize", "CircStats", "gridExtra", "ggfortify", "rio", "readxl", "lme4", "dummies", "ggthemes", "lazyeval", "stringr", "httr", "jsonlite", "fitdistrplus", "visreg", "climdex.pcic", "mosaic", "ncdf4", "ncdf4.helpers", "getPass", "RMySQL", "DBI", "EnvStats", "signmedian.test", "sjPlot", "sjmisc", "plotly", "svglite", "htmlTable", "rje", "tidyr", "faraway", "rrefine", "dae", "gapminder", "questionr", "nycflights13", "Lahman", "RcppRoll", "cmsaf", "sjlabelled", "maptools", "RColorBrewer", "colorRamps", "mapdata", "rworldmap", "rworldxtra", "e1071", "robustbase", "wakefield", "Hmisc", "SPEI", "agricolae", "sf", "weathermetrics", "geosphere", "ggmosaic", "readODS", "ggalt", "ggpmisc", "treemapify", "stringdist", "imputeTS", "chillR", "patchwork", "changepoint", "trend", "pbs", "visdat") pkgList <- pkgDep(pkgs, type="win.binary", repos = "https://cran.rstudio.com/", suggests = FALSE, includeBasePkgs = FALSE, Rversion = r_version) -pth = "C:/Users/Fundi/Documents/Packages" +pth <- "C:/Users/Danny/Documents/RPackages" makeRepo(pkgList, path = pth, type = "win.binary", Rversion = r_version, repos = "https://cran.rstudio.com/") #add extra packages to location @@ -13,7 +13,7 @@ makeRepo(pkgList, path = pth, type = "win.binary", Rversion = r_version, repos = #install.packages("trimcluster", repos = paste0("file:///", pth), type = "win.binary") #install.packages("maps", repos = paste0("file:///", pth), type = "win.binary") -pthbin = paste0(pth, "/bin/windows/contrib/", r_version) +pthbin <- paste0(pth, "/bin/windows/contrib/", r_version) #list.files(pth, recursive=TRUE, full.names=FALSE) View(pkgAvail(repos=pth, type="win.binary", Rversion = r_version)[, c(1:3, 5)]) versions <- pkgAvail(repos=pth, type="win.binary", Rversion = r_version)[,2] From e782638d43bcd03f88ea3b78995af02527ad09f2 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Wed, 21 Oct 2020 22:44:38 +0100 Subject: [PATCH 267/277] added missing package names --- instat/static/InstatObject/R/instat_object_R6.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index f02c151ad23..3ad8da7b0f9 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2050,10 +2050,10 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, cat("\n*** Invalid dates ***\n\n") invalid_data <- dplyr::filter(y, invalid_ind) if(format == "days" || format == "months") { - invalid_data_display <- invalid_data %>% select(year, month, day) + invalid_data_display <- invalid_data %>% dplyr::select(year, month, day) } else { - invalid_data_display <- invalid_data %>% select(year, doy) + invalid_data_display <- invalid_data %>% dplyr::select(year, doy) } if(!missing(station)) { invalid_data_display <- data.frame(station = invalid_data$station, invalid_data_display) From 90b46d1822e4c4d17c1c30a34fff5a9e19b79d78 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 22 Oct 2020 11:21:44 +0300 Subject: [PATCH 268/277] Setting default value for the nud control. --- instat/dlgVisualizeData.Designer.vb | 6 +++--- instat/dlgVisualizeData.vb | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/instat/dlgVisualizeData.Designer.vb b/instat/dlgVisualizeData.Designer.vb index 69d29527460..36b2680109c 100644 --- a/instat/dlgVisualizeData.Designer.vb +++ b/instat/dlgVisualizeData.Designer.vb @@ -144,7 +144,7 @@ Partial Class dlgVisualizeData ' Me.lblSampling.AutoSize = True Me.lblSampling.Enabled = False - Me.lblSampling.Location = New System.Drawing.Point(238, 245) + Me.lblSampling.Location = New System.Drawing.Point(238, 246) Me.lblSampling.Name = "lblSampling" Me.lblSampling.Size = New System.Drawing.Size(94, 13) Me.lblSampling.TabIndex = 27 @@ -152,7 +152,7 @@ Partial Class dlgVisualizeData ' 'ucrNudSamplingFunction ' - Me.ucrNudSamplingFunction.DecimalPlaces = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSamplingFunction.DecimalPlaces = New Decimal(New Integer() {2, 0, 0, 0}) Me.ucrNudSamplingFunction.Enabled = False Me.ucrNudSamplingFunction.Increment = New Decimal(New Integer() {1, 0, 0, 0}) Me.ucrNudSamplingFunction.Location = New System.Drawing.Point(338, 242) @@ -161,7 +161,7 @@ Partial Class dlgVisualizeData Me.ucrNudSamplingFunction.Name = "ucrNudSamplingFunction" Me.ucrNudSamplingFunction.Size = New System.Drawing.Size(50, 20) Me.ucrNudSamplingFunction.TabIndex = 26 - Me.ucrNudSamplingFunction.Value = New Decimal(New Integer() {0, 0, 0, 0}) + Me.ucrNudSamplingFunction.Value = New Decimal(New Integer() {1, 0, 0, 0}) ' 'ucrNudMaximumSize ' diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index 6f56762ed49..a0cffa6e0b8 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -23,6 +23,7 @@ Public Class dlgVisualizeData Private clsVisMissFunction As New RFunction Private clsVisGuessFunction As New RFunction Private clsCurrBaseFunction As New RFunction + Private clsSamplingFraction As New RFunction Private Sub dlgVisualizeData_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then @@ -76,11 +77,16 @@ Public Class dlgVisualizeData ucrInputComboboxPalette.SetItems(dctPalette) ucrNudMaximumSize.DecimalPlaces = 1 - ucrNudMaximumSize.Increment = 0.1 ucrNudMaximumSize.Minimum = 0.1 ucrNudMaximumSize.Maximum = Integer.MaxValue - ''ucrNudMaximumSize.SetMinMax(0.1, Integer.MaxValue) + + ' Not yet implemented + ucrNudSamplingFunction.SetParameter(New RParameter("prop", 1)) + ucrNudSamplingFunction.DecimalPlaces = 2 + ucrNudSamplingFunction.Increment = 0.01 + ucrNudSamplingFunction.Minimum = 0.01 + ucrNudSamplingFunction.Maximum = 1 ucrReceiverVisualizeData.SetParameter(New RParameter("x", 0)) ucrReceiverVisualizeData.SetParameterIsRFunction() @@ -94,7 +100,6 @@ Public Class dlgVisualizeData ucrNudMaximumSize.SetLinkedDisplayControl(lstMaximumSizeControls) ucrNudSamplingFunction.SetLinkedDisplayControl(lblSampling) - ucrPnlSelectData.AddToLinkedControls(ucrReceiverVisualizeData, {rdoSelectedColumn}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True) ucrSaveGraph.SetIsComboBox() @@ -108,6 +113,7 @@ Public Class dlgVisualizeData clsVisDatFunction = New RFunction clsVisMissFunction = New RFunction clsVisGuessFunction = New RFunction + clsSamplingFraction = New RFunction ucrSelectorVisualizeData.Reset() ucrSaveGraph.Reset() From eb0073f175bb874a240867a011d7ddbec0991e3d Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Thu, 22 Oct 2020 11:07:10 +0200 Subject: [PATCH 269/277] Update instat/dlgCalculator.vb --- instat/dlgCalculator.vb | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index f6b0d6dc7b9..4682221b3aa 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -111,6 +111,7 @@ Public Class dlgCalculator ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False End If End Sub + Private Sub ucrBase_ClickOk(sender As Object, e As EventArgs) Handles ucrBase.ClickOk ucrCalc.SetCalculationHistory() End Sub From 9024ab87913cf9b2edcc403594e2651c48f4e3f9 Mon Sep 17 00:00:00 2001 From: lloyddewit <57253949+lloyddewit@users.noreply.github.com> Date: Thu, 22 Oct 2020 11:07:25 +0200 Subject: [PATCH 270/277] Update instat/dlgCalculator.vb --- instat/dlgCalculator.vb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index 4682221b3aa..f8f545aa919 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -128,10 +128,6 @@ Public Class dlgCalculator End Sub Private Sub ucrInputCalOptions_NameChanged() Handles ucrCalc.NameChanged - CalculationsOptions() - End Sub - - Private Sub CalculationsOptions() Select Case ucrCalc.ucrInputCalOptions.GetText Case "Maths" Me.Width = iBasicWidth * 1.38 From 05b6d008ef2e057f46134c158354be0025ce9b09 Mon Sep 17 00:00:00 2001 From: Wycklife Bonyo Date: Thu, 22 Oct 2020 12:52:54 +0300 Subject: [PATCH 271/277] Minor change on the property of the checkbox --- instat/dlgVisualizeData.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instat/dlgVisualizeData.vb b/instat/dlgVisualizeData.vb index a0cffa6e0b8..eaf27af87a4 100644 --- a/instat/dlgVisualizeData.vb +++ b/instat/dlgVisualizeData.vb @@ -65,7 +65,7 @@ Public Class dlgVisualizeData ucrPnlSelectData.AddParameterPresentCondition(rdoWholeDataFrame, "data") ucrPnlSelectData.AddParameterPresentCondition(rdoSelectedColumn, "x") - ucrChkSortVariables.SetParameter(New RParameter("sort_type", 1), bNewChangeParameterValue:=False, bNewAddRemoveParameter:=False) + ucrChkSortVariables.SetParameter(New RParameter("sort_type", 1), bNewChangeParameterValue:=True, bNewAddRemoveParameter:=False) ucrChkSortVariables.SetText("Sort Variables") ucrChkSortVariables.SetValuesCheckedAndUnchecked("TRUE", "FALSE") From 6fe1ede3da033e3eb364cc4b7c17358ec0370be0 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 22 Oct 2020 13:07:49 +0100 Subject: [PATCH 272/277] added comments and added variable for ndays --- .../static/InstatObject/R/instat_object_R6.R | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 3ad8da7b0f9..f064b1dd618 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1808,7 +1808,7 @@ DataBook$set("public", "crops_definitions", function(data_name, year, station, r #' @param stack_years when format = "years" stack_years specifies the years. Must be same length as stack_cols #' If not specified, the function will try to determine the years using the format "Xyyyy" where "X" is any character and "yyyy" is the year. #' @param stack_cols a character vector of columns to stack -#' if format == "days" 31 columns (in order) for each day of the month are expected +#' if format == "days" 31 columns (in order) for each day of the month are expected, or 62 with alternate value/flag columns #' if format == "months" 12 columns (in order) for each month are expected #' if format == "years" any number of year columns can be given. These should be named with format "Xyyyy" #' where "X" is any character and "yyyy" is the year @@ -1919,6 +1919,7 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, } if(format == "days") { + ndays <- 31 # month column required in this case if(missing(month)) stop("month column is required when format == 'days'") @@ -1926,14 +1927,14 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(missing(year)) stop("year column is required when format == 'days'") # stack column checks - if(length(stack_cols) != 31 && length(stack_cols) != 62) stop("You have specified: ", length(stack_cols), " stack columns\nThere must be exactly 31 or 62 stack columns when format == 'days'") + if(length(stack_cols) != ndays && length(stack_cols) != 2 * ndays) stop("You have specified: ", length(stack_cols), " stack columns\nThere must be exactly ", ndays, " or ", 2 * ndays, " stack columns when format == 'days'") # TRUE if flag columns are included - flags <- length(stack_cols) == 62 + flags <- length(stack_cols) == 2 * ndays if(flags) { # We assume that value/flag columns alternate and are in correct order i.e. c(value1, flag1, value2, flag2, ..., value31, flag31) - val_col_names <- stack_cols[seq(1, 61, 2)] - flag_col_names <- stack_cols[seq(2, 62, 2)] + val_col_names <- stack_cols[seq(1, 2 * ndays - 1, 2)] + flag_col_names <- stack_cols[seq(2, 2 * ndays, 2)] if(!all(sapply(x[, val_col_names], function(col) is.numeric(col) || (is.logical(col) && all(is.na(col)))))) stop("Every other column must be numeric to represent values (starting with the first columns). \nThe following value columns are not numeric: ", paste(stack_cols[!sapply(x[, val_col_names], is.numeric)], collapse = ",")) # Name of flag column flag_name <- "flag" @@ -1951,17 +1952,18 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, if(flags) { # renaming the stack_cols with a consistent pattern makes it possible for pivot_longer to stack both sets of columns together and construct the day column correctly # This assumes stack_cols are in the correct order i.e. c(value1, flag1, value2, flag2, ..., value31, flag31) - new_stack_cols <- paste(c("value", "flag"), rep(1:31, each = 2), sep = "_") + new_stack_cols <- paste(c("value", "flag"), rep(1:ndays, each = 2), sep = "_") names(y)[names(y) %in% stack_cols] <- new_stack_cols - # ".value" is a special sentinel used in names_to ensure names of value columns come from the names of cols. See ?pivot_longer values_to section for details. + # ".value" is a special sentinel used in names_to to ensure names of value columns come from the names of cols. See ?pivot_longer values_to section for details. y <- tidyr::pivot_longer(y, cols = tidyselect::all_of(new_stack_cols), names_to = c(".value", "day"), names_sep = "_") } else { # renaming the stack_cols so that the day column can be constructed correctly # This assumes stack_cols are in the correct order i.e. 1 - 31 - new_stack_cols <- paste0("day", 1:31) + new_stack_cols <- paste0("day", 1:ndays) names(y)[names(y) %in% stack_cols] <- new_stack_cols y <- tidyr::pivot_longer(y, cols = tidyselect::all_of(new_stack_cols), names_to = "day", values_to = element_name) + # extract day number from e.g. "day10" y$day <- substr(y$day, 4, 5) } @@ -1990,7 +1992,8 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, new_stack_cols <- paste0("month", 1:12) names(y)[names(y) %in% stack_cols] <- new_stack_cols y <- tidyr::pivot_longer(y, cols = tidyselect::all_of(new_stack_cols), names_to = "month", values_to = element_name) - y$month <- substr(y$month, 6, 8) + # extract month number from e.g. "month10" + y$month <- substr(y$month, 6, 7) y$date <- as.Date(paste(y$year, y$month, y$day), format = paste(year_format, "%m", "%d")) } From 953a5e3ad56b1edac001dfc223bc4114aab1ff36 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 22 Oct 2020 13:10:00 +0100 Subject: [PATCH 273/277] added TODO comment --- instat/static/InstatObject/R/instat_object_R6.R | 1 + 1 file changed, 1 insertion(+) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index f064b1dd618..557b8e3e5d4 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -1935,6 +1935,7 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, # We assume that value/flag columns alternate and are in correct order i.e. c(value1, flag1, value2, flag2, ..., value31, flag31) val_col_names <- stack_cols[seq(1, 2 * ndays - 1, 2)] flag_col_names <- stack_cols[seq(2, 2 * ndays, 2)] + # TODO This should be a more global function if(!all(sapply(x[, val_col_names], function(col) is.numeric(col) || (is.logical(col) && all(is.na(col)))))) stop("Every other column must be numeric to represent values (starting with the first columns). \nThe following value columns are not numeric: ", paste(stack_cols[!sapply(x[, val_col_names], is.numeric)], collapse = ",")) # Name of flag column flag_name <- "flag" From 5e3158392929eba47df40604acd793ee7dd42252 Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 22 Oct 2020 13:47:35 +0100 Subject: [PATCH 274/277] cleaned R code continue blocks --- .../static/InstatObject/R/instat_object_R6.R | 107 +++++++++--------- 1 file changed, 55 insertions(+), 52 deletions(-) diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index 557b8e3e5d4..d9561ef912c 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -2076,62 +2076,65 @@ DataBook$set("public","tidy_climatic_data", function(x, format, stack_cols, day, } } - if(continue) { - # Standard format of slowest varying structure variables first (station then element then date) followed by measurements - if(!missing(station)) z <- data.frame(station = forcats::as_factor(y$station), date = y$date) - else z <- data.frame(date = y$date) - if(!missing(element)) z$element <- y$element - z[[element_name]] <- y[[element_name]] - if(flags) z[[flag_name]] <- y[[flag_name]] - - # Initialise id columns used for sorting data - id_cols <- c() - if(!missing(station)) id_cols <- c(id_cols, "station") - - z <- dplyr::filter(z, !is.na(date)) - - # If data contains multiple elements, optionally unstack the element column - if(!missing(element)) { - if(unstack_elements) { - # pivot_wider allows unstacking multiple column sets, used when flags included. - values_from <- c(element_name) - if(flags) values_from <- c(values_from, flag_name) - # first check for unique combinations to ensure no duplicates - z_dup <- duplicated(z %>% dplyr::select(-tidyselect::all_of(values_from))) - if(any(z_dup > 0)) { - # This should be a stop but then detailed output can't be displayed by R-Instat - cat("\nError: Cannot tidy data as some elements have multiple values on the same date. Check and resolve duplicates first.\n") - z_check <- z %>% filter(z_dup > 0) - if(!silent) { - cat("\n*** Duplicates ***\n\n") - print(z_check, row.names = FALSE) - } - continue <- FALSE + # This should have been a stop above but then detailed output can't be displayed by R-Instat + if(!continue) return() + + # Standard format of slowest varying structure variables first (station then element then date) followed by measurements + if(!missing(station)) z <- data.frame(station = forcats::as_factor(y$station), date = y$date) + else z <- data.frame(date = y$date) + if(!missing(element)) z$element <- y$element + z[[element_name]] <- y[[element_name]] + if(flags) z[[flag_name]] <- y[[flag_name]] + + # Initialise id columns used for sorting data + id_cols <- c() + if(!missing(station)) id_cols <- c(id_cols, "station") + + z <- dplyr::filter(z, !is.na(date)) + + # If data contains multiple elements, optionally unstack the element column + if(!missing(element)) { + if(unstack_elements) { + # pivot_wider allows unstacking multiple column sets, used when flags included. + values_from <- c(element_name) + if(flags) values_from <- c(values_from, flag_name) + # first check for unique combinations to ensure no duplicates + z_dup <- duplicated(z %>% dplyr::select(-tidyselect::all_of(values_from))) + if(any(z_dup > 0)) { + # This should be a stop but then detailed output can't be displayed by R-Instat + cat("\nError: Cannot tidy data as some elements have multiple values on the same date. Check and resolve duplicates first.\n") + z_check <- z %>% filter(z_dup > 0) + if(!silent) { + cat("\n*** Duplicates ***\n\n") + print(z_check, row.names = FALSE) } - else z <- tidyr::pivot_wider(z, names_from = element, values_from = tidyselect::all_of(values_from)) - } - # If not unstacking then need to sort by element column - else id_cols <- c(id_cols, "element") - } - if(continue) { - # Add this last to ensure date varies fastest - id_cols <- c(id_cols, "date") - # TODO Find a better way to do this. Update if there could be more the 3 id cols. - if(length(id_cols) == 1) { - z <- z %>% dplyr::arrange(.data[[id_cols[1]]]) - } - else if(length(id_cols) == 2) { - z <- z %>% dplyr::arrange(.data[[id_cols[1]]], .data[[id_cols[2]]]) + continue <- FALSE } - else if(length(id_cols) == 3) { - z <- z %>% dplyr::arrange(.data[[id_cols[1]]], .data[[id_cols[2]]], .data[[id_cols[3]]]) - } - if(missing(new_name) || new_name == "") new_name <- next_default_item("data", existing_names = self$get_data_names()) - data_list <- list(z) - names(data_list) <- new_name - self$import_data(data_tables=data_list) + else z <- tidyr::pivot_wider(z, names_from = element, values_from = tidyselect::all_of(values_from)) } + # If not unstacking then need to sort by element column + else id_cols <- c(id_cols, "element") } + + # This should have been a stop above but then detailed output can't be displayed by R-Instat + if(!continue) return() + + # Add this last to ensure date varies fastest + id_cols <- c(id_cols, "date") + # TODO Find a better way to do this. Update if there could be more the 3 id cols. + if(length(id_cols) == 1) { + z <- z %>% dplyr::arrange(.data[[id_cols[1]]]) + } + else if(length(id_cols) == 2) { + z <- z %>% dplyr::arrange(.data[[id_cols[1]]], .data[[id_cols[2]]]) + } + else if(length(id_cols) == 3) { + z <- z %>% dplyr::arrange(.data[[id_cols[1]]], .data[[id_cols[2]]], .data[[id_cols[3]]]) + } + if(missing(new_name) || new_name == "") new_name <- next_default_item("data", existing_names = self$get_data_names()) + data_list <- list(z) + names(data_list) <- new_name + self$import_data(data_tables=data_list) } ) From d7875ce74f25dcf6dc330f149b07c022a586d931 Mon Sep 17 00:00:00 2001 From: patowhiz Date: Thu, 22 Oct 2020 16:25:12 +0300 Subject: [PATCH 275/277] Removed extra links --- instat/ucrDataView.Designer.vb | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/instat/ucrDataView.Designer.vb b/instat/ucrDataView.Designer.vb index baf6be6fa74..c4845d2bfbd 100644 --- a/instat/ucrDataView.Designer.vb +++ b/instat/ucrDataView.Designer.vb @@ -104,7 +104,6 @@ Partial Class ucrDataView Me.tlpTableContainer = New System.Windows.Forms.TableLayoutPanel() Me.pnlDataContainer = New System.Windows.Forms.Panel() Me.panelAllMenuItems = New System.Windows.Forms.Panel() - Me.linkHelpMoreToCome = New System.Windows.Forms.LinkLabel() Me.linkHelpInstructionVideos = New System.Windows.Forms.LinkLabel() Me.linkHelpRInstatWebsite = New System.Windows.Forms.LinkLabel() Me.linkHelpRpackages = New System.Windows.Forms.LinkLabel() @@ -561,7 +560,6 @@ Partial Class ucrDataView ' 'panelAllMenuItems ' - Me.panelAllMenuItems.Controls.Add(Me.linkHelpMoreToCome) Me.panelAllMenuItems.Controls.Add(Me.linkHelpInstructionVideos) Me.panelAllMenuItems.Controls.Add(Me.linkHelpRInstatWebsite) Me.panelAllMenuItems.Controls.Add(Me.linkHelpRpackages) @@ -580,20 +578,6 @@ Partial Class ucrDataView Me.panelAllMenuItems.TabIndex = 7 Me.panelAllMenuItems.Visible = False ' - 'linkHelpMoreToCome - ' - Me.linkHelpMoreToCome.ActiveLinkColor = System.Drawing.Color.Blue - Me.linkHelpMoreToCome.AutoSize = True - Me.linkHelpMoreToCome.Enabled = False - Me.linkHelpMoreToCome.ImeMode = System.Windows.Forms.ImeMode.NoControl - Me.linkHelpMoreToCome.LinkBehavior = System.Windows.Forms.LinkBehavior.NeverUnderline - Me.linkHelpMoreToCome.Location = New System.Drawing.Point(30, 409) - Me.linkHelpMoreToCome.Name = "linkHelpMoreToCome" - Me.linkHelpMoreToCome.Size = New System.Drawing.Size(72, 13) - Me.linkHelpMoreToCome.TabIndex = 11 - Me.linkHelpMoreToCome.TabStop = True - Me.linkHelpMoreToCome.Text = "More to come" - ' 'linkHelpInstructionVideos ' Me.linkHelpInstructionVideos.ActiveLinkColor = System.Drawing.Color.Blue @@ -607,6 +591,7 @@ Partial Class ucrDataView Me.linkHelpInstructionVideos.TabIndex = 10 Me.linkHelpInstructionVideos.TabStop = True Me.linkHelpInstructionVideos.Text = "Instructional videos" + Me.linkHelpInstructionVideos.Visible = False ' 'linkHelpRInstatWebsite ' @@ -632,7 +617,7 @@ Partial Class ucrDataView Me.linkHelpRpackages.Size = New System.Drawing.Size(116, 13) Me.linkHelpRpackages.TabIndex = 8 Me.linkHelpRpackages.TabStop = True - Me.linkHelpRpackages.Text = "R-packages in R-Instat" + Me.linkHelpRpackages.Text = "R packages in R-Instat" ' 'linkHelpIntroduction ' @@ -821,7 +806,6 @@ Partial Class ucrDataView Friend WithEvents lblRecent As Label Friend WithEvents lblStart As Label Friend WithEvents panelRecentMenuItems As Panel - Friend WithEvents linkHelpMoreToCome As LinkLabel Friend WithEvents linkHelpInstructionVideos As LinkLabel Friend WithEvents linkHelpRInstatWebsite As LinkLabel Friend WithEvents linkHelpRpackages As LinkLabel From c88879435e1fb0e66e762c74421b087a8d9896ce Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Thu, 22 Oct 2020 17:50:10 +0100 Subject: [PATCH 276/277] removed no data loaded label --- instat/ucrDataView.Designer.vb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/instat/ucrDataView.Designer.vb b/instat/ucrDataView.Designer.vb index c4845d2bfbd..cad8d750a24 100644 --- a/instat/ucrDataView.Designer.vb +++ b/instat/ucrDataView.Designer.vb @@ -98,7 +98,6 @@ Partial Class ucrDataView Me.CopySheet = New System.Windows.Forms.ToolStripMenuItem() Me.reorderSheet = New System.Windows.Forms.ToolStripMenuItem() Me.ViewSheet = New System.Windows.Forms.ToolStripMenuItem() - Me.lblNoData = New System.Windows.Forms.Label() Me.lblRowDisplay = New System.Windows.Forms.Label() Me.lblHeader = New System.Windows.Forms.Label() Me.tlpTableContainer = New System.Windows.Forms.TableLayoutPanel() @@ -494,18 +493,6 @@ Partial Class ucrDataView Me.ViewSheet.Size = New System.Drawing.Size(162, 22) Me.ViewSheet.Text = "View Data Frame" ' - 'lblNoData - ' - Me.lblNoData.Dock = System.Windows.Forms.DockStyle.Fill - Me.lblNoData.Font = New System.Drawing.Font("Microsoft Sans Serif", 20.25!) - Me.lblNoData.Location = New System.Drawing.Point(0, 0) - Me.lblNoData.Name = "lblNoData" - Me.lblNoData.Size = New System.Drawing.Size(438, 454) - Me.lblNoData.TabIndex = 1 - Me.lblNoData.Tag = "no_data_loaded" - Me.lblNoData.Text = "No Data Loaded" - Me.lblNoData.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - ' 'lblRowDisplay ' Me.lblRowDisplay.Dock = System.Windows.Forms.DockStyle.Fill @@ -551,7 +538,6 @@ Partial Class ucrDataView ' Me.pnlDataContainer.Controls.Add(Me.panelAllMenuItems) Me.pnlDataContainer.Controls.Add(Me.grdData) - Me.pnlDataContainer.Controls.Add(Me.lblNoData) Me.pnlDataContainer.Dock = System.Windows.Forms.DockStyle.Fill Me.pnlDataContainer.Location = New System.Drawing.Point(3, 23) Me.pnlDataContainer.Name = "pnlDataContainer" @@ -735,7 +721,6 @@ Partial Class ucrDataView End Sub Public WithEvents grdData As unvell.ReoGrid.ReoGridControl - Friend WithEvents lblNoData As Label Private WithEvents columnContextMenuStrip As ContextMenuStrip Private WithEvents mnuInsertColsBefore As ToolStripMenuItem Private WithEvents mnuDeleteCol As ToolStripMenuItem From c2cb32f15a53dac0bba09373f639a7f174f1c51e Mon Sep 17 00:00:00 2001 From: Danny Parsons Date: Fri, 23 Oct 2020 11:03:10 +0100 Subject: [PATCH 277/277] Update Download.html --- docs/Download.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Download.html b/docs/Download.html index 65a727250ba..5ee67399179 100644 --- a/docs/Download.html +++ b/docs/Download.html @@ -79,7 +79,7 @@

Download R-Instat


-

R-Instat 0.6.2 Installer (.exe 483MB)

+

R-Instat 0.6.3 Installer (.exe 550MB)

R-Instat is currently a Windows only application. However, it can be accessed on Mac or Linux through use of a Virtual Windows Machine.

Installation & Documentation