Skip to content

Commit

Permalink
Merge pull request #93 from africanmathsinitiative/master
Browse files Browse the repository at this point in the history
updating main branch
  • Loading branch information
stevekogo authored Jun 21, 2016
2 parents c3c4690 + dd995d4 commit 1a0fa0a
Show file tree
Hide file tree
Showing 13 changed files with 308 additions and 31 deletions.
33 changes: 19 additions & 14 deletions instat/UcrGeomListWithAes.vb
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,20 @@ Public Class UcrGeomListWithParameters
InitializeComponent()

' Add any initialization after the InitializeComponent() call.
SetSelector()
clsGeomAesFunction = New RFunction
clsGeomAesFunction.SetRCommand("aes")
End Sub

Private Sub UcrGeomListWithParameters_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If bFirstLoad Then
InitialiseControl()
SetDefaults()
SetParameters()
bFirstLoad = False
End If
SetAes(bCurrentFixAes)
End Sub

Private Sub InitialiseControl()
Private Sub SetSelector()
ucrReceiverParam1.Selector = UcrSelector
ucrReceiverParam2.Selector = UcrSelector
ucrReceiverParam3.Selector = UcrSelector
Expand All @@ -72,6 +71,7 @@ Public Class UcrGeomListWithParameters
clsGeomAesFunction.SetRCommand("aes")
End If
UcrSelector.SetDataframe(strGlobalDataFrame, (Not bUseGlobalAes) OrElse strGlobalDataFrame = "")
UcrSelector.Reset()
bCurrentFixAes = bFixAes
SetAes(bCurrentFixAes)
chkApplyOnAllLayers.Checked = bUseGlobalAes
Expand All @@ -85,16 +85,26 @@ Public Class UcrGeomListWithParameters
lstAesParameterUcr(i).Enabled = True
For Each clsParam In clsGgplotAesFunction.clsParameters
If clsParam.strArgumentName = lstCurrArguments(i) Then
lstAesParameterUcr(i).Add(clsParam.strArgumentValue)
lstAesParameterUcr(i).Enabled = Not bFixAes
Exit For
If clsCurrGeom.strGeomName = "geom_boxplot" AndAlso clsParam.strArgumentName = "x" AndAlso clsParam.strArgumentValue = Chr(34) & Chr(34) Then
lstAesParameterUcr(i).Clear()
lstAesParameterUcr(i).Enabled = True
Else
lstAesParameterUcr(i).Add(clsParam.strArgumentValue)
lstAesParameterUcr(i).Enabled = Not bFixAes
Exit For
End If
End If
Next
For Each clsParam In clsGeomAesFunction.clsParameters
If clsParam.strArgumentName = lstCurrArguments(i) Then
lstAesParameterUcr(i).Add(clsParam.strArgumentValue)
lstAesParameterUcr(i).Enabled = True
Exit For
If clsCurrGeom.strGeomName = "geom_boxplot" AndAlso clsParam.strArgumentName = "x" AndAlso clsParam.strArgumentValue = Chr(34) & Chr(34) Then
lstAesParameterUcr(i).Clear()
lstAesParameterUcr(i).Enabled = True
Else
lstAesParameterUcr(i).Add(clsParam.strArgumentValue)
lstAesParameterUcr(i).Enabled = True
Exit For
End If
End If
Next
If bFirstEnabled AndAlso lstAesParameterUcr(i).Enabled Then
Expand All @@ -106,11 +116,6 @@ Public Class UcrGeomListWithParameters
bAddToLocalAes = True
End Sub

Private Sub SetDefaults()
'sets control defaults
UcrSelector.Reset()
End Sub

Public Sub SetParameters() 'this will set function or aes parameters
Dim i As Integer = 0

Expand Down
22 changes: 21 additions & 1 deletion instat/dlgBoxPlot.vb
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ Public Class dlgBoxplot
End Sub

Private Sub SetDefaults()
clsRaesFunction.ClearParameters()
clsRgeom_boxplotFunction.ClearParameters()
ucrSelectorBoxPlot.Reset()
ucrSelectorBoxPlot.Focus()
ucrVariablesAsFactorForBoxplot.ResetControl()
chkHorizontalBoxplot.Checked = False
sdgBoxPlot.SetDefaults()
TestOkEnabled()
clsRaesFunction.AddParameter("x", Chr(34) & Chr(34)) ' Empty string is default x value in case no factor is chosen
SetXParameter()
End Sub

Private Sub InitialiseDialog()
Expand Down Expand Up @@ -100,6 +102,10 @@ Public Class dlgBoxplot
End Sub

Private Sub ucrByFactorsReceiver_SelectionChanged(sender As Object, e As EventArgs) Handles ucrByFactorsReceiver.SelectionChanged
SetXParameter()
End Sub

Private Sub SetXParameter()
If Not ucrByFactorsReceiver.IsEmpty Then
clsRaesFunction.AddParameter("x", ucrByFactorsReceiver.GetVariableNames(False))
Else
Expand All @@ -120,7 +126,21 @@ Public Class dlgBoxplot
End Sub

Private Sub cmdBoxPlotOptions_Click(sender As Object, e As EventArgs) Handles cmdBoxPlotOptions.Click
sdgLayerOptions.SetupLayer(clsTempGgPlot:=clsRggplotFunction, clsTempGeomFunc:=clsRgeom_boxplotFunction, clsTempAesFunc:=clsRaesFunction, bFixAes:=True, bFixGeom:=True, strDataframe:=ucrSelectorBoxPlot.ucrAvailableDataFrames.cboAvailableDataFrames.Text, bUseGlobalAes:=True)
sdgLayerOptions.ShowDialog()
For Each clsParam In clsRaesFunction.clsParameters
If clsParam.strArgumentName = "x" Then
If clsParam.strArgumentValue = "" Then
ucrByFactorsReceiver.Clear()
Else
ucrByFactorsReceiver.Add(clsParam.strArgumentValue)
End If
ElseIf clsParam.strArgumentName = "y" Then
ucrVariablesAsFactorForBoxplot.Add(clsParam.strArgumentValue)
ElseIf clsParam.strArgumentName = "fill" Then
ucrSecondFactorReceiver.Add(clsParam.strArgumentValue)
End If
Next
End Sub

Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset
Expand Down
53 changes: 53 additions & 0 deletions instat/dlgFourVariableModelling.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 15 additions & 0 deletions instat/dlgFourVariableModelling.fr-FR.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
120 changes: 120 additions & 0 deletions instat/dlgFourVariableModelling.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
15 changes: 15 additions & 0 deletions instat/dlgFourVariableModelling.sw-KE.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
3 changes: 3 additions & 0 deletions instat/dlgFourVariableModelling.vb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Public Class dlgFourVariableModelling

End Class
1 change: 0 additions & 1 deletion instat/dlgGeneralForGraphics.vb
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ Public Class dlgGeneralForGraphics
sdgLayerOptions.SetupLayer(clsTempGgPlot:=clsRggplotFunction, clsTempGeomFunc:=clsSelectedGeom, clsTempAesFunc:=clsGgplotAesFunction, bFixAes:=False, bFixGeom:=True, strDataframe:=strGlobalDataFrame, bUseGlobalAes:=False, clsTempLocalAes:=clsLocalAes)
sdgLayerOptions.ShowDialog()
AddLayers(lstLayers.SelectedItems(0))

End Sub

'Private Sub clsGgplotAesFunction_ParametersChanged() Handles clsGgplotAesFunction.ParametersChanged
Expand Down
Loading

0 comments on commit 1a0fa0a

Please sign in to comment.