diff --git a/instat/dlgBivariateANOVA.Designer.vb b/instat/dlgBivariateANOVA.Designer.vb index f23e7a469c9..852d994d10f 100644 --- a/instat/dlgBivariateANOVA.Designer.vb +++ b/instat/dlgBivariateANOVA.Designer.vb @@ -20,19 +20,161 @@ Partial Class dlgBivariateANOVA '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() - ' - 'dlgBivariateANOVA - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(284, 261) - Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow - Me.Name = "dlgBivariateANOVA" - Me.Text = "dlgBivariateANOVA" - Me.ResumeLayout(False) - - End Sub + Me.ucrBase = New instat.ucrButtons() + Me.ucrAddRemove = New instat.ucrSelectorAddRemove() + Me.ucrReceiver1stResponseVariable = New instat.ucrReceiverSingle() + Me.ucrReceiver2ndResponseVariable = New instat.ucrReceiverSingle() + Me.ucrReceiverTreatmentFactor = New instat.ucrReceiverSingle() + Me.ucrReceiverBlockingFactor = New instat.ucrReceiverSingle() + Me.chkContrasts = New System.Windows.Forms.CheckBox() + Me.chkSaveResults = New System.Windows.Forms.CheckBox() + Me.lbl1stRespVar = New System.Windows.Forms.Label() + Me.lbl2ndRespVar = New System.Windows.Forms.Label() + Me.lblTreatmentFactor = New System.Windows.Forms.Label() + Me.lblBlockingFactor = New System.Windows.Forms.Label() + Me.SuspendLayout() + ' + 'ucrBase + ' + Me.ucrBase.Location = New System.Drawing.Point(0, 297) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 32) + Me.ucrBase.TabIndex = 0 + ' + 'ucrAddRemove + ' + Me.ucrAddRemove.Location = New System.Drawing.Point(12, 38) + Me.ucrAddRemove.Name = "ucrAddRemove" + Me.ucrAddRemove.Size = New System.Drawing.Size(203, 127) + Me.ucrAddRemove.TabIndex = 1 + ' + 'ucrReceiver1stResponseVariable + ' + Me.ucrReceiver1stResponseVariable.Location = New System.Drawing.Point(280, 29) + Me.ucrReceiver1stResponseVariable.Name = "ucrReceiver1stResponseVariable" + Me.ucrReceiver1stResponseVariable.Size = New System.Drawing.Size(106, 26) + Me.ucrReceiver1stResponseVariable.TabIndex = 2 + ' + 'ucrReceiver2ndResponseVariable + ' + Me.ucrReceiver2ndResponseVariable.Location = New System.Drawing.Point(283, 74) + Me.ucrReceiver2ndResponseVariable.Name = "ucrReceiver2ndResponseVariable" + Me.ucrReceiver2ndResponseVariable.Size = New System.Drawing.Size(106, 26) + Me.ucrReceiver2ndResponseVariable.TabIndex = 3 + ' + 'ucrReceiverTreatmentFactor + ' + Me.ucrReceiverTreatmentFactor.Location = New System.Drawing.Point(283, 119) + Me.ucrReceiverTreatmentFactor.Name = "ucrReceiverTreatmentFactor" + Me.ucrReceiverTreatmentFactor.Size = New System.Drawing.Size(106, 26) + Me.ucrReceiverTreatmentFactor.TabIndex = 4 + ' + 'ucrReceiverBlockingFactor + ' + Me.ucrReceiverBlockingFactor.Location = New System.Drawing.Point(282, 163) + Me.ucrReceiverBlockingFactor.Name = "ucrReceiverBlockingFactor" + Me.ucrReceiverBlockingFactor.Size = New System.Drawing.Size(106, 26) + Me.ucrReceiverBlockingFactor.TabIndex = 5 + ' + 'chkContrasts + ' + Me.chkContrasts.AutoSize = True + Me.chkContrasts.Location = New System.Drawing.Point(22, 216) + Me.chkContrasts.Name = "chkContrasts" + Me.chkContrasts.Size = New System.Drawing.Size(70, 17) + Me.chkContrasts.TabIndex = 6 + Me.chkContrasts.Tag = "Contrasts" + Me.chkContrasts.Text = "Contrasts" + Me.chkContrasts.UseVisualStyleBackColor = True + ' + 'chkSaveResults + ' + Me.chkSaveResults.AutoSize = True + Me.chkSaveResults.Location = New System.Drawing.Point(22, 258) + Me.chkSaveResults.Name = "chkSaveResults" + Me.chkSaveResults.Size = New System.Drawing.Size(84, 17) + Me.chkSaveResults.TabIndex = 7 + Me.chkSaveResults.Tag = "Save_results" + Me.chkSaveResults.Text = "Save results" + Me.chkSaveResults.UseVisualStyleBackColor = True + ' + 'lbl1stRespVar + ' + Me.lbl1stRespVar.AutoSize = True + Me.lbl1stRespVar.Location = New System.Drawing.Point(277, 13) + Me.lbl1stRespVar.Name = "lbl1stRespVar" + Me.lbl1stRespVar.Size = New System.Drawing.Size(112, 13) + Me.lbl1stRespVar.TabIndex = 8 + Me.lbl1stRespVar.Tag = "Response_variable" + Me.lbl1stRespVar.Text = "1st Response variable" + ' + 'lbl2ndRespVar + ' + Me.lbl2ndRespVar.AutoSize = True + Me.lbl2ndRespVar.Location = New System.Drawing.Point(289, 62) + Me.lbl2ndRespVar.Name = "lbl2ndRespVar" + Me.lbl2ndRespVar.Size = New System.Drawing.Size(116, 13) + Me.lbl2ndRespVar.TabIndex = 9 + Me.lbl2ndRespVar.Tag = "Response_variable" + Me.lbl2ndRespVar.Text = "2nd Response variable" + ' + 'lblTreatmentFactor + ' + Me.lblTreatmentFactor.AutoSize = True + Me.lblTreatmentFactor.Location = New System.Drawing.Point(289, 107) + Me.lblTreatmentFactor.Name = "lblTreatmentFactor" + Me.lblTreatmentFactor.Size = New System.Drawing.Size(85, 13) + Me.lblTreatmentFactor.TabIndex = 10 + Me.lblTreatmentFactor.Tag = "Treatment_factor" + Me.lblTreatmentFactor.Text = "Treatment factor" + ' + 'lblBlockingFactor + ' + Me.lblBlockingFactor.AutoSize = True + Me.lblBlockingFactor.Location = New System.Drawing.Point(282, 152) + Me.lblBlockingFactor.Name = "lblBlockingFactor" + Me.lblBlockingFactor.Size = New System.Drawing.Size(78, 13) + Me.lblBlockingFactor.TabIndex = 11 + Me.lblBlockingFactor.Tag = "Blocking_factor" + Me.lblBlockingFactor.Text = "Blocking factor" + ' + 'dlgBivariateANOVA + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(411, 331) + Me.Controls.Add(Me.lblBlockingFactor) + Me.Controls.Add(Me.lblTreatmentFactor) + Me.Controls.Add(Me.lbl2ndRespVar) + Me.Controls.Add(Me.lbl1stRespVar) + Me.Controls.Add(Me.chkSaveResults) + Me.Controls.Add(Me.chkContrasts) + Me.Controls.Add(Me.ucrReceiverBlockingFactor) + Me.Controls.Add(Me.ucrReceiverTreatmentFactor) + Me.Controls.Add(Me.ucrReceiver2ndResponseVariable) + Me.Controls.Add(Me.ucrReceiver1stResponseVariable) + Me.Controls.Add(Me.ucrAddRemove) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Name = "dlgBivariateANOVA" + Me.Text = "Bivariate ANOVA" + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + + Friend WithEvents ucrBase As ucrButtons + Friend WithEvents ucrAddRemove As ucrSelectorAddRemove + Friend WithEvents ucrReceiver1stResponseVariable As ucrReceiverSingle + Friend WithEvents ucrReceiver2ndResponseVariable As ucrReceiverSingle + Friend WithEvents ucrReceiverTreatmentFactor As ucrReceiverSingle + Friend WithEvents ucrReceiverBlockingFactor As ucrReceiverSingle + Friend WithEvents chkContrasts As CheckBox + Friend WithEvents chkSaveResults As CheckBox + Friend WithEvents lbl1stRespVar As Label + Friend WithEvents lbl2ndRespVar As Label + Friend WithEvents lblTreatmentFactor As Label + Friend WithEvents lblBlockingFactor As Label End Class diff --git a/instat/dlgBivariateANOVA.vb b/instat/dlgBivariateANOVA.vb index 43c0e02bb38..6683d4a7251 100644 --- a/instat/dlgBivariateANOVA.vb +++ b/instat/dlgBivariateANOVA.vb @@ -1,3 +1,66 @@ -Public Class dlgBivariateANOVA - +' Instat-R +' Copyright (C) 2015 +' +' 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 k +' along with this program. If not, see . + +Imports instat.Translations +Public Class dlgBivariateANOVA + Private Sub dlgBivariateANOVA_Load(sender As Object, e As EventArgs) Handles MyBase.Load + ucrBase.clsRsyntax.SetFunction("manova") + ucrBase.clsRsyntax.iCallType = 2 + ucrReceiver1stResponseVariable.Selector = ucrAddRemove + ucrReceiver1stResponseVariable.SetMeAsReceiver() + autoTranslate(Me) + ucrReceiver2ndResponseVariable.Selector = ucrAddRemove + ucrReceiverTreatmentFactor.Selector = ucrAddRemove + ucrReceiverBlockingFactor.Selector = ucrAddRemove + End Sub + + Private Sub ucrReceiver1stResponseVariable_Leave(sender As Object, e As EventArgs) Handles ucrReceiver1stResponseVariable.Leave + FillFormula() + + End Sub + + Private Sub ucrReceiver2ndResponseVariable_Leave(sender As Object, e As EventArgs) Handles ucrReceiver2ndResponseVariable.Leave + FillFormula() + End Sub + + Private Sub ucrReceiverTreatmentFactor_Leave(sender As Object, e As EventArgs) Handles ucrReceiverTreatmentFactor.Leave + FillFormula() + + End Sub + + Private Sub ucrReceiverBlockingFactor_Load(sender As Object, e As EventArgs) Handles ucrReceiverBlockingFactor.Leave + FillFormula() + End Sub + Private Sub FillFormula() + Dim str1stResponseVariable As String + Dim str2ndResponseVariable As String + Dim strTreatmentFactor As String + Dim strBlockingFactor As String + str1stResponseVariable = ucrReceiver1stResponseVariable.GetVariables() + str2ndResponseVariable = ucrReceiver2ndResponseVariable.GetVariables() + strTreatmentFactor = ucrReceiverBlockingFactor.GetVariables() + strBlockingFactor = ucrReceiverBlockingFactor.GetVariables() + If ((Not IsNothing(str1stResponseVariable)) Or (Not IsNothing(str2ndResponseVariable)) Or (Not IsNothing(strTreatmentFactor)) Or (Not IsNothing(strBlockingFactor))) Then + 'ucrBase.clsRsyntax.AddParameter("formula", cbind(str1stResponseVariable,str2ndResponseVariable) & "~" & strTreatmentFactor & "*" & strBlockingFactor) + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + + + + End If + End Sub End Class \ No newline at end of file