Skip to content

Commit

Permalink
code addition
Browse files Browse the repository at this point in the history
  • Loading branch information
JacklineKemboi committed Jul 23, 2018
1 parent bf858dc commit 4133da5
Showing 1 changed file with 63 additions and 2 deletions.
65 changes: 63 additions & 2 deletions instat/dlgClimaticMaps.vb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ Imports instat.Translations
Public Class dlgClimaticMaps
Private bFirstLoad As Boolean = True
Private bReset As Boolean = True

Private clsBaseOperator As New ROperator
Dim lstReceivers As New List(Of ucrReceiverSingle)
Dim dctRecognisedTypes As New Dictionary(Of String, List(Of String))
Private clsRggplotFunction, clsRaesFunction, clsRgeompointFunction, clsRgeompolygonFunction, clsRgeompathFunction, clsRgeomtextFunction As RFunction
Private clsRlabsFunction, clsRscalefilldiscreteFunction, clsRscaleshapeFunction As RFunction
Private Sub dlgClimaticMaps_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
InitialiseDialog()
Expand All @@ -34,15 +38,72 @@ Public Class dlgClimaticMaps
TestOkEnabled()
End Sub
Private Sub InitialiseDialog()
dctRecognisedTypes.Add("long", {"long"}.ToList())
dctRecognisedTypes.Add("lat", {"lat"}.ToList())
dctRecognisedTypes.Add("group", {"group"}.ToList())
dctRecognisedTypes.Add("fill", {"fill"}.ToList())
dctRecognisedTypes.Add("x", {"x"}.ToList())
dctRecognisedTypes.Add("y", {"y"}.ToList())
dctRecognisedTypes.Add("shape", {"shape"}.ToList())
dctRecognisedTypes.Add("colour", {"colour"}.ToList())

lstReceivers.AddRange({UcrReceiverSingle1, UcrReceiverSingle2, UcrReceiverSingle3, UcrReceiverSingle4, UcrReceiverSingle5, UcrReceiverSingle6,
UcrReceiverSingle7, UcrReceiverSingle8})
End Sub
Private Sub SetDefaults()
clsRggplotFunction = New RFunction
clsRgeompolygonFunction = New RFunction
clsRgeompointFunction = New RFunction
clsRgeompathFunction = New RFunction
clsRgeomtextFunction = New RFunction
clsRlabsFunction = New RFunction
clsRscalefilldiscreteFunction = New RFunction
clsRscaleshapeFunction = New RFunction
clsBaseOperator = New ROperator

ucrSelectorClimaticMaps.Reset()


clsBaseOperator.SetOperation("+")


clsRggplotFunction.SetPackageName("ggplot2")
clsRggplotFunction.SetRCommand("ggplot")


clsRgeompolygonFunction.SetPackageName("ggplot2")
clsRgeompolygonFunction.SetRCommand("geom_polygon")
clsRgeompolygonFunction.AddParameter("data", clsRFunctionParameter:=, iPosition:=0)
clsRgeompolygonFunction.AddParameter("aes", clsRFunctionParameter:=clsRaesFunction, iPosition:=1)
clsRgeompolygonFunction.AddParameter("size", strParameterValue:=3, iPosition:=2)
clsRgeompolygonFunction.AddParameter("alpha", strParameterValue:=0.5, iPosition:=3)

clsRgeompointFunction.SetPackageName("ggplot2")
clsRgeompointFunction.SetRCommand("geom_point")
clsRgeompointFunction.AddParameter("data", clsRFunctionParameter:=, iPosition:=0)
clsRgeompointFunction.AddParameter("aes", clsRFunctionParameter:=clsRaesFunction, iPosition:=1)
clsRgeompointFunction.AddParameter("shape", strParameterValue:="colour", iPosition:=2)
clsRgeompointFunction.AddParameter("size", strParameterValue:=3, iPosition:=3)
clsRgeompointFunction.AddParameter("alpha", strParameterValue:=0.5, iPosition:=4)

clsRaesFunction.SetPackageName("ggplot2")
clsRaesFunction.SetRCommand("aes")
clsRaesFunction.AddParameter("x", strParameterValue:="long", iPosition:=0)
clsRaesFunction.AddParameter("y", strParameterValue:="lat", iPosition:=0)
clsRaesFunction.AddParameter("group", strParameterValue:="group", iPosition:=0)




End Sub
Private Sub SetRCodeForControls(bReset As Boolean)

End Sub
Private Sub TestOkEnabled()

If ucrVariablesAsFactorforHist.IsEmpty OrElse Not ucrSaveHist.IsComplete Then
ucrBase.OKEnabled(False)
Else
ucrBase.OKEnabled(True)
End If
End Sub
End Class

0 comments on commit 4133da5

Please sign in to comment.