diff --git a/instat/clsROperator.vb b/instat/clsROperator.vb index f63574f9497..1dbb49e3357 100644 --- a/instat/clsROperator.vb +++ b/instat/clsROperator.vb @@ -136,7 +136,7 @@ Public Class ROperator If Not strAssignToDataFrame = "" AndAlso (Not strAssignToColumn = "" OrElse bAssignToColumnWithoutNames) Then clsAddColumns.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$add_columns_to_data") clsAddColumns.AddParameter("data_name", Chr(34) & strAssignToDataFrame & Chr(34)) - If bAssignToColumnWithoutNames Then + If Not bAssignToColumnWithoutNames Then clsAddColumns.AddParameter("col_name", Chr(34) & strAssignToColumn & Chr(34)) End If clsAddColumns.AddParameter("col_data", strAssignTo) diff --git a/instat/clsRecentFiles.vb b/instat/clsRecentFiles.vb index 00b355351d4..805faf96155 100644 --- a/instat/clsRecentFiles.vb +++ b/instat/clsRecentFiles.vb @@ -51,7 +51,9 @@ Public Class clsRecentFiles Public Sub saveOnClose() 'saves the list of opened files on form close ' save MRU - delete existing files first - If File.Exists(MRUPath) Then File.Delete(MRUPath) + If File.Exists(MRUPath) Then + File.WriteAllText(MRUPath, "") + End If ' write each item to the file... For Each sPath As String In strListMRU File.AppendAllText(MRUPath, sPath & vbCrLf) diff --git a/instat/dlgBarAndPieChart.vb b/instat/dlgBarAndPieChart.vb index 0942d2f953e..78e77962a3e 100644 --- a/instat/dlgBarAndPieChart.vb +++ b/instat/dlgBarAndPieChart.vb @@ -148,6 +148,7 @@ Public Class dlgBarAndPieChart End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + sdgPlots.SetDataFrame(strNewDataFrame:=ucrBarChartSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text) sdgPlots.ShowDialog() End Sub diff --git a/instat/dlgBoxPlot.vb b/instat/dlgBoxPlot.vb index 79297086921..7049c722333 100644 --- a/instat/dlgBoxPlot.vb +++ b/instat/dlgBoxPlot.vb @@ -93,6 +93,7 @@ Public Class dlgBoxplot End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + sdgPlots.SetDataFrame(strNewDataFrame:=ucrSelectorBoxPlot.ucrAvailableDataFrames.cboAvailableDataFrames.Text) sdgPlots.ShowDialog() End Sub diff --git a/instat/dlgCalculator.designer.vb b/instat/dlgCalculator.designer.vb index cc4f90abf8c..0ce984e49ef 100644 --- a/instat/dlgCalculator.designer.vb +++ b/instat/dlgCalculator.designer.vb @@ -22,246 +22,676 @@ Partial Class dlgCalculator 'Do not modify it using the code editor. Private Sub InitializeComponent() - Me.cmd1 = New System.Windows.Forms.Button() - Me.cmd0 = New System.Windows.Forms.Button() - Me.cmd2 = New System.Windows.Forms.Button() - Me.cmd3 = New System.Windows.Forms.Button() - Me.cmd4 = New System.Windows.Forms.Button() - Me.cmd5 = New System.Windows.Forms.Button() - Me.cmd6 = New System.Windows.Forms.Button() - Me.cmd7 = New System.Windows.Forms.Button() - Me.cmd8 = New System.Windows.Forms.Button() - Me.cmd9 = New System.Windows.Forms.Button() - Me.cmdDot = New System.Windows.Forms.Button() - Me.cmdDivide = New System.Windows.Forms.Button() - Me.cmdPlus = New System.Windows.Forms.Button() - Me.cmdMinus = New System.Windows.Forms.Button() - Me.cmdMultiply = New System.Windows.Forms.Button() - Me.cmdPower = New System.Windows.Forms.Button() - Me.cmdDelete = New System.Windows.Forms.Button() - Me.cmdBackSpace = New System.Windows.Forms.Button() Me.lblExpression = New System.Windows.Forms.Label() Me.cmdTry = New System.Windows.Forms.Button() Me.chkSaveResultInto = New System.Windows.Forms.CheckBox() Me.chkDefaultCalculationName = New System.Windows.Forms.CheckBox() + Me.grpBasic = New System.Windows.Forms.GroupBox() Me.cmdGreaterThan = New System.Windows.Forms.Button() + Me.cmdLessThan = New System.Windows.Forms.Button() + Me.cmdPower = New System.Windows.Forms.Button() + Me.cmdDelete = New System.Windows.Forms.Button() + Me.cmdDivide = New System.Windows.Forms.Button() + Me.cmdPlus = New System.Windows.Forms.Button() + Me.cmdMinus = New System.Windows.Forms.Button() + Me.cmdMultiply = New System.Windows.Forms.Button() + Me.cmdDot = New System.Windows.Forms.Button() + Me.cmd9 = New System.Windows.Forms.Button() + Me.cmd8 = New System.Windows.Forms.Button() + Me.cmd7 = New System.Windows.Forms.Button() + Me.cmd6 = New System.Windows.Forms.Button() + Me.cmd5 = New System.Windows.Forms.Button() + Me.cmd4 = New System.Windows.Forms.Button() + Me.cmd3 = New System.Windows.Forms.Button() + Me.cmd2 = New System.Windows.Forms.Button() + Me.cmd0 = New System.Windows.Forms.Button() + Me.cmd1 = New System.Windows.Forms.Button() + Me.grpLogical = New System.Windows.Forms.GroupBox() + Me.grpMaths = New System.Windows.Forms.GroupBox() + Me.cmdSign = New System.Windows.Forms.Button() + Me.cmdRound = New System.Windows.Forms.Button() + Me.cmdSiginf = New System.Windows.Forms.Button() + Me.cmdAbs = New System.Windows.Forms.Button() + Me.cmdExp = New System.Windows.Forms.Button() + Me.cmdDeg = New System.Windows.Forms.Button() + Me.cmdTrunc = New System.Windows.Forms.Button() + Me.cmdAtan = New System.Windows.Forms.Button() + Me.cmdTan = New System.Windows.Forms.Button() + Me.cmdLogTen = New System.Windows.Forms.Button() + Me.cmdRad = New System.Windows.Forms.Button() + Me.cmdFloor = New System.Windows.Forms.Button() + Me.cmdAsin = New System.Windows.Forms.Button() + Me.cmdSin = New System.Windows.Forms.Button() + Me.cmdLog = New System.Windows.Forms.Button() + Me.cmdPi = New System.Windows.Forms.Button() + Me.cmdCeiling = New System.Windows.Forms.Button() + Me.cmdAcos = New System.Windows.Forms.Button() + Me.cmdCos = New System.Windows.Forms.Button() + Me.cmdSqrt = New System.Windows.Forms.Button() + Me.cmdGreaterOrEqualsTo = New System.Windows.Forms.Button() + Me.cmdAnd = New System.Windows.Forms.Button() + Me.cmdTrue = New System.Windows.Forms.Button() + Me.cmdIntegerDivision = New System.Windows.Forms.Button() + Me.cmdModulas = New System.Windows.Forms.Button() + Me.cmdGreater = New System.Windows.Forms.Button() + Me.cmdLesserOrEqualsTo = New System.Windows.Forms.Button() + Me.cmdLesser = New System.Windows.Forms.Button() + Me.cmdOr = New System.Windows.Forms.Button() + Me.cmdNot = New System.Windows.Forms.Button() + Me.cmdNotEqualsTo = New System.Windows.Forms.Button() + Me.cmdEquivalent = New System.Windows.Forms.Button() + Me.ucrInputCalOptions = New instat.ucrInputComboBox() + Me.ucrReceiverForCalculation = New instat.ucrReceiverExpression() Me.ucrSaveResultInto = New instat.ucrInputComboBox() Me.ucrSpaceToMangeResult = New instat.ucrInputTextBox() Me.ucrSelectorForCalculations = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBase = New instat.ucrButtons() - Me.ucrReceiverForCalculation = New instat.ucrReceiverExpression() + Me.grpBasic.SuspendLayout() + Me.grpLogical.SuspendLayout() + Me.grpMaths.SuspendLayout() Me.SuspendLayout() ' - 'cmd1 - ' - Me.cmd1.Location = New System.Drawing.Point(226, 123) - Me.cmd1.Name = "cmd1" - Me.cmd1.Size = New System.Drawing.Size(29, 31) - Me.cmd1.TabIndex = 80 - Me.cmd1.Text = "1" - Me.cmd1.UseVisualStyleBackColor = True - ' - 'cmd0 - ' - Me.cmd0.Location = New System.Drawing.Point(226, 155) - Me.cmd0.Name = "cmd0" - Me.cmd0.Size = New System.Drawing.Size(60, 30) - Me.cmd0.TabIndex = 81 - Me.cmd0.Text = "0" - Me.cmd0.UseVisualStyleBackColor = True - ' - 'cmd2 - ' - Me.cmd2.Location = New System.Drawing.Point(258, 123) - Me.cmd2.Name = "cmd2" - Me.cmd2.Size = New System.Drawing.Size(28, 31) - Me.cmd2.TabIndex = 82 - Me.cmd2.Text = "2" - Me.cmd2.UseVisualStyleBackColor = True + 'lblExpression ' - 'cmd3 + Me.lblExpression.AutoSize = True + Me.lblExpression.Location = New System.Drawing.Point(12, 17) + Me.lblExpression.Name = "lblExpression" + Me.lblExpression.Size = New System.Drawing.Size(58, 13) + Me.lblExpression.TabIndex = 107 + Me.lblExpression.Tag = "Expression" + Me.lblExpression.Text = "Expression" ' - Me.cmd3.Location = New System.Drawing.Point(288, 123) - Me.cmd3.Name = "cmd3" - Me.cmd3.Size = New System.Drawing.Size(30, 31) - Me.cmd3.TabIndex = 83 - Me.cmd3.Text = "3" - Me.cmd3.UseVisualStyleBackColor = True + 'cmdTry ' - 'cmd4 + Me.cmdTry.Location = New System.Drawing.Point(9, 228) + Me.cmdTry.Name = "cmdTry" + Me.cmdTry.Size = New System.Drawing.Size(75, 23) + Me.cmdTry.TabIndex = 110 + Me.cmdTry.Text = "Try" + Me.cmdTry.UseVisualStyleBackColor = True ' - Me.cmd4.Location = New System.Drawing.Point(226, 90) - Me.cmd4.Name = "cmd4" - Me.cmd4.Size = New System.Drawing.Size(29, 32) - Me.cmd4.TabIndex = 84 - Me.cmd4.Text = "4" - Me.cmd4.UseVisualStyleBackColor = True + 'chkSaveResultInto ' - 'cmd5 + Me.chkSaveResultInto.AutoSize = True + Me.chkSaveResultInto.Location = New System.Drawing.Point(9, 260) + Me.chkSaveResultInto.Name = "chkSaveResultInto" + Me.chkSaveResultInto.Size = New System.Drawing.Size(104, 17) + Me.chkSaveResultInto.TabIndex = 113 + Me.chkSaveResultInto.Text = "Save Result into" + Me.chkSaveResultInto.UseVisualStyleBackColor = True ' - Me.cmd5.Location = New System.Drawing.Point(258, 90) - Me.cmd5.Name = "cmd5" - Me.cmd5.Size = New System.Drawing.Size(28, 32) - Me.cmd5.TabIndex = 85 - Me.cmd5.Text = "5" - Me.cmd5.UseVisualStyleBackColor = True + 'chkDefaultCalculationName ' - 'cmd6 + Me.chkDefaultCalculationName.AutoSize = True + Me.chkDefaultCalculationName.Location = New System.Drawing.Point(9, 283) + Me.chkDefaultCalculationName.Name = "chkDefaultCalculationName" + Me.chkDefaultCalculationName.Size = New System.Drawing.Size(144, 17) + Me.chkDefaultCalculationName.TabIndex = 115 + Me.chkDefaultCalculationName.Text = "Default Calculation name" + Me.chkDefaultCalculationName.UseVisualStyleBackColor = True ' - Me.cmd6.Location = New System.Drawing.Point(288, 90) - Me.cmd6.Name = "cmd6" - Me.cmd6.Size = New System.Drawing.Size(30, 32) - Me.cmd6.TabIndex = 86 - Me.cmd6.Text = "6" - Me.cmd6.UseVisualStyleBackColor = True + 'grpBasic + ' + Me.grpBasic.Controls.Add(Me.cmdGreaterThan) + Me.grpBasic.Controls.Add(Me.cmdLessThan) + Me.grpBasic.Controls.Add(Me.cmdPower) + Me.grpBasic.Controls.Add(Me.cmdDelete) + Me.grpBasic.Controls.Add(Me.cmdDivide) + Me.grpBasic.Controls.Add(Me.cmdPlus) + Me.grpBasic.Controls.Add(Me.cmdMinus) + Me.grpBasic.Controls.Add(Me.cmdMultiply) + Me.grpBasic.Controls.Add(Me.cmdDot) + Me.grpBasic.Controls.Add(Me.cmd9) + Me.grpBasic.Controls.Add(Me.cmd8) + Me.grpBasic.Controls.Add(Me.cmd7) + Me.grpBasic.Controls.Add(Me.cmd6) + Me.grpBasic.Controls.Add(Me.cmd5) + Me.grpBasic.Controls.Add(Me.cmd4) + Me.grpBasic.Controls.Add(Me.cmd3) + Me.grpBasic.Controls.Add(Me.cmd2) + Me.grpBasic.Controls.Add(Me.cmd0) + Me.grpBasic.Controls.Add(Me.cmd1) + Me.grpBasic.Location = New System.Drawing.Point(222, 69) + Me.grpBasic.Name = "grpBasic" + Me.grpBasic.Size = New System.Drawing.Size(153, 147) + Me.grpBasic.TabIndex = 119 + Me.grpBasic.TabStop = False + Me.grpBasic.Text = "Basic" ' - 'cmd7 + 'cmdGreaterThan ' - Me.cmd7.Location = New System.Drawing.Point(226, 58) - Me.cmd7.Name = "cmd7" - Me.cmd7.Size = New System.Drawing.Size(29, 30) - Me.cmd7.TabIndex = 87 - Me.cmd7.Text = "7" - Me.cmd7.UseVisualStyleBackColor = True + Me.cmdGreaterThan.Location = New System.Drawing.Point(126, 78) + Me.cmdGreaterThan.Name = "cmdGreaterThan" + Me.cmdGreaterThan.Size = New System.Drawing.Size(26, 31) + Me.cmdGreaterThan.TabIndex = 135 + Me.cmdGreaterThan.Text = ">" + Me.cmdGreaterThan.UseVisualStyleBackColor = True ' - 'cmd8 + 'cmdLessThan ' - Me.cmd8.Location = New System.Drawing.Point(258, 58) - Me.cmd8.Name = "cmd8" - Me.cmd8.Size = New System.Drawing.Size(28, 30) - Me.cmd8.TabIndex = 88 - Me.cmd8.Text = "8" - Me.cmd8.UseVisualStyleBackColor = True + Me.cmdLessThan.Location = New System.Drawing.Point(126, 45) + Me.cmdLessThan.Name = "cmdLessThan" + Me.cmdLessThan.Size = New System.Drawing.Size(26, 32) + Me.cmdLessThan.TabIndex = 134 + Me.cmdLessThan.Text = "<" + Me.cmdLessThan.UseVisualStyleBackColor = True ' - 'cmd9 + 'cmdPower ' - Me.cmd9.Location = New System.Drawing.Point(288, 58) - Me.cmd9.Name = "cmd9" - Me.cmd9.Size = New System.Drawing.Size(30, 30) - Me.cmd9.TabIndex = 89 - Me.cmd9.Text = "9" - Me.cmd9.UseVisualStyleBackColor = True + Me.cmdPower.Location = New System.Drawing.Point(126, 110) + Me.cmdPower.Name = "cmdPower" + Me.cmdPower.Size = New System.Drawing.Size(26, 30) + Me.cmdPower.TabIndex = 133 + Me.cmdPower.Text = "^" + Me.cmdPower.UseVisualStyleBackColor = True ' - 'cmdDot + 'cmdDelete ' - Me.cmdDot.Location = New System.Drawing.Point(349, 58) - Me.cmdDot.Name = "cmdDot" - Me.cmdDot.Size = New System.Drawing.Size(26, 30) - Me.cmdDot.TabIndex = 90 - Me.cmdDot.Text = "." - Me.cmdDot.UseVisualStyleBackColor = True + Me.cmdDelete.Location = New System.Drawing.Point(3, 110) + Me.cmdDelete.Name = "cmdDelete" + Me.cmdDelete.Size = New System.Drawing.Size(60, 30) + Me.cmdDelete.TabIndex = 132 + Me.cmdDelete.Tag = "Del" + Me.cmdDelete.Text = "Del" + Me.cmdDelete.UseVisualStyleBackColor = True ' 'cmdDivide ' - Me.cmdDivide.Location = New System.Drawing.Point(320, 58) + Me.cmdDivide.Location = New System.Drawing.Point(97, 13) Me.cmdDivide.Name = "cmdDivide" Me.cmdDivide.Size = New System.Drawing.Size(27, 30) - Me.cmdDivide.TabIndex = 95 + Me.cmdDivide.TabIndex = 131 Me.cmdDivide.Text = "/" Me.cmdDivide.UseVisualStyleBackColor = True ' 'cmdPlus ' - Me.cmdPlus.Location = New System.Drawing.Point(320, 155) + Me.cmdPlus.Location = New System.Drawing.Point(97, 110) Me.cmdPlus.Name = "cmdPlus" Me.cmdPlus.Size = New System.Drawing.Size(27, 30) - Me.cmdPlus.TabIndex = 94 + Me.cmdPlus.TabIndex = 130 Me.cmdPlus.Text = "+" Me.cmdPlus.UseVisualStyleBackColor = True ' 'cmdMinus ' - Me.cmdMinus.Location = New System.Drawing.Point(320, 123) + Me.cmdMinus.Location = New System.Drawing.Point(97, 78) Me.cmdMinus.Name = "cmdMinus" Me.cmdMinus.Size = New System.Drawing.Size(27, 31) - Me.cmdMinus.TabIndex = 93 + Me.cmdMinus.TabIndex = 129 Me.cmdMinus.Text = "-" Me.cmdMinus.UseVisualStyleBackColor = True ' 'cmdMultiply ' - Me.cmdMultiply.Location = New System.Drawing.Point(320, 90) + Me.cmdMultiply.Location = New System.Drawing.Point(97, 45) Me.cmdMultiply.Name = "cmdMultiply" Me.cmdMultiply.Size = New System.Drawing.Size(27, 32) - Me.cmdMultiply.TabIndex = 92 + Me.cmdMultiply.TabIndex = 128 Me.cmdMultiply.Text = "*" Me.cmdMultiply.UseVisualStyleBackColor = True ' - 'cmdPower + 'cmdDot ' - Me.cmdPower.Location = New System.Drawing.Point(349, 155) - Me.cmdPower.Name = "cmdPower" - Me.cmdPower.Size = New System.Drawing.Size(26, 30) - Me.cmdPower.TabIndex = 98 - Me.cmdPower.Text = "^" - Me.cmdPower.UseVisualStyleBackColor = True + Me.cmdDot.Location = New System.Drawing.Point(126, 13) + Me.cmdDot.Name = "cmdDot" + Me.cmdDot.Size = New System.Drawing.Size(26, 30) + Me.cmdDot.TabIndex = 127 + Me.cmdDot.Text = "." + Me.cmdDot.UseVisualStyleBackColor = True ' - 'cmdDelete + 'cmd9 ' - Me.cmdDelete.Location = New System.Drawing.Point(288, 155) - Me.cmdDelete.Name = "cmdDelete" - Me.cmdDelete.Size = New System.Drawing.Size(30, 30) - Me.cmdDelete.TabIndex = 97 - Me.cmdDelete.Tag = "Del" - Me.cmdDelete.Text = "Del" - Me.cmdDelete.UseVisualStyleBackColor = True + Me.cmd9.Location = New System.Drawing.Point(65, 13) + Me.cmd9.Name = "cmd9" + Me.cmd9.Size = New System.Drawing.Size(30, 30) + Me.cmd9.TabIndex = 126 + Me.cmd9.Text = "9" + Me.cmd9.UseVisualStyleBackColor = True ' - 'cmdBackSpace + 'cmd8 ' - Me.cmdBackSpace.Location = New System.Drawing.Point(349, 90) - Me.cmdBackSpace.Name = "cmdBackSpace" - Me.cmdBackSpace.Size = New System.Drawing.Size(26, 32) - Me.cmdBackSpace.TabIndex = 102 - Me.cmdBackSpace.Text = "<" - Me.cmdBackSpace.UseVisualStyleBackColor = True + Me.cmd8.Location = New System.Drawing.Point(35, 13) + Me.cmd8.Name = "cmd8" + Me.cmd8.Size = New System.Drawing.Size(28, 30) + Me.cmd8.TabIndex = 125 + Me.cmd8.Text = "8" + Me.cmd8.UseVisualStyleBackColor = True ' - 'lblExpression + 'cmd7 ' - Me.lblExpression.AutoSize = True - Me.lblExpression.Location = New System.Drawing.Point(12, 17) - Me.lblExpression.Name = "lblExpression" - Me.lblExpression.Size = New System.Drawing.Size(58, 13) - Me.lblExpression.TabIndex = 107 - Me.lblExpression.Tag = "Expression" - Me.lblExpression.Text = "Expression" + Me.cmd7.Location = New System.Drawing.Point(3, 13) + Me.cmd7.Name = "cmd7" + Me.cmd7.Size = New System.Drawing.Size(29, 30) + Me.cmd7.TabIndex = 124 + Me.cmd7.Text = "7" + Me.cmd7.UseVisualStyleBackColor = True ' - 'cmdTry + 'cmd6 ' - Me.cmdTry.Location = New System.Drawing.Point(9, 228) - Me.cmdTry.Name = "cmdTry" - Me.cmdTry.Size = New System.Drawing.Size(75, 23) - Me.cmdTry.TabIndex = 110 - Me.cmdTry.Text = "Try" - Me.cmdTry.UseVisualStyleBackColor = True + Me.cmd6.Location = New System.Drawing.Point(65, 45) + Me.cmd6.Name = "cmd6" + Me.cmd6.Size = New System.Drawing.Size(30, 32) + Me.cmd6.TabIndex = 123 + Me.cmd6.Text = "6" + Me.cmd6.UseVisualStyleBackColor = True ' - 'chkSaveResultInto + 'cmd5 ' - Me.chkSaveResultInto.AutoSize = True - Me.chkSaveResultInto.Location = New System.Drawing.Point(9, 260) - Me.chkSaveResultInto.Name = "chkSaveResultInto" - Me.chkSaveResultInto.Size = New System.Drawing.Size(104, 17) - Me.chkSaveResultInto.TabIndex = 113 - Me.chkSaveResultInto.Text = "Save Result into" - Me.chkSaveResultInto.UseVisualStyleBackColor = True + Me.cmd5.Location = New System.Drawing.Point(35, 45) + Me.cmd5.Name = "cmd5" + Me.cmd5.Size = New System.Drawing.Size(28, 32) + Me.cmd5.TabIndex = 122 + Me.cmd5.Text = "5" + Me.cmd5.UseVisualStyleBackColor = True ' - 'chkDefaultCalculationName + 'cmd4 ' - Me.chkDefaultCalculationName.AutoSize = True - Me.chkDefaultCalculationName.Location = New System.Drawing.Point(9, 283) - Me.chkDefaultCalculationName.Name = "chkDefaultCalculationName" - Me.chkDefaultCalculationName.Size = New System.Drawing.Size(144, 17) - Me.chkDefaultCalculationName.TabIndex = 115 - Me.chkDefaultCalculationName.Text = "Default Calculation name" - Me.chkDefaultCalculationName.UseVisualStyleBackColor = True + Me.cmd4.Location = New System.Drawing.Point(3, 45) + Me.cmd4.Name = "cmd4" + Me.cmd4.Size = New System.Drawing.Size(29, 32) + Me.cmd4.TabIndex = 121 + Me.cmd4.Text = "4" + Me.cmd4.UseVisualStyleBackColor = True ' - 'cmdGreaterThan + 'cmd3 ' - Me.cmdGreaterThan.Location = New System.Drawing.Point(349, 123) - Me.cmdGreaterThan.Name = "cmdGreaterThan" - Me.cmdGreaterThan.Size = New System.Drawing.Size(26, 31) - Me.cmdGreaterThan.TabIndex = 116 - Me.cmdGreaterThan.Text = ">" - Me.cmdGreaterThan.UseVisualStyleBackColor = True + Me.cmd3.Location = New System.Drawing.Point(65, 78) + Me.cmd3.Name = "cmd3" + Me.cmd3.Size = New System.Drawing.Size(30, 31) + Me.cmd3.TabIndex = 120 + Me.cmd3.Text = "3" + Me.cmd3.UseVisualStyleBackColor = True + ' + 'cmd2 + ' + Me.cmd2.Location = New System.Drawing.Point(35, 78) + Me.cmd2.Name = "cmd2" + Me.cmd2.Size = New System.Drawing.Size(28, 31) + Me.cmd2.TabIndex = 119 + Me.cmd2.Text = "2" + Me.cmd2.UseVisualStyleBackColor = True + ' + 'cmd0 + ' + Me.cmd0.Location = New System.Drawing.Point(65, 110) + Me.cmd0.Name = "cmd0" + Me.cmd0.Size = New System.Drawing.Size(30, 30) + Me.cmd0.TabIndex = 118 + Me.cmd0.Text = "0" + Me.cmd0.UseVisualStyleBackColor = True + ' + 'cmd1 + ' + Me.cmd1.Location = New System.Drawing.Point(3, 78) + Me.cmd1.Name = "cmd1" + Me.cmd1.Size = New System.Drawing.Size(29, 31) + Me.cmd1.TabIndex = 117 + Me.cmd1.Text = "1" + Me.cmd1.UseVisualStyleBackColor = True + ' + 'grpLogical + ' + Me.grpLogical.Controls.Add(Me.cmdGreaterOrEqualsTo) + Me.grpLogical.Controls.Add(Me.cmdAnd) + Me.grpLogical.Controls.Add(Me.cmdTrue) + Me.grpLogical.Controls.Add(Me.cmdIntegerDivision) + Me.grpLogical.Controls.Add(Me.cmdModulas) + Me.grpLogical.Controls.Add(Me.cmdGreater) + Me.grpLogical.Controls.Add(Me.cmdLesserOrEqualsTo) + Me.grpLogical.Controls.Add(Me.cmdLesser) + Me.grpLogical.Controls.Add(Me.cmdOr) + Me.grpLogical.Controls.Add(Me.cmdNot) + Me.grpLogical.Controls.Add(Me.cmdNotEqualsTo) + Me.grpLogical.Controls.Add(Me.cmdEquivalent) + Me.grpLogical.Location = New System.Drawing.Point(3, 0) + Me.grpLogical.Name = "grpLogical" + Me.grpLogical.Size = New System.Drawing.Size(116, 158) + Me.grpLogical.TabIndex = 121 + Me.grpLogical.TabStop = False + Me.grpLogical.Text = "Logical" + ' + 'grpMaths + ' + Me.grpMaths.Controls.Add(Me.cmdSign) + Me.grpMaths.Controls.Add(Me.grpLogical) + Me.grpMaths.Controls.Add(Me.cmdRound) + Me.grpMaths.Controls.Add(Me.cmdSiginf) + Me.grpMaths.Controls.Add(Me.cmdAbs) + Me.grpMaths.Controls.Add(Me.cmdExp) + Me.grpMaths.Controls.Add(Me.cmdDeg) + Me.grpMaths.Controls.Add(Me.cmdTrunc) + Me.grpMaths.Controls.Add(Me.cmdAtan) + Me.grpMaths.Controls.Add(Me.cmdTan) + Me.grpMaths.Controls.Add(Me.cmdLogTen) + Me.grpMaths.Controls.Add(Me.cmdRad) + Me.grpMaths.Controls.Add(Me.cmdFloor) + Me.grpMaths.Controls.Add(Me.cmdAsin) + Me.grpMaths.Controls.Add(Me.cmdSin) + Me.grpMaths.Controls.Add(Me.cmdLog) + Me.grpMaths.Controls.Add(Me.cmdPi) + Me.grpMaths.Controls.Add(Me.cmdCeiling) + Me.grpMaths.Controls.Add(Me.cmdAcos) + Me.grpMaths.Controls.Add(Me.cmdCos) + Me.grpMaths.Controls.Add(Me.cmdSqrt) + Me.grpMaths.Location = New System.Drawing.Point(375, 69) + Me.grpMaths.Name = "grpMaths" + Me.grpMaths.Size = New System.Drawing.Size(208, 148) + Me.grpMaths.TabIndex = 148 + Me.grpMaths.TabStop = False + Me.grpMaths.Text = "Maths" + ' + 'cmdSign + ' + Me.cmdSign.Location = New System.Drawing.Point(166, 112) + Me.cmdSign.Name = "cmdSign" + Me.cmdSign.Size = New System.Drawing.Size(38, 30) + Me.cmdSign.TabIndex = 147 + Me.cmdSign.Text = "sign" + Me.cmdSign.UseVisualStyleBackColor = True + ' + 'cmdRound + ' + Me.cmdRound.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmdRound.Location = New System.Drawing.Point(125, 112) + Me.cmdRound.Name = "cmdRound" + Me.cmdRound.Size = New System.Drawing.Size(38, 30) + Me.cmdRound.TabIndex = 146 + Me.cmdRound.Text = "round" + Me.cmdRound.UseVisualStyleBackColor = True + ' + 'cmdSiginf + ' + Me.cmdSiginf.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmdSiginf.Location = New System.Drawing.Point(84, 112) + Me.cmdSiginf.Name = "cmdSiginf" + Me.cmdSiginf.Size = New System.Drawing.Size(38, 30) + Me.cmdSiginf.TabIndex = 145 + Me.cmdSiginf.Text = "siginf" + Me.cmdSiginf.UseVisualStyleBackColor = True + ' + 'cmdAbs + ' + Me.cmdAbs.Location = New System.Drawing.Point(43, 112) + Me.cmdAbs.Name = "cmdAbs" + Me.cmdAbs.Size = New System.Drawing.Size(38, 30) + Me.cmdAbs.TabIndex = 144 + Me.cmdAbs.Text = "abs" + Me.cmdAbs.UseVisualStyleBackColor = True + ' + 'cmdExp + ' + Me.cmdExp.Location = New System.Drawing.Point(3, 112) + Me.cmdExp.Name = "cmdExp" + Me.cmdExp.Size = New System.Drawing.Size(38, 30) + Me.cmdExp.TabIndex = 143 + Me.cmdExp.Text = "exp" + Me.cmdExp.UseVisualStyleBackColor = True + ' + 'cmdDeg + ' + Me.cmdDeg.Location = New System.Drawing.Point(166, 80) + Me.cmdDeg.Name = "cmdDeg" + Me.cmdDeg.Size = New System.Drawing.Size(38, 30) + Me.cmdDeg.TabIndex = 142 + Me.cmdDeg.Text = "deg" + Me.cmdDeg.UseVisualStyleBackColor = True + ' + 'cmdTrunc + ' + Me.cmdTrunc.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmdTrunc.Location = New System.Drawing.Point(125, 80) + Me.cmdTrunc.Name = "cmdTrunc" + Me.cmdTrunc.Size = New System.Drawing.Size(38, 30) + Me.cmdTrunc.TabIndex = 141 + Me.cmdTrunc.Text = "trunc" + Me.cmdTrunc.UseVisualStyleBackColor = True + ' + 'cmdAtan + ' + Me.cmdAtan.Location = New System.Drawing.Point(84, 80) + Me.cmdAtan.Name = "cmdAtan" + Me.cmdAtan.Size = New System.Drawing.Size(38, 30) + Me.cmdAtan.TabIndex = 140 + Me.cmdAtan.Text = "atan" + Me.cmdAtan.UseVisualStyleBackColor = True + ' + 'cmdTan + ' + Me.cmdTan.Location = New System.Drawing.Point(43, 80) + Me.cmdTan.Name = "cmdTan" + Me.cmdTan.Size = New System.Drawing.Size(38, 30) + Me.cmdTan.TabIndex = 139 + Me.cmdTan.Text = "tan" + Me.cmdTan.UseVisualStyleBackColor = True + ' + 'cmdLogTen + ' + Me.cmdLogTen.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmdLogTen.Location = New System.Drawing.Point(3, 80) + Me.cmdLogTen.Name = "cmdLogTen" + Me.cmdLogTen.Size = New System.Drawing.Size(38, 30) + Me.cmdLogTen.TabIndex = 138 + Me.cmdLogTen.Text = "log10" + Me.cmdLogTen.UseVisualStyleBackColor = True + ' + 'cmdRad + ' + Me.cmdRad.Location = New System.Drawing.Point(166, 47) + Me.cmdRad.Name = "cmdRad" + Me.cmdRad.Size = New System.Drawing.Size(38, 30) + Me.cmdRad.TabIndex = 137 + Me.cmdRad.Text = "rad" + Me.cmdRad.UseVisualStyleBackColor = True + ' + 'cmdFloor + ' + Me.cmdFloor.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmdFloor.Location = New System.Drawing.Point(125, 47) + Me.cmdFloor.Name = "cmdFloor" + Me.cmdFloor.Size = New System.Drawing.Size(38, 30) + Me.cmdFloor.TabIndex = 136 + Me.cmdFloor.Text = "floor" + Me.cmdFloor.UseVisualStyleBackColor = True + ' + 'cmdAsin + ' + Me.cmdAsin.Location = New System.Drawing.Point(84, 47) + Me.cmdAsin.Name = "cmdAsin" + Me.cmdAsin.Size = New System.Drawing.Size(38, 30) + Me.cmdAsin.TabIndex = 135 + Me.cmdAsin.Text = "asin" + Me.cmdAsin.UseVisualStyleBackColor = True + ' + 'cmdSin + ' + Me.cmdSin.Location = New System.Drawing.Point(43, 47) + Me.cmdSin.Name = "cmdSin" + Me.cmdSin.Size = New System.Drawing.Size(38, 30) + Me.cmdSin.TabIndex = 134 + Me.cmdSin.Text = "sin" + Me.cmdSin.UseVisualStyleBackColor = True + ' + 'cmdLog + ' + Me.cmdLog.Location = New System.Drawing.Point(3, 47) + Me.cmdLog.Name = "cmdLog" + Me.cmdLog.Size = New System.Drawing.Size(38, 30) + Me.cmdLog.TabIndex = 133 + Me.cmdLog.Text = "log" + Me.cmdLog.UseVisualStyleBackColor = True + ' + 'cmdPi + ' + Me.cmdPi.Location = New System.Drawing.Point(166, 15) + Me.cmdPi.Name = "cmdPi" + Me.cmdPi.Size = New System.Drawing.Size(38, 30) + Me.cmdPi.TabIndex = 132 + Me.cmdPi.Text = "pi" + Me.cmdPi.UseVisualStyleBackColor = True + ' + 'cmdCeiling + ' + Me.cmdCeiling.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmdCeiling.Location = New System.Drawing.Point(125, 15) + Me.cmdCeiling.Name = "cmdCeiling" + Me.cmdCeiling.Size = New System.Drawing.Size(38, 30) + Me.cmdCeiling.TabIndex = 131 + Me.cmdCeiling.Text = "ceiling" + Me.cmdCeiling.UseVisualStyleBackColor = True + ' + 'cmdAcos + ' + Me.cmdAcos.Location = New System.Drawing.Point(84, 15) + Me.cmdAcos.Name = "cmdAcos" + Me.cmdAcos.Size = New System.Drawing.Size(38, 30) + Me.cmdAcos.TabIndex = 130 + Me.cmdAcos.Text = "acos" + Me.cmdAcos.UseVisualStyleBackColor = True + ' + 'cmdCos + ' + Me.cmdCos.Location = New System.Drawing.Point(43, 15) + Me.cmdCos.Name = "cmdCos" + Me.cmdCos.Size = New System.Drawing.Size(38, 30) + Me.cmdCos.TabIndex = 129 + Me.cmdCos.Text = "cos" + Me.cmdCos.UseVisualStyleBackColor = True + ' + 'cmdSqrt + ' + Me.cmdSqrt.Location = New System.Drawing.Point(3, 15) + Me.cmdSqrt.Name = "cmdSqrt" + Me.cmdSqrt.Size = New System.Drawing.Size(38, 30) + Me.cmdSqrt.TabIndex = 128 + Me.cmdSqrt.Text = "sqrt" + Me.cmdSqrt.UseVisualStyleBackColor = True + ' + 'cmdGreaterOrEqualsTo + ' + Me.cmdGreaterOrEqualsTo.Location = New System.Drawing.Point(34, 110) + Me.cmdGreaterOrEqualsTo.Name = "cmdGreaterOrEqualsTo" + Me.cmdGreaterOrEqualsTo.Size = New System.Drawing.Size(30, 30) + Me.cmdGreaterOrEqualsTo.TabIndex = 138 + Me.cmdGreaterOrEqualsTo.Text = ">=" + Me.cmdGreaterOrEqualsTo.UseVisualStyleBackColor = True + ' + 'cmdAnd + ' + Me.cmdAnd.Location = New System.Drawing.Point(66, 110) + Me.cmdAnd.Name = "cmdAnd" + Me.cmdAnd.Size = New System.Drawing.Size(38, 30) + Me.cmdAnd.TabIndex = 137 + Me.cmdAnd.Tag = "And" + Me.cmdAnd.Text = "And" + Me.cmdAnd.UseVisualStyleBackColor = True + ' + 'cmdTrue + ' + Me.cmdTrue.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmdTrue.Location = New System.Drawing.Point(66, 78) + Me.cmdTrue.Name = "cmdTrue" + Me.cmdTrue.Size = New System.Drawing.Size(38, 31) + Me.cmdTrue.TabIndex = 136 + Me.cmdTrue.Text = "isTRUE()" + Me.cmdTrue.UseVisualStyleBackColor = True + ' + 'cmdIntegerDivision + ' + Me.cmdIntegerDivision.Location = New System.Drawing.Point(66, 45) + Me.cmdIntegerDivision.Name = "cmdIntegerDivision" + Me.cmdIntegerDivision.Size = New System.Drawing.Size(38, 32) + Me.cmdIntegerDivision.TabIndex = 135 + Me.cmdIntegerDivision.Text = "%/%" + Me.cmdIntegerDivision.UseVisualStyleBackColor = True + ' + 'cmdModulas + ' + Me.cmdModulas.Location = New System.Drawing.Point(66, 13) + Me.cmdModulas.Name = "cmdModulas" + Me.cmdModulas.Size = New System.Drawing.Size(38, 30) + Me.cmdModulas.TabIndex = 134 + Me.cmdModulas.Text = "%%" + Me.cmdModulas.UseVisualStyleBackColor = True + ' + 'cmdGreater + ' + Me.cmdGreater.Location = New System.Drawing.Point(34, 78) + Me.cmdGreater.Name = "cmdGreater" + Me.cmdGreater.Size = New System.Drawing.Size(30, 31) + Me.cmdGreater.TabIndex = 133 + Me.cmdGreater.Text = ">" + Me.cmdGreater.UseVisualStyleBackColor = True + ' + 'cmdLesserOrEqualsTo + ' + Me.cmdLesserOrEqualsTo.Location = New System.Drawing.Point(34, 45) + Me.cmdLesserOrEqualsTo.Name = "cmdLesserOrEqualsTo" + Me.cmdLesserOrEqualsTo.Size = New System.Drawing.Size(30, 32) + Me.cmdLesserOrEqualsTo.TabIndex = 132 + Me.cmdLesserOrEqualsTo.Text = "<=" + Me.cmdLesserOrEqualsTo.UseVisualStyleBackColor = True + ' + 'cmdLesser + ' + Me.cmdLesser.Location = New System.Drawing.Point(34, 13) + Me.cmdLesser.Name = "cmdLesser" + Me.cmdLesser.Size = New System.Drawing.Size(30, 30) + Me.cmdLesser.TabIndex = 131 + Me.cmdLesser.Text = "<" + Me.cmdLesser.UseVisualStyleBackColor = True + ' + 'cmdOr + ' + Me.cmdOr.Location = New System.Drawing.Point(2, 110) + Me.cmdOr.Name = "cmdOr" + Me.cmdOr.Size = New System.Drawing.Size(30, 30) + Me.cmdOr.TabIndex = 130 + Me.cmdOr.Text = "|" + Me.cmdOr.UseVisualStyleBackColor = True + ' + 'cmdNot + ' + Me.cmdNot.Location = New System.Drawing.Point(2, 78) + Me.cmdNot.Name = "cmdNot" + Me.cmdNot.Size = New System.Drawing.Size(30, 31) + Me.cmdNot.TabIndex = 129 + Me.cmdNot.Text = "!" + Me.cmdNot.UseVisualStyleBackColor = True + ' + 'cmdNotEqualsTo + ' + Me.cmdNotEqualsTo.Location = New System.Drawing.Point(2, 45) + Me.cmdNotEqualsTo.Name = "cmdNotEqualsTo" + Me.cmdNotEqualsTo.Size = New System.Drawing.Size(30, 32) + Me.cmdNotEqualsTo.TabIndex = 128 + Me.cmdNotEqualsTo.Text = "!=" + Me.cmdNotEqualsTo.UseVisualStyleBackColor = True + ' + 'cmdEquivalent + ' + Me.cmdEquivalent.Location = New System.Drawing.Point(2, 13) + Me.cmdEquivalent.Name = "cmdEquivalent" + Me.cmdEquivalent.Size = New System.Drawing.Size(30, 30) + Me.cmdEquivalent.TabIndex = 127 + Me.cmdEquivalent.Text = "==" + Me.cmdEquivalent.UseVisualStyleBackColor = True + ' + 'ucrInputCalOptions + ' + Me.ucrInputCalOptions.IsReadOnly = False + Me.ucrInputCalOptions.Location = New System.Drawing.Point(222, 42) + Me.ucrInputCalOptions.Name = "ucrInputCalOptions" + Me.ucrInputCalOptions.Size = New System.Drawing.Size(137, 21) + Me.ucrInputCalOptions.TabIndex = 120 + ' + 'ucrReceiverForCalculation + ' + Me.ucrReceiverForCalculation.Location = New System.Drawing.Point(90, 16) + Me.ucrReceiverForCalculation.Name = "ucrReceiverForCalculation" + Me.ucrReceiverForCalculation.Selector = Nothing + Me.ucrReceiverForCalculation.Size = New System.Drawing.Size(284, 20) + Me.ucrReceiverForCalculation.TabIndex = 118 ' 'ucrSaveResultInto ' @@ -295,46 +725,22 @@ Partial Class dlgCalculator Me.ucrBase.Size = New System.Drawing.Size(404, 50) Me.ucrBase.TabIndex = 0 ' - 'ucrReceiverForCalculation - ' - Me.ucrReceiverForCalculation.Location = New System.Drawing.Point(90, 16) - Me.ucrReceiverForCalculation.Name = "ucrReceiverForCalculation" - Me.ucrReceiverForCalculation.Selector = Nothing - Me.ucrReceiverForCalculation.Size = New System.Drawing.Size(284, 20) - Me.ucrReceiverForCalculation.TabIndex = 118 - ' 'dlgCalculator ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(505, 363) + Me.ClientSize = New System.Drawing.Size(585, 363) + Me.Controls.Add(Me.grpMaths) + Me.Controls.Add(Me.ucrInputCalOptions) + Me.Controls.Add(Me.grpBasic) Me.Controls.Add(Me.ucrReceiverForCalculation) Me.Controls.Add(Me.ucrSaveResultInto) - Me.Controls.Add(Me.cmdGreaterThan) Me.Controls.Add(Me.chkDefaultCalculationName) Me.Controls.Add(Me.chkSaveResultInto) Me.Controls.Add(Me.ucrSpaceToMangeResult) Me.Controls.Add(Me.cmdTry) Me.Controls.Add(Me.lblExpression) Me.Controls.Add(Me.ucrSelectorForCalculations) - Me.Controls.Add(Me.cmdBackSpace) - Me.Controls.Add(Me.cmdPower) - Me.Controls.Add(Me.cmdDelete) - Me.Controls.Add(Me.cmdDivide) - Me.Controls.Add(Me.cmdPlus) - Me.Controls.Add(Me.cmdMinus) - Me.Controls.Add(Me.cmdMultiply) - Me.Controls.Add(Me.cmdDot) - Me.Controls.Add(Me.cmd9) - Me.Controls.Add(Me.cmd8) - Me.Controls.Add(Me.cmd7) - Me.Controls.Add(Me.cmd6) - Me.Controls.Add(Me.cmd5) - Me.Controls.Add(Me.cmd4) - Me.Controls.Add(Me.cmd3) - Me.Controls.Add(Me.cmd2) - Me.Controls.Add(Me.cmd0) - Me.Controls.Add(Me.cmd1) Me.Controls.Add(Me.ucrBase) Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow Me.Name = "dlgCalculator" @@ -342,37 +748,76 @@ Partial Class dlgCalculator Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen Me.Tag = "Calculations" Me.Text = "Calculations" + Me.grpBasic.ResumeLayout(False) + Me.grpLogical.ResumeLayout(False) + Me.grpMaths.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() End Sub Friend WithEvents ucrBase As ucrButtons - Friend WithEvents cmd1 As Button - Friend WithEvents cmd0 As Button - Friend WithEvents cmd2 As Button - Friend WithEvents cmd3 As Button - Friend WithEvents cmd4 As Button - Friend WithEvents cmd5 As Button - Friend WithEvents cmd6 As Button - Friend WithEvents cmd7 As Button - Friend WithEvents cmd8 As Button - Friend WithEvents cmd9 As Button - Friend WithEvents cmdDot As Button - Friend WithEvents cmdDivide As Button - Friend WithEvents cmdPlus As Button - Friend WithEvents cmdMinus As Button - Friend WithEvents cmdMultiply As Button - Friend WithEvents cmdPower As Button - Friend WithEvents cmdDelete As Button - Friend WithEvents cmdBackSpace As Button Friend WithEvents ucrSelectorForCalculations As ucrSelectorByDataFrameAddRemove Friend WithEvents lblExpression As Label Friend WithEvents cmdTry As Button Friend WithEvents ucrSpaceToMangeResult As ucrInputTextBox Friend WithEvents chkSaveResultInto As CheckBox Friend WithEvents chkDefaultCalculationName As CheckBox - Friend WithEvents cmdGreaterThan As Button Friend WithEvents ucrSaveResultInto As ucrInputComboBox Friend WithEvents ucrReceiverForCalculation As ucrReceiverExpression + Friend WithEvents grpBasic As GroupBox + Friend WithEvents cmdGreaterThan As Button + Friend WithEvents cmdLessThan As Button + Friend WithEvents cmdPower As Button + Friend WithEvents cmdDelete As Button + Friend WithEvents cmdDivide As Button + Friend WithEvents cmdPlus As Button + Friend WithEvents cmdMinus As Button + Friend WithEvents cmdMultiply As Button + Friend WithEvents cmdDot As Button + Friend WithEvents cmd9 As Button + Friend WithEvents cmd8 As Button + Friend WithEvents cmd7 As Button + Friend WithEvents cmd6 As Button + Friend WithEvents cmd5 As Button + Friend WithEvents cmd4 As Button + Friend WithEvents cmd3 As Button + Friend WithEvents cmd2 As Button + Friend WithEvents cmd0 As Button + Friend WithEvents cmd1 As Button + Friend WithEvents ucrInputCalOptions As ucrInputComboBox + Friend WithEvents grpLogical As GroupBox + Friend WithEvents cmdGreaterOrEqualsTo As Button + Friend WithEvents cmdAnd As Button + Friend WithEvents cmdTrue As Button + Friend WithEvents cmdIntegerDivision As Button + Friend WithEvents cmdModulas As Button + Friend WithEvents cmdGreater As Button + Friend WithEvents cmdLesserOrEqualsTo As Button + Friend WithEvents cmdLesser As Button + Friend WithEvents cmdOr As Button + Friend WithEvents cmdNot As Button + Friend WithEvents cmdNotEqualsTo As Button + Friend WithEvents cmdEquivalent As Button + Friend WithEvents grpMaths As GroupBox + Friend WithEvents cmdSign As Button + Friend WithEvents cmdRound As Button + Friend WithEvents cmdSiginf As Button + Friend WithEvents cmdAbs As Button + Friend WithEvents cmdExp As Button + Friend WithEvents cmdDeg As Button + Friend WithEvents cmdTrunc As Button + Friend WithEvents cmdAtan As Button + Friend WithEvents cmdTan As Button + Friend WithEvents cmdLogTen As Button + Friend WithEvents cmdRad As Button + Friend WithEvents cmdFloor As Button + Friend WithEvents cmdAsin As Button + Friend WithEvents cmdSin As Button + Friend WithEvents cmdLog As Button + Friend WithEvents cmdPi As Button + Friend WithEvents cmdCeiling As Button + Friend WithEvents cmdAcos As Button + Friend WithEvents cmdCos As Button + Friend WithEvents cmdSqrt As Button End Class diff --git a/instat/dlgCalculator.vb b/instat/dlgCalculator.vb index c6692378581..cab30b94ee4 100644 --- a/instat/dlgCalculator.vb +++ b/instat/dlgCalculator.vb @@ -1,15 +1,57 @@ -Imports RDotNet + +' 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 +Imports RDotNet Public Class dlgCalculator Dim dataset As DataFrame Dim clsAttach As New RFunction - Dim clsDetach As New RFunction + Dim clsDetach As New RFunction + Public bFirstLoad As Boolean = True + Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + ucrBase.iHelpTopicID = 14 + If bFirstLoad Then + InitialiseDialog() + SetDefaults() + bFirstLoad = False + Else + ReopenDialog() + End If + TestOKEnabled() + End Sub - Private Sub dlgCalculator_Load(sender As Object, e As EventArgs) Handles MyBase.Load - ucrBase.OKEnabled(False) - cmdBackSpace.Enabled = True - 'txtCalcLine.Select() - ucrBase.iHelpTopicID = 14 - InitialiseDialog() + Private Sub TestOKEnabled() + If Not ucrReceiverForCalculation.IsEmpty Then + ucrBase.OKEnabled(True) + Else + ucrBase.OKEnabled(False) + End If + End Sub + + Private Sub SetDefaults() + ucrSaveResultInto.SetPrefix("Cal") + ucrSaveResultInto.Reset() + ucrInputCalOptions.Reset() + Me.Size = New System.Drawing.Size(436, 402) + ucrInputCalOptions.cboInput.Text = "Basic" + End Sub + + Private Sub ReopenDialog() + End Sub Private Sub InitialiseDialog() @@ -19,7 +61,18 @@ Public Class dlgCalculator clsDetach.SetRCommand("detach") clsDetach.AddParameter("unload", "TRUE") ucrBase.clsRsyntax.SetCommandString("") - End Sub + ucrSaveResultInto.SetItemsTypeAsColumns() + ucrSaveResultInto.SetDefaultTypeAsColumn() + ucrSaveResultInto.SetDataFrameSelector(ucrSelectorForCalculations.ucrAvailableDataFrames) + ucrSelectorForCalculations.Reset() + ucrInputCalOptions.cboInput.Items.Add("Basic") + ucrInputCalOptions.cboInput.Items.Add("Maths") + ucrInputCalOptions.cboInput.Items.Add("Logical") + End Sub + + 'Private Sub ucrSaveResultIntoInto_NameChanged() Handles ucrSaveResultInto.NameChanged + ' ucrBase.clsRsyntax.SetAssignTo(strAssignToName:=ucrSaveResultInto.GetText, strTempDataframe:=ucrSelectorForCalculations.ucrAvailableDataFrames.cboAvailableDataFrames.Text, strTempColumn:=ucrSaveResultInto.GetText, bAssignToIsPrefix:=True) + 'End Sub Private Sub AddText(strVar As String, Optional intStepsBack As Integer = 0, Optional bolInsertSelected As Boolean = False) Dim intCurrCursorPosition As Integer @@ -37,69 +90,79 @@ Public Class dlgCalculator 'txtCalcLine.Select() End Sub - Private Sub cmd0_Click(sender As Object, e As EventArgs) Handles cmd0.Click + Private Sub cmd0_Click(sender As Object, e As EventArgs) Handles cmd0.Click AddText("0") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("0") End Sub - Private Sub cmd1_Click(sender As Object, e As EventArgs) Handles cmd1.Click + Private Sub cmd1_Click(sender As Object, e As EventArgs) Handles cmd1.Click AddText("1") ucrReceiverForCalculation.AddToReceiverAtCursorPosition("1") End Sub - Private Sub cmd2_Click(sender As Object, e As EventArgs) Handles cmd2.Click + Private Sub cmd2_Click(sender As Object, e As EventArgs) Handles cmd2.Click AddText("2") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("2") End Sub - Private Sub cmd3_Click(sender As Object, e As EventArgs) Handles cmd3.Click + Private Sub cmd3_Click(sender As Object, e As EventArgs) Handles cmd3.Click AddText("3") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("3") End Sub - Private Sub cmd4_Click(sender As Object, e As EventArgs) Handles cmd4.Click + Private Sub cmd4_Click(sender As Object, e As EventArgs) Handles cmd4.Click AddText("4") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("4") End Sub - Private Sub cmd5_Click(sender As Object, e As EventArgs) Handles cmd5.Click + Private Sub cmd5_Click(sender As Object, e As EventArgs) Handles cmd5.Click AddText("5") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("5") End Sub - Private Sub cmd6_Click(sender As Object, e As EventArgs) Handles cmd6.Click + Private Sub cmd6_Click(sender As Object, e As EventArgs) Handles cmd6.Click AddText("6") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("6") End Sub - Private Sub cmd7_Click(sender As Object, e As EventArgs) Handles cmd7.Click + Private Sub cmd7_Click(sender As Object, e As EventArgs) Handles cmd7.Click AddText("7") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("7") End Sub - Private Sub cmd8_Click(sender As Object, e As EventArgs) Handles cmd8.Click + Private Sub cmd8_Click(sender As Object, e As EventArgs) Handles cmd8.Click AddText("8") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("8") End Sub - Private Sub cmd9_Click(sender As Object, e As EventArgs) Handles cmd9.Click + Private Sub cmd9_Click(sender As Object, e As EventArgs) Handles cmd9.Click AddText("9") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("9") End Sub - Private Sub cmdDot_Click(sender As Object, e As EventArgs) Handles cmdDot.Click + Private Sub cmdDot_Click(sender As Object, e As EventArgs) Handles cmdDot.Click AddText(".") - End Sub - - Private Sub cmdPi_Click(sender As Object, e As EventArgs) - AddText("pi") - End Sub - - Private Sub cmdPlus_Click(sender As Object, e As EventArgs) Handles cmdPlus.Click + ucrReceiverForCalculation.AddToReceiverAtCursorPosition(".") + End Sub + + Private Sub cmdPlus_Click(sender As Object, e As EventArgs) Handles cmdPlus.Click AddText("+") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("+") End Sub - Private Sub cmdMinus_Click(sender As Object, e As EventArgs) Handles cmdMinus.Click + Private Sub cmdMinus_Click(sender As Object, e As EventArgs) Handles cmdMinus.Click AddText("-") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("-") End Sub - Private Sub cmdMultiply_Click(sender As Object, e As EventArgs) Handles cmdMultiply.Click + Private Sub cmdMultiply_Click(sender As Object, e As EventArgs) Handles cmdMultiply.Click AddText("*") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("*") End Sub - Private Sub cmdDivide_Click(sender As Object, e As EventArgs) Handles cmdDivide.Click + Private Sub cmdDivide_Click(sender As Object, e As EventArgs) Handles cmdDivide.Click AddText("/") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("/") End Sub Private Sub lstAvailableVariable_DoubleClick(sender As Object, e As EventArgs) @@ -108,49 +171,50 @@ Public Class dlgCalculator 'End If End Sub - Private Sub cmdPower_Click(sender As Object, e As EventArgs) Handles cmdPower.Click + Private Sub cmdPower_Click(sender As Object, e As EventArgs) Handles cmdPower.Click AddText("^") - End Sub - - 'Private Sub cmdOpenBracket_Click(sender As Object, e As EventArgs) Handles cmdDelete.Click - ' AddText("(") - 'End Sub - + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("^") + End Sub + + 'Private Sub cmdOpenBracket_Click(sender As Object, e As EventArgs) Handles cmdDelete.Click + ' AddText("(") + 'End Sub + 'Private Sub cmdCloseBracket_Click(sender As Object, e As EventArgs) - ' Dim intCursorPosition As Integer - - ' intCursorPosition = txtCalcLine.SelectionStart - ' txtCalcLine.Text = txtCalcLine.Text.Insert(txtCalcLine.SelectionStart, ")") - ' txtCalcLine.SelectionStart = intCursorPosition + 1 - ' txtCalcLine.Focus() - 'End Sub - - Private Sub cmdRowNumbers_Click(sender As Object, e As EventArgs) - AddText("(1:nrow(data))") - End Sub - - 'Private Sub ucrBase_clickOK(sender As Object, e As EventArgs) Handles ucrBase.ClickOk - ' Dim strScript As String - ' strScript = ("data[[" & Chr(34) & txtNewColumnName.Text & Chr(34) & "]]" & " <- " & txtCalcLine.Text).ToString - ' frmMain.clsRLink.RunScript(strScript) - ' 'dataset = frmMain.clsRLink.GetData("data") - ' 'frmEditor.UpdateSheet(dataset) - 'End Sub - - 'Private Sub cmdBackSpace_Click(sender As Object, e As EventArgs) Handles cmdBackSpace.Click - ' If txtCalcLine.Text.Length > 0 Then - ' txtCalcLine.Text = txtCalcLine.Text.Remove(txtCalcLine.Text.Length - 1) - ' End If - 'End Sub - + ' Dim intCursorPosition As Integer + + ' intCursorPosition = txtCalcLine.SelectionStart + ' txtCalcLine.Text = txtCalcLine.Text.Insert(txtCalcLine.SelectionStart, ")") + ' txtCalcLine.SelectionStart = intCursorPosition + 1 + ' txtCalcLine.Focus() + 'End Sub + + 'Private Sub cmdRowNumbers_Click(sender As Object, e As EventArgs) + ' AddText("(1:nrow(data))") + 'End Sub + + 'Private Sub ucrBase_clickOK(sender As Object, e As EventArgs) Handles ucrBase.ClickOk + ' Dim strScript As String + ' strScript = ("data[[" & Chr(34) & txtNewColumnName.Text & Chr(34) & "]]" & " <- " & txtCalcLine.Text).ToString + ' frmMain.clsRLink.RunScript(strScript) + ' 'dataset = frmMain.clsRLink.GetData("data") + ' 'frmEditor.UpdateSheet(dataset) + 'End Sub + + 'Private Sub cmdBackSpace_Click(sender As Object, e As EventArgs) Handles cmdBackSpace.Click + ' If txtCalcLine.Text.Length > 0 Then + ' txtCalcLine.Text = txtCalcLine.Text.Remove(txtCalcLine.Text.Length - 1) + ' End If + 'End Sub + 'Private Sub txtCalcLine_TextChanged(sender As Object, e As EventArgs) - ' If txtCalcLine.Text.Length = 0 Then - ' cmdBackSpace.Enabled = False - ' Else - ' cmdBackSpace.Enabled = True - ' End If - 'End Sub - + ' If txtCalcLine.Text.Length = 0 Then + ' cmdBackSpace.Enabled = False + ' Else + ' cmdBackSpace.Enabled = True + ' End If + 'End Sub + Private Sub cmdSqrt_Click(sender As Object, e As EventArgs) AddText("sqrt()", 1, True) End Sub @@ -187,4 +251,46 @@ Public Class dlgCalculator ucrBase.clsRsyntax.SetCommandString(ucrReceiverForCalculation.GetVariableNames(False)) ucrBase.OKEnabled(True) End Sub + + Private Sub cmdGreaterThan_Click(sender As Object, e As EventArgs) Handles cmdGreaterThan.Click + AddText(">") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition(">") + End Sub + + Private Sub cmdLessThan_Click(sender As Object, e As EventArgs) Handles cmdLessThan.Click + AddText("<") + ucrReceiverForCalculation.AddToReceiverAtCursorPosition("<") + End Sub + + Private Sub cmdDelete_Click(sender As Object, e As EventArgs) Handles cmdDelete.Click + + End Sub + + + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + TestOKEnabled() + End Sub + + Private Sub ucrInputCalOptions_NameChanged() Handles ucrInputCalOptions.NameChanged + Select Case ucrInputCalOptions.GetText + Case "Maths" + grpMaths.Visible = True + grpLogical.Visible = False + grpBasic.Visible = True + Me.Size = New System.Drawing.Size(601, 402) + Case "Logical" + grpLogical.Visible = True + grpMaths.Visible = False + grpBasic.Visible = True + Me.Size = New System.Drawing.Size(500, 402) + Case Else + Me.Size = New System.Drawing.Size(436, 402) + grpBasic.Visible = True + grpLogical.Visible = False + grpMaths.Visible = False + End Select + End Sub + + End Class \ No newline at end of file diff --git a/instat/dlgColourbyProperty.Designer.vb b/instat/dlgColourbyProperty.Designer.vb new file mode 100644 index 00000000000..a4756f32cfa --- /dev/null +++ b/instat/dlgColourbyProperty.Designer.vb @@ -0,0 +1,51 @@ + _ +Partial Class dlgColourbyProperty + 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, 197) + Me.ucrBase.Name = "ucrBase" + Me.ucrBase.Size = New System.Drawing.Size(410, 52) + Me.ucrBase.TabIndex = 0 + ' + 'dlgColourbyProperty + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(422, 261) + Me.Controls.Add(Me.ucrBase) + Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow + Me.Name = "dlgColourbyProperty" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen + Me.Tag = "Colour_by_Property" + Me.Text = "Colour by Property" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents ucrBase As ucrButtons +End Class diff --git a/instat/dlgColourbyProperty.fr-FR.resx b/instat/dlgColourbyProperty.fr-FR.resx new file mode 100644 index 00000000000..9c9f69d752c --- /dev/null +++ b/instat/dlgColourbyProperty.fr-FR.resx @@ -0,0 +1,15 @@ + + + + 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/dlgColourbyProperty.resx b/instat/dlgColourbyProperty.resx new file mode 100644 index 00000000000..29dcb1b3a35 --- /dev/null +++ b/instat/dlgColourbyProperty.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/dlgColourbyProperty.sw-KE.resx b/instat/dlgColourbyProperty.sw-KE.resx new file mode 100644 index 00000000000..9c9f69d752c --- /dev/null +++ b/instat/dlgColourbyProperty.sw-KE.resx @@ -0,0 +1,15 @@ + + + + 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/dlgColourbyProperty.vb b/instat/dlgColourbyProperty.vb new file mode 100644 index 00000000000..865dee30c25 --- /dev/null +++ b/instat/dlgColourbyProperty.vb @@ -0,0 +1,46 @@ +' 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 dlgColourbyProperty + Public bFirstLoad As Boolean = True + Private Sub dlgColourbyProperty_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + If bFirstLoad Then + InitialiseDialog() + SetDefaults() + TestOKEnabled() + bFirstLoad = False + End If + End Sub + + Private Sub InitialiseDialog() + + End Sub + + Private Sub SetDefaults() + + End Sub + + Private Sub TestOKEnabled() + + End Sub + + Private Sub ucrBase_ClickReset(sender As Object, e As EventArgs) Handles ucrBase.ClickReset + SetDefaults() + TestOKEnabled() + End Sub +End Class \ No newline at end of file diff --git a/instat/dlgCumulativeDistribution.Designer.vb b/instat/dlgCumulativeDistribution.Designer.vb index 21ad8a01e0c..a1294a0a402 100644 --- a/instat/dlgCumulativeDistribution.Designer.vb +++ b/instat/dlgCumulativeDistribution.Designer.vb @@ -109,6 +109,7 @@ Partial Class dlgCumulativeDistribution ' 'ucrCumDistSelector ' + Me.ucrCumDistSelector.bShowHiddenColumns = False Me.ucrCumDistSelector.Location = New System.Drawing.Point(10, 10) Me.ucrCumDistSelector.Margin = New System.Windows.Forms.Padding(0) Me.ucrCumDistSelector.Name = "ucrCumDistSelector" diff --git a/instat/dlgCumulativeDistribution.vb b/instat/dlgCumulativeDistribution.vb index 1a14b9887d8..e943a3c7a6f 100644 --- a/instat/dlgCumulativeDistribution.vb +++ b/instat/dlgCumulativeDistribution.vb @@ -119,4 +119,9 @@ Public Class dlgCumulativeDistribution ucrBase.clsRsyntax.bExcludeAssignedFunctionOutput = False End If End Sub + + Private Sub cmdPlotOptions_Click(sender As Object, e As EventArgs) Handles cmdPlotOptions.Click + sdgPlots.SetDataFrame(strNewDataFrame:=ucrCumDistSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + sdgPlots.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgDescribeTwoVariable.Designer.vb b/instat/dlgDescribeTwoVariable.Designer.vb new file mode 100644 index 00000000000..7728b1cd921 --- /dev/null +++ b/instat/dlgDescribeTwoVariable.Designer.vb @@ -0,0 +1,52 @@ + _ +Partial Class dlgDescribeTwoVariable + 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(5, 201) + Me.UcrButtons1.Name = "UcrButtons1" + Me.UcrButtons1.Size = New System.Drawing.Size(410, 52) + Me.UcrButtons1.TabIndex = 0 + ' + 'dlgDescribeTwoVariable + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(419, 261) + Me.Controls.Add(Me.UcrButtons1) + Me.MaximizeBox = False + Me.MinimizeBox = False + Me.Name = "dlgDescribeTwoVariable" + Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent + Me.Tag = "Describe_Two_Variable" + Me.Text = "Describe Two Variable" + Me.ResumeLayout(False) + + End Sub + + Friend WithEvents UcrButtons1 As ucrButtons +End Class diff --git a/instat/dlgDescribeTwoVariable.fr-FR.resx b/instat/dlgDescribeTwoVariable.fr-FR.resx new file mode 100644 index 00000000000..9c9f69d752c --- /dev/null +++ b/instat/dlgDescribeTwoVariable.fr-FR.resx @@ -0,0 +1,15 @@ + + + + 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/dlgDescribeTwoVariable.resx b/instat/dlgDescribeTwoVariable.resx new file mode 100644 index 00000000000..29dcb1b3a35 --- /dev/null +++ b/instat/dlgDescribeTwoVariable.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/dlgDescribeTwoVariable.sw-KE.resx b/instat/dlgDescribeTwoVariable.sw-KE.resx new file mode 100644 index 00000000000..9c9f69d752c --- /dev/null +++ b/instat/dlgDescribeTwoVariable.sw-KE.resx @@ -0,0 +1,15 @@ + + + + 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/dlgDescribeTwoVariable.vb b/instat/dlgDescribeTwoVariable.vb new file mode 100644 index 00000000000..08d60e26b44 --- /dev/null +++ b/instat/dlgDescribeTwoVariable.vb @@ -0,0 +1,21 @@ +' 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 dlgDescribeTwoVariable + Private Sub dlgDescribeTwoVariable_Load(sender As Object, e As EventArgs) Handles MyBase.Load + autoTranslate(Me) + End Sub +End Class \ No newline at end of file diff --git a/instat/dlgDescriptiveStatistics.Designer.vb b/instat/dlgDescriptiveStatistics.Designer.vb index d53c14c9b6f..3a756884093 100644 --- a/instat/dlgDescriptiveStatistics.Designer.vb +++ b/instat/dlgDescriptiveStatistics.Designer.vb @@ -1,171 +1,141 @@ - -Partial Class dlgDescriptiveStatistics - 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() + +Partial Class dlgDescriptiveStatistics + 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.cmdStatistics = New System.Windows.Forms.Button() - Me.grpgraphics = New System.Windows.Forms.GroupBox() - Me.chkCumulativeFrequency = New System.Windows.Forms.CheckBox() - Me.chkBoxPlot = New System.Windows.Forms.CheckBox() - Me.chkStemAndLeaf = New System.Windows.Forms.CheckBox() - Me.chkGraphics = New System.Windows.Forms.CheckBox() - Me.ucrDataSelector = New instat.ucrSelectorAddRemove() - Me.ucrObjectReceiver = New instat.ucrReceiverSingle() + Me.ucrSelectorDescribeOneVar = New instat.ucrSelectorAddRemove() Me.lblSelectedVariable = New System.Windows.Forms.Label() - Me.ucrBase = New instat.ucrButtons() - Me.grpgraphics.SuspendLayout() + Me.ucrBaseDescribeOneVar = New instat.ucrButtons() + Me.chkSaveResult = New System.Windows.Forms.CheckBox() + Me.lblNewDataFrame = New System.Windows.Forms.Label() + Me.UcrInputTextBox1 = New instat.ucrInputTextBox() + Me.ucrReceiverDescribeOneVar = New instat.ucrReceiverMultiple() Me.SuspendLayout() ' 'cmdStatistics ' - Me.cmdStatistics.Location = New System.Drawing.Point(10, 165) + Me.cmdStatistics.Location = New System.Drawing.Point(325, 179) Me.cmdStatistics.Name = "cmdStatistics" - Me.cmdStatistics.Size = New System.Drawing.Size(104, 23) + Me.cmdStatistics.Size = New System.Drawing.Size(71, 23) Me.cmdStatistics.TabIndex = 90 - Me.cmdStatistics.Tag = "Choose_Statistics" - Me.cmdStatistics.Text = "Choose Statistics " + Me.cmdStatistics.Tag = "Statistics" + Me.cmdStatistics.Text = "Statistics " Me.cmdStatistics.UseVisualStyleBackColor = True ' - 'grpgraphics - ' - Me.grpgraphics.Controls.Add(Me.chkCumulativeFrequency) - Me.grpgraphics.Controls.Add(Me.chkBoxPlot) - Me.grpgraphics.Controls.Add(Me.chkStemAndLeaf) - Me.grpgraphics.Location = New System.Drawing.Point(93, 192) - Me.grpgraphics.Name = "grpgraphics" - Me.grpgraphics.Size = New System.Drawing.Size(314, 28) - Me.grpgraphics.TabIndex = 89 - Me.grpgraphics.TabStop = False - ' - 'chkCumulativeFrequency - ' - Me.chkCumulativeFrequency.AutoSize = True - Me.chkCumulativeFrequency.Location = New System.Drawing.Point(189, 5) - Me.chkCumulativeFrequency.Name = "chkCumulativeFrequency" - Me.chkCumulativeFrequency.Size = New System.Drawing.Size(128, 17) - Me.chkCumulativeFrequency.TabIndex = 61 - Me.chkCumulativeFrequency.Tag = "Cumulative_frequency" - Me.chkCumulativeFrequency.Text = "Cumulative frequency" - Me.chkCumulativeFrequency.UseVisualStyleBackColor = True - ' - 'chkBoxPlot - ' - Me.chkBoxPlot.AutoSize = True - Me.chkBoxPlot.Location = New System.Drawing.Point(112, 6) - Me.chkBoxPlot.Name = "chkBoxPlot" - Me.chkBoxPlot.Size = New System.Drawing.Size(65, 17) - Me.chkBoxPlot.TabIndex = 60 - Me.chkBoxPlot.Tag = "Box_Plot" - Me.chkBoxPlot.Text = "Box Plot" - Me.chkBoxPlot.UseVisualStyleBackColor = True - ' - 'chkStemAndLeaf - ' - Me.chkStemAndLeaf.AutoSize = True - Me.chkStemAndLeaf.Location = New System.Drawing.Point(7, 5) - Me.chkStemAndLeaf.Name = "chkStemAndLeaf" - Me.chkStemAndLeaf.Size = New System.Drawing.Size(91, 17) - Me.chkStemAndLeaf.TabIndex = 1 - Me.chkStemAndLeaf.Tag = "Stem_and_Leaf" - Me.chkStemAndLeaf.Text = "Stem and leaf" - Me.chkStemAndLeaf.UseVisualStyleBackColor = True - ' - 'chkGraphics - ' - Me.chkGraphics.AutoSize = True - Me.chkGraphics.Location = New System.Drawing.Point(10, 200) - Me.chkGraphics.Name = "chkGraphics" - Me.chkGraphics.Size = New System.Drawing.Size(71, 17) - Me.chkGraphics.TabIndex = 88 - Me.chkGraphics.Tag = "Graphics" - Me.chkGraphics.Text = "Graphics " - Me.chkGraphics.UseVisualStyleBackColor = True - ' - 'ucrDataSelector - ' - Me.ucrDataSelector.Location = New System.Drawing.Point(10, 10) - Me.ucrDataSelector.Margin = New System.Windows.Forms.Padding(0) - Me.ucrDataSelector.Name = "ucrDataSelector" - Me.ucrDataSelector.Size = New System.Drawing.Size(213, 147) - Me.ucrDataSelector.TabIndex = 92 - ' - 'ucrObjectReceiver - ' - Me.ucrObjectReceiver.Location = New System.Drawing.Point(235, 60) - Me.ucrObjectReceiver.Margin = New System.Windows.Forms.Padding(0) - Me.ucrObjectReceiver.Name = "ucrObjectReceiver" - Me.ucrObjectReceiver.Selector = Nothing - Me.ucrObjectReceiver.Size = New System.Drawing.Size(120, 26) - Me.ucrObjectReceiver.TabIndex = 93 + 'ucrSelectorDescribeOneVar + ' + Me.ucrSelectorDescribeOneVar.bShowHiddenColumns = False + Me.ucrSelectorDescribeOneVar.Location = New System.Drawing.Point(10, 10) + Me.ucrSelectorDescribeOneVar.Margin = New System.Windows.Forms.Padding(0) + Me.ucrSelectorDescribeOneVar.Name = "ucrSelectorDescribeOneVar" + Me.ucrSelectorDescribeOneVar.Size = New System.Drawing.Size(213, 147) + Me.ucrSelectorDescribeOneVar.TabIndex = 92 ' 'lblSelectedVariable ' Me.lblSelectedVariable.AutoSize = True - Me.lblSelectedVariable.Location = New System.Drawing.Point(236, 41) + Me.lblSelectedVariable.Location = New System.Drawing.Point(272, 10) Me.lblSelectedVariable.Name = "lblSelectedVariable" Me.lblSelectedVariable.Size = New System.Drawing.Size(90, 13) Me.lblSelectedVariable.TabIndex = 94 Me.lblSelectedVariable.Tag = "Selected_Variable" Me.lblSelectedVariable.Text = "Selected Variable" ' - 'ucrBase + 'ucrBaseDescribeOneVar + ' + Me.ucrBaseDescribeOneVar.Location = New System.Drawing.Point(10, 228) + Me.ucrBaseDescribeOneVar.Name = "ucrBaseDescribeOneVar" + Me.ucrBaseDescribeOneVar.Size = New System.Drawing.Size(399, 53) + Me.ucrBaseDescribeOneVar.TabIndex = 95 + ' + 'chkSaveResult + ' + Me.chkSaveResult.AutoSize = True + Me.chkSaveResult.Location = New System.Drawing.Point(10, 169) + Me.chkSaveResult.Name = "chkSaveResult" + Me.chkSaveResult.Size = New System.Drawing.Size(87, 17) + Me.chkSaveResult.TabIndex = 96 + Me.chkSaveResult.Tag = "Save_Result" + Me.chkSaveResult.Text = "Save Result " + Me.chkSaveResult.UseVisualStyleBackColor = True ' - Me.ucrBase.Location = New System.Drawing.Point(10, 228) - Me.ucrBase.Name = "ucrBase" - Me.ucrBase.Size = New System.Drawing.Size(399, 53) - Me.ucrBase.TabIndex = 95 + 'lblNewDataFrame + ' + Me.lblNewDataFrame.AutoSize = True + Me.lblNewDataFrame.Location = New System.Drawing.Point(28, 189) + Me.lblNewDataFrame.Name = "lblNewDataFrame" + Me.lblNewDataFrame.Size = New System.Drawing.Size(108, 13) + Me.lblNewDataFrame.TabIndex = 97 + Me.lblNewDataFrame.Tag = "Into_New_Data_Frame" + Me.lblNewDataFrame.Text = "Into New Data Frame" + ' + 'UcrInputTextBox1 + ' + Me.UcrInputTextBox1.IsReadOnly = False + Me.UcrInputTextBox1.Location = New System.Drawing.Point(143, 184) + Me.UcrInputTextBox1.Name = "UcrInputTextBox1" + Me.UcrInputTextBox1.Size = New System.Drawing.Size(95, 21) + Me.UcrInputTextBox1.TabIndex = 98 + ' + 'ucrReceiverDescribeOneVar + ' + Me.ucrReceiverDescribeOneVar.Location = New System.Drawing.Point(260, 23) + Me.ucrReceiverDescribeOneVar.Margin = New System.Windows.Forms.Padding(0) + Me.ucrReceiverDescribeOneVar.Name = "ucrReceiverDescribeOneVar" + Me.ucrReceiverDescribeOneVar.Selector = Nothing + Me.ucrReceiverDescribeOneVar.Size = New System.Drawing.Size(120, 100) + Me.ucrReceiverDescribeOneVar.TabIndex = 99 ' 'dlgDescriptiveStatistics ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.ClientSize = New System.Drawing.Size(419, 297) - Me.Controls.Add(Me.ucrBase) + Me.Controls.Add(Me.ucrReceiverDescribeOneVar) + Me.Controls.Add(Me.UcrInputTextBox1) + Me.Controls.Add(Me.lblNewDataFrame) + Me.Controls.Add(Me.chkSaveResult) + Me.Controls.Add(Me.ucrBaseDescribeOneVar) Me.Controls.Add(Me.lblSelectedVariable) - Me.Controls.Add(Me.ucrObjectReceiver) - Me.Controls.Add(Me.ucrDataSelector) + Me.Controls.Add(Me.ucrSelectorDescribeOneVar) Me.Controls.Add(Me.cmdStatistics) - Me.Controls.Add(Me.grpgraphics) - Me.Controls.Add(Me.chkGraphics) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "dlgDescriptiveStatistics" Me.ShowIcon = False - Me.Tag = "Descriptive_Statistics" - Me.Text = "Descriptive Statistics" - Me.grpgraphics.ResumeLayout(False) - Me.grpgraphics.PerformLayout() + Me.Tag = "Describe_One_Variable" + Me.Text = "Describe One Variable" Me.ResumeLayout(False) Me.PerformLayout() - End Sub - Friend WithEvents cmdStatistics As Button - Friend WithEvents grpgraphics As GroupBox - Friend WithEvents chkCumulativeFrequency As CheckBox - Friend WithEvents chkBoxPlot As CheckBox - Friend WithEvents chkStemAndLeaf As CheckBox - Friend WithEvents chkGraphics As CheckBox - Friend WithEvents ucrDataSelector As ucrSelectorAddRemove - Friend WithEvents ucrObjectReceiver As ucrReceiverSingle + End Sub + Friend WithEvents cmdStatistics As Button + Friend WithEvents ucrSelectorDescribeOneVar As ucrSelectorAddRemove Friend WithEvents lblSelectedVariable As Label - Friend WithEvents ucrBase As ucrButtons -End Class + Friend WithEvents ucrBaseDescribeOneVar As ucrButtons + Friend WithEvents chkSaveResult As CheckBox + Friend WithEvents lblNewDataFrame As Label + Friend WithEvents UcrInputTextBox1 As ucrInputTextBox + Friend WithEvents ucrReceiverDescribeOneVar As ucrReceiverMultiple +End Class + diff --git a/instat/dlgDescriptiveStatistics.vb b/instat/dlgDescriptiveStatistics.vb index 3d7673d50a3..5e8958bf9bc 100644 --- a/instat/dlgDescriptiveStatistics.vb +++ b/instat/dlgDescriptiveStatistics.vb @@ -1,44 +1,137 @@ -' 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 dlgDescriptiveStatistics - Private Sub dlgDescriptiveStatistics_Load(sender As Object, e As EventArgs) Handles MyBase.Load - ucrObjectReceiver.Selector = ucrDataSelector - ucrObjectReceiver.SetMeAsReceiver() - ucrBase.clsRsyntax.SetFunction("summary") - ucrBase.clsRsyntax.iCallType = 2 - autoTranslate(Me) - grpgraphics.Visible = False - End Sub - - Private Sub chkGraphics_CheckedChanged(sender As Object, e As EventArgs) Handles chkGraphics.CheckedChanged - If chkGraphics.Checked = True Then - grpgraphics.Visible = True - End If - If chkGraphics.Checked = False Then - grpgraphics.Visible = False - End If - End Sub - - Private Sub ucrObjectReceiver_Leave(sender As Object, e As EventArgs) Handles ucrObjectReceiver.Leave - ucrBase.clsRsyntax.AddParameter("object", clsRFunctionParameter:=ucrObjectReceiver.GetVariables()) - End Sub -End Class - - - - +' 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 dlgDescriptiveStatistics + Public bFirstLoad As Boolean = True + Public clsRBaseStatsFunction, clsRMissingFunction, clsRMissingSubFunction As New RFunction + Private Sub dlgDescriptiveStatistics_Load(sender As Object, e As EventArgs) Handles MyBase.Load + If bFirstLoad Then + InitialiseDialog() + SetDefaults() + bFirstLoad = False + Else + ReopenDialog() + End If + autoTranslate(Me) + + + + End Sub + + Private Sub InitialiseDialog() + ucrReceiverDescribeOneVar.Selector = ucrSelectorDescribeOneVar + ucrReceiverDescribeOneVar.SetDataType("numeric") + ' ucrBaseDescribeOneVar.clsRsyntax.SetFunction("") + ' ucrBaseDescribeOneVar.clsRsyntax.iCallType = 0 + End Sub + + Private Sub ReopenDialog() + + End Sub + + Private Sub SetDefaults() + ucrReceiverDescribeOneVar.SetMeAsReceiver() + sdgDescribe.SetDefaults() + ucrSelectorDescribeOneVar.Reset() + ucrSelectorDescribeOneVar.Focus() + TestOKEnabled() + End Sub + + Private Sub TestOKEnabled() + If Not ucrReceiverDescribeOneVar.IsEmpty() Then + ucrBaseDescribeOneVar.OKEnabled(True) + Else + ucrBaseDescribeOneVar.OKEnabled(False) + End If + End Sub + + Public Sub ucrReceiverDescribeOneVar_selectionchanged() Handles ucrReceiverDescribeOneVar.SelectionChanged + TestOKEnabled() + End Sub + + Private Sub cmdStatistics_Click(sender As Object, e As EventArgs) Handles cmdStatistics.Click + sdgDescribe.ShowDialog() + End Sub + + Private Sub ucrBaseDescribeOneVar_ClickOk(sender As Object, e As EventArgs) Handles ucrBaseDescribeOneVar.ClickOk + StatsOptions() + End Sub + + Private Sub ucrBaseDescribeOneVar_ClickReset(sender As Object, e As EventArgs) Handles ucrBaseDescribeOneVar.ClickReset + SetDefaults() + End Sub + Public Sub StatsOptions() + If sdgDescribe.chkMean.Checked Then + RBaseStats("mean") + End If + If sdgDescribe.chkStdDev.Checked Then + RBaseStats("sd") + End If + If sdgDescribe.chkMaximum.Checked Then + RBaseStats("max") + End If + If sdgDescribe.chkMinimum.Checked Then + RBaseStats("min") + End If + If sdgDescribe.chkNMissing.Checked Then + RNMissing("is.na") + End If + If sdgDescribe.chkN.Checked Then + RNMissing("!is.na") + End If + If sdgDescribe.chkNTotal.Checked Then + RBaseStats("length") + End If + End Sub + + Public Sub RBaseStats(strStat As String) + If ucrReceiverDescribeOneVar.lstSelectedVariables.Items.Count > 1 Then + clsRBaseStatsFunction.SetRCommand("apply") + clsRBaseStatsFunction.AddParameter("X", clsRFunctionParameter:=ucrReceiverDescribeOneVar.GetVariables()) + clsRBaseStatsFunction.AddParameter("MARGIN", "2") + clsRBaseStatsFunction.AddParameter("FUN", strStat) + clsRBaseStatsFunction.RemoveParameterByName("x") + Else + clsRBaseStatsFunction.SetRCommand(strStat) + clsRBaseStatsFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverDescribeOneVar.GetVariables()) + clsRBaseStatsFunction.RemoveParameterByName("X") + clsRBaseStatsFunction.RemoveParameterByName("MARGIN") + clsRBaseStatsFunction.RemoveParameterByName("FUN") + End If + frmMain.clsRLink.RunScript(clsRBaseStatsFunction.ToScript(), 2) + End Sub + + Public Sub RNMissing(strMissing As String) + clsRMissingSubFunction.SetRCommand(strMissing) + clsRMissingSubFunction.AddParameter("x", clsRFunctionParameter:=ucrReceiverDescribeOneVar.GetVariables()) + If ucrReceiverDescribeOneVar.lstSelectedVariables.Items.Count > 1 Then + clsRMissingFunction.SetRCommand("apply") + clsRMissingFunction.AddParameter("X", clsRFunctionParameter:=clsRMissingSubFunction) + clsRMissingFunction.AddParameter("MARGIN", "2") + clsRMissingFunction.AddParameter("FUN", "sum") + clsRMissingFunction.RemoveParameterByName("x") + Else + clsRMissingFunction.SetRCommand("sum") + clsRMissingFunction.AddParameter("x", clsRFunctionParameter:=clsRMissingSubFunction) + clsRMissingFunction.RemoveParameterByName("X") + clsRMissingFunction.RemoveParameterByName("MARGIN") + clsRMissingFunction.RemoveParameterByName("FUN") + End If + frmMain.clsRLink.RunScript(clsRMissingFunction.ToScript(), 2) + End Sub + +End Class diff --git a/instat/dlgDotPlot.designer.vb b/instat/dlgDotPlot.designer.vb index 8eebc081271..2ab2b2fcad4 100644 --- a/instat/dlgDotPlot.designer.vb +++ b/instat/dlgDotPlot.designer.vb @@ -91,6 +91,7 @@ Partial Class dlgDotPlot ' 'ucrDotPlotSelector ' + Me.ucrDotPlotSelector.bShowHiddenColumns = False Me.ucrDotPlotSelector.Location = New System.Drawing.Point(10, 10) Me.ucrDotPlotSelector.Margin = New System.Windows.Forms.Padding(0) Me.ucrDotPlotSelector.Name = "ucrDotPlotSelector" diff --git a/instat/dlgDotPlot.vb b/instat/dlgDotPlot.vb index 1ba11294197..3229e3617eb 100644 --- a/instat/dlgDotPlot.vb +++ b/instat/dlgDotPlot.vb @@ -140,4 +140,9 @@ Public Class dlgDotPlot End If TestOkEnabled() End Sub + + Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + sdgPlots.SetDataFrame(strNewDataFrame:=ucrDotPlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text) + sdgPlots.ShowDialog() + End Sub End Class \ No newline at end of file diff --git a/instat/dlgHistogram.vb b/instat/dlgHistogram.vb index 9162bc22eef..2bf76543121 100644 --- a/instat/dlgHistogram.vb +++ b/instat/dlgHistogram.vb @@ -63,6 +63,7 @@ Public Class dlgHistogram End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + sdgPlots.SetDataFrame(strNewDataFrame:=ucrHistogramSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text) sdgPlots.ShowDialog() End Sub diff --git a/instat/dlgPlot.vb b/instat/dlgPlot.vb index 83a99723946..436ef467716 100644 --- a/instat/dlgPlot.vb +++ b/instat/dlgPlot.vb @@ -108,6 +108,7 @@ Public Class dlgPlot End If End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + sdgPlots.SetDataFrame(strNewDataFrame:=ucrLinePlotSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text) sdgPlots.ShowDialog() End Sub diff --git a/instat/dlgReplace.Designer.vb b/instat/dlgReplace.Designer.vb index 86a9e9d8d3b..8b1e2863a57 100644 --- a/instat/dlgReplace.Designer.vb +++ b/instat/dlgReplace.Designer.vb @@ -23,7 +23,10 @@ Partial Class dlgReplace _ Private Sub InitializeComponent() Me.grpOld = New System.Windows.Forms.GroupBox() - Me.chkClosedLowerRange = New System.Windows.Forms.CheckBox() + Me.chkIncludingMaximum = New System.Windows.Forms.CheckBox() + Me.lblMaximum = New System.Windows.Forms.Label() + Me.lblRangeMin = New System.Windows.Forms.Label() + Me.chkIncludeMinimum = New System.Windows.Forms.CheckBox() Me.rdoRange = New System.Windows.Forms.RadioButton() Me.rdoOldMissing = New System.Windows.Forms.RadioButton() Me.rdoOldValue = New System.Windows.Forms.RadioButton() @@ -32,66 +35,95 @@ Partial Class dlgReplace Me.rdoNewValue = New System.Windows.Forms.RadioButton() Me.rdoFromAbove = New System.Windows.Forms.RadioButton() Me.lblSelectedColumns = New System.Windows.Forms.Label() - Me.chkClosedUpperRange = New System.Windows.Forms.CheckBox() Me.ucrInputNewValue = New instat.ucrInputTextBox() Me.ucrInputRangeTo = New instat.ucrInputTextBox() - Me.ucrInputRangeFro = New instat.ucrInputTextBox() + Me.ucrInputRangeFrom = New instat.ucrInputTextBox() Me.ucrInputOldValue = New instat.ucrInputTextBox() Me.ucrReceiverReplace = New instat.ucrReceiverMultiple() Me.ucrSelectorReplace = New instat.ucrSelectorByDataFrameAddRemove() Me.ucrBaseReplace = New instat.ucrButtons() - Me.lblFrom = New System.Windows.Forms.Label() - Me.lblTo = New System.Windows.Forms.Label() Me.grpOld.SuspendLayout() Me.grpNew.SuspendLayout() Me.SuspendLayout() ' 'grpOld ' - Me.grpOld.Controls.Add(Me.lblTo) - Me.grpOld.Controls.Add(Me.lblFrom) - Me.grpOld.Controls.Add(Me.chkClosedLowerRange) + Me.grpOld.Controls.Add(Me.chkIncludingMaximum) + Me.grpOld.Controls.Add(Me.lblMaximum) + Me.grpOld.Controls.Add(Me.lblRangeMin) + Me.grpOld.Controls.Add(Me.chkIncludeMinimum) Me.grpOld.Controls.Add(Me.ucrInputRangeTo) - Me.grpOld.Controls.Add(Me.ucrInputRangeFro) + Me.grpOld.Controls.Add(Me.ucrInputRangeFrom) Me.grpOld.Controls.Add(Me.ucrInputOldValue) Me.grpOld.Controls.Add(Me.rdoRange) Me.grpOld.Controls.Add(Me.rdoOldMissing) Me.grpOld.Controls.Add(Me.rdoOldValue) - Me.grpOld.Location = New System.Drawing.Point(12, 189) + Me.grpOld.Location = New System.Drawing.Point(10, 194) Me.grpOld.Name = "grpOld" - Me.grpOld.Size = New System.Drawing.Size(203, 123) + Me.grpOld.Size = New System.Drawing.Size(229, 143) Me.grpOld.TabIndex = 11 Me.grpOld.TabStop = False Me.grpOld.Tag = "Old" Me.grpOld.Text = "Old" ' - 'chkClosedLowerRange - ' - Me.chkClosedLowerRange.AutoSize = True - Me.chkClosedLowerRange.Location = New System.Drawing.Point(140, 76) - Me.chkClosedLowerRange.Name = "chkClosedLowerRange" - Me.chkClosedLowerRange.Size = New System.Drawing.Size(58, 17) - Me.chkClosedLowerRange.TabIndex = 6 - Me.chkClosedLowerRange.Tag = "Closed" - Me.chkClosedLowerRange.Text = "Closed" - Me.chkClosedLowerRange.UseVisualStyleBackColor = True + 'chkIncludingMaximum + ' + Me.chkIncludingMaximum.AutoSize = True + Me.chkIncludingMaximum.Location = New System.Drawing.Point(154, 109) + Me.chkIncludingMaximum.Name = "chkIncludingMaximum" + Me.chkIncludingMaximum.Size = New System.Drawing.Size(69, 17) + Me.chkIncludingMaximum.TabIndex = 7 + Me.chkIncludingMaximum.Tag = "Including" + Me.chkIncludingMaximum.Text = "Including" + Me.chkIncludingMaximum.UseVisualStyleBackColor = True + ' + 'lblMaximum + ' + Me.lblMaximum.AutoSize = True + Me.lblMaximum.Location = New System.Drawing.Point(22, 108) + Me.lblMaximum.Name = "lblMaximum" + Me.lblMaximum.Size = New System.Drawing.Size(51, 13) + Me.lblMaximum.TabIndex = 8 + Me.lblMaximum.Tag = "Maximum" + Me.lblMaximum.Text = "Maximum" + ' + 'lblRangeMin + ' + Me.lblRangeMin.AutoSize = True + Me.lblRangeMin.Location = New System.Drawing.Point(22, 80) + Me.lblRangeMin.Name = "lblRangeMin" + Me.lblRangeMin.Size = New System.Drawing.Size(48, 13) + Me.lblRangeMin.TabIndex = 7 + Me.lblRangeMin.Tag = "Minimum" + Me.lblRangeMin.Text = "Minimum" + ' + 'chkIncludeMinimum + ' + Me.chkIncludeMinimum.AutoSize = True + Me.chkIncludeMinimum.Location = New System.Drawing.Point(154, 78) + Me.chkIncludeMinimum.Name = "chkIncludeMinimum" + Me.chkIncludeMinimum.Size = New System.Drawing.Size(69, 17) + Me.chkIncludeMinimum.TabIndex = 6 + Me.chkIncludeMinimum.Tag = "Including" + Me.chkIncludeMinimum.Text = "Including" + Me.chkIncludeMinimum.UseVisualStyleBackColor = True ' 'rdoRange ' Me.rdoRange.AutoSize = True - Me.rdoRange.Location = New System.Drawing.Point(6, 56) + Me.rdoRange.Location = New System.Drawing.Point(5, 60) Me.rdoRange.Name = "rdoRange" - Me.rdoRange.Size = New System.Drawing.Size(57, 17) + Me.rdoRange.Size = New System.Drawing.Size(60, 17) Me.rdoRange.TabIndex = 2 Me.rdoRange.TabStop = True Me.rdoRange.Tag = "Range" - Me.rdoRange.Text = "Range" + Me.rdoRange.Text = "Range:" Me.rdoRange.UseVisualStyleBackColor = True ' 'rdoOldMissing ' Me.rdoOldMissing.AutoSize = True - Me.rdoOldMissing.Location = New System.Drawing.Point(7, 37) + Me.rdoOldMissing.Location = New System.Drawing.Point(5, 40) Me.rdoOldMissing.Name = "rdoOldMissing" Me.rdoOldMissing.Size = New System.Drawing.Size(60, 17) Me.rdoOldMissing.TabIndex = 1 @@ -103,13 +135,13 @@ Partial Class dlgReplace 'rdoOldValue ' Me.rdoOldValue.AutoSize = True - Me.rdoOldValue.Location = New System.Drawing.Point(7, 17) + Me.rdoOldValue.Location = New System.Drawing.Point(5, 20) Me.rdoOldValue.Name = "rdoOldValue" - Me.rdoOldValue.Size = New System.Drawing.Size(52, 17) + Me.rdoOldValue.Size = New System.Drawing.Size(55, 17) Me.rdoOldValue.TabIndex = 0 Me.rdoOldValue.TabStop = True Me.rdoOldValue.Tag = "Value" - Me.rdoOldValue.Text = "Value" + Me.rdoOldValue.Text = "Value:" Me.rdoOldValue.UseVisualStyleBackColor = True ' 'grpNew @@ -118,9 +150,9 @@ Partial Class dlgReplace Me.grpNew.Controls.Add(Me.rdoNewMissing) Me.grpNew.Controls.Add(Me.rdoNewValue) Me.grpNew.Controls.Add(Me.rdoFromAbove) - Me.grpNew.Location = New System.Drawing.Point(221, 201) + Me.grpNew.Location = New System.Drawing.Point(247, 194) Me.grpNew.Name = "grpNew" - Me.grpNew.Size = New System.Drawing.Size(174, 94) + Me.grpNew.Size = New System.Drawing.Size(174, 143) Me.grpNew.TabIndex = 12 Me.grpNew.TabStop = False Me.grpNew.Tag = "New" @@ -129,7 +161,7 @@ Partial Class dlgReplace 'rdoNewMissing ' Me.rdoNewMissing.AutoSize = True - Me.rdoNewMissing.Location = New System.Drawing.Point(13, 43) + Me.rdoNewMissing.Location = New System.Drawing.Point(5, 40) Me.rdoNewMissing.Name = "rdoNewMissing" Me.rdoNewMissing.Size = New System.Drawing.Size(60, 17) Me.rdoNewMissing.TabIndex = 5 @@ -141,19 +173,19 @@ Partial Class dlgReplace 'rdoNewValue ' Me.rdoNewValue.AutoSize = True - Me.rdoNewValue.Location = New System.Drawing.Point(13, 20) + Me.rdoNewValue.Location = New System.Drawing.Point(5, 20) Me.rdoNewValue.Name = "rdoNewValue" - Me.rdoNewValue.Size = New System.Drawing.Size(52, 17) + Me.rdoNewValue.Size = New System.Drawing.Size(55, 17) Me.rdoNewValue.TabIndex = 4 Me.rdoNewValue.TabStop = True Me.rdoNewValue.Tag = "Value" - Me.rdoNewValue.Text = "Value" + Me.rdoNewValue.Text = "Value:" Me.rdoNewValue.UseVisualStyleBackColor = True ' 'rdoFromAbove ' Me.rdoFromAbove.AutoSize = True - Me.rdoFromAbove.Location = New System.Drawing.Point(16, 70) + Me.rdoFromAbove.Location = New System.Drawing.Point(5, 60) Me.rdoFromAbove.Name = "rdoFromAbove" Me.rdoFromAbove.Size = New System.Drawing.Size(81, 17) Me.rdoFromAbove.TabIndex = 3 @@ -165,59 +197,48 @@ Partial Class dlgReplace 'lblSelectedColumns ' Me.lblSelectedColumns.AutoSize = True - Me.lblSelectedColumns.Location = New System.Drawing.Point(283, 41) + Me.lblSelectedColumns.Location = New System.Drawing.Point(273, 30) Me.lblSelectedColumns.Name = "lblSelectedColumns" Me.lblSelectedColumns.Size = New System.Drawing.Size(98, 13) Me.lblSelectedColumns.TabIndex = 13 Me.lblSelectedColumns.Tag = "Selected_Column(s)" Me.lblSelectedColumns.Text = "Selected Column(s)" ' - 'chkClosedUpperRange - ' - Me.chkClosedUpperRange.AutoSize = True - Me.chkClosedUpperRange.Location = New System.Drawing.Point(152, 291) - Me.chkClosedUpperRange.Name = "chkClosedUpperRange" - Me.chkClosedUpperRange.Size = New System.Drawing.Size(58, 17) - Me.chkClosedUpperRange.TabIndex = 7 - Me.chkClosedUpperRange.Tag = "Closed" - Me.chkClosedUpperRange.Text = "Closed" - Me.chkClosedUpperRange.UseVisualStyleBackColor = True - ' 'ucrInputNewValue ' Me.ucrInputNewValue.IsReadOnly = False - Me.ucrInputNewValue.Location = New System.Drawing.Point(80, 16) + Me.ucrInputNewValue.Location = New System.Drawing.Point(63, 19) Me.ucrInputNewValue.Name = "ucrInputNewValue" - Me.ucrInputNewValue.Size = New System.Drawing.Size(69, 21) + Me.ucrInputNewValue.Size = New System.Drawing.Size(97, 21) Me.ucrInputNewValue.TabIndex = 6 ' 'ucrInputRangeTo ' Me.ucrInputRangeTo.IsReadOnly = False - Me.ucrInputRangeTo.Location = New System.Drawing.Point(58, 98) + Me.ucrInputRangeTo.Location = New System.Drawing.Point(79, 106) Me.ucrInputRangeTo.Name = "ucrInputRangeTo" Me.ucrInputRangeTo.Size = New System.Drawing.Size(69, 21) Me.ucrInputRangeTo.TabIndex = 5 ' - 'ucrInputRangeFro + 'ucrInputRangeFrom ' - Me.ucrInputRangeFro.IsReadOnly = False - Me.ucrInputRangeFro.Location = New System.Drawing.Point(58, 73) - Me.ucrInputRangeFro.Name = "ucrInputRangeFro" - Me.ucrInputRangeFro.Size = New System.Drawing.Size(69, 21) - Me.ucrInputRangeFro.TabIndex = 4 + Me.ucrInputRangeFrom.IsReadOnly = False + Me.ucrInputRangeFrom.Location = New System.Drawing.Point(79, 76) + Me.ucrInputRangeFrom.Name = "ucrInputRangeFrom" + Me.ucrInputRangeFrom.Size = New System.Drawing.Size(69, 21) + Me.ucrInputRangeFrom.TabIndex = 4 ' 'ucrInputOldValue ' Me.ucrInputOldValue.IsReadOnly = False - Me.ucrInputOldValue.Location = New System.Drawing.Point(73, 14) + Me.ucrInputOldValue.Location = New System.Drawing.Point(58, 19) Me.ucrInputOldValue.Name = "ucrInputOldValue" - Me.ucrInputOldValue.Size = New System.Drawing.Size(51, 21) + Me.ucrInputOldValue.Size = New System.Drawing.Size(95, 21) Me.ucrInputOldValue.TabIndex = 3 ' 'ucrReceiverReplace ' - Me.ucrReceiverReplace.Location = New System.Drawing.Point(275, 61) + Me.ucrReceiverReplace.Location = New System.Drawing.Point(276, 52) Me.ucrReceiverReplace.Margin = New System.Windows.Forms.Padding(0) Me.ucrReceiverReplace.Name = "ucrReceiverReplace" Me.ucrReceiverReplace.Selector = Nothing @@ -227,7 +248,7 @@ Partial Class dlgReplace 'ucrSelectorReplace ' Me.ucrSelectorReplace.bShowHiddenColumns = False - Me.ucrSelectorReplace.Location = New System.Drawing.Point(12, 6) + Me.ucrSelectorReplace.Location = New System.Drawing.Point(10, 10) Me.ucrSelectorReplace.Margin = New System.Windows.Forms.Padding(0) Me.ucrSelectorReplace.Name = "ucrSelectorReplace" Me.ucrSelectorReplace.Size = New System.Drawing.Size(210, 180) @@ -235,37 +256,16 @@ Partial Class dlgReplace ' 'ucrBaseReplace ' - Me.ucrBaseReplace.Location = New System.Drawing.Point(4, 318) + Me.ucrBaseReplace.Location = New System.Drawing.Point(10, 343) Me.ucrBaseReplace.Name = "ucrBaseReplace" Me.ucrBaseReplace.Size = New System.Drawing.Size(410, 52) Me.ucrBaseReplace.TabIndex = 8 ' - 'lblFrom - ' - Me.lblFrom.AutoSize = True - Me.lblFrom.Location = New System.Drawing.Point(21, 78) - Me.lblFrom.Name = "lblFrom" - Me.lblFrom.Size = New System.Drawing.Size(30, 13) - Me.lblFrom.TabIndex = 7 - Me.lblFrom.Tag = "From" - Me.lblFrom.Text = "From" - ' - 'lblTo - ' - Me.lblTo.AutoSize = True - Me.lblTo.Location = New System.Drawing.Point(28, 101) - Me.lblTo.Name = "lblTo" - Me.lblTo.Size = New System.Drawing.Size(20, 13) - Me.lblTo.TabIndex = 8 - Me.lblTo.Tag = "To" - Me.lblTo.Text = "To" - ' 'dlgReplace ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(419, 376) - Me.Controls.Add(Me.chkClosedUpperRange) + Me.ClientSize = New System.Drawing.Size(452, 397) Me.Controls.Add(Me.lblSelectedColumns) Me.Controls.Add(Me.grpNew) Me.Controls.Add(Me.grpOld) @@ -291,7 +291,7 @@ Partial Class dlgReplace Friend WithEvents grpOld As GroupBox Friend WithEvents grpNew As GroupBox Friend WithEvents ucrInputRangeTo As ucrInputTextBox - Friend WithEvents ucrInputRangeFro As ucrInputTextBox + Friend WithEvents ucrInputRangeFrom As ucrInputTextBox Friend WithEvents ucrInputOldValue As ucrInputTextBox Friend WithEvents rdoRange As RadioButton Friend WithEvents rdoOldMissing As RadioButton @@ -301,8 +301,8 @@ Partial Class dlgReplace Friend WithEvents rdoNewValue As RadioButton Friend WithEvents rdoFromAbove As RadioButton Friend WithEvents lblSelectedColumns As Label - Friend WithEvents chkClosedLowerRange As CheckBox - Friend WithEvents chkClosedUpperRange As CheckBox - Friend WithEvents lblTo As Label - Friend WithEvents lblFrom As Label + Friend WithEvents chkIncludeMinimum As CheckBox + Friend WithEvents chkIncludingMaximum As CheckBox + Friend WithEvents lblMaximum As Label + Friend WithEvents lblRangeMin As Label End Class diff --git a/instat/dlgReplace.vb b/instat/dlgReplace.vb index 851a582a2e2..fd3ff3d3c44 100644 --- a/instat/dlgReplace.vb +++ b/instat/dlgReplace.vb @@ -14,9 +14,13 @@ ' You should have received a copy of the GNU General Public License k ' along with this program. If not, see . Imports instat.Translations +Imports RDotNet + Public Class dlgReplace Public bFirstLoad As Boolean = True Dim strVarType As String + Dim clsGetDataType As New RFunction + Private Sub dlgReplace_Load(sender As Object, e As EventArgs) Handles MyBase.Load If bFirstLoad Then InitialiseDialog() @@ -31,9 +35,12 @@ Public Class dlgReplace Private Sub InitialiseDialog() ucrBaseReplace.clsRsyntax.SetFunction(frmMain.clsRLink.strInstatDataObject & "$replace_value_in_data") - 'ucrBasePCA.clsRsyntax.iCallType = 0 ucrReceiverReplace.Selector = ucrSelectorReplace + ucrReceiverReplace.SetMeAsReceiver() ucrBaseReplace.iHelpTopicID = 47 + clsGetDataType.SetRCommand(frmMain.clsRLink.strInstatDataObject & "$get_variables_metadata") + clsGetDataType.AddParameter("property", "data_type_label") + rdoFromAbove.Enabled = False End Sub Private Sub ReopenDialog() @@ -42,29 +49,26 @@ Public Class dlgReplace Private Sub SetDefaults() ucrSelectorReplace.Reset() - ucrReceiverReplace.SetMeAsReceiver() ucrSelectorReplace.Focus() rdoOldValue.Checked = True rdoNewValue.Checked = True - ucrInputOldValue.txtInput.Text = "" - ucrInputNewValue.txtInput.Text = "" - chkClosedLowerRange.Checked = True - chkClosedUpperRange.Checked = True - chkClosedLowerRange.Enabled = False - chkClosedUpperRange.Enabled = False - ucrInputRangeFro.txtInput.Text = "" - ucrInputRangeTo.txtInput.Text = "" - rdoRange.Enabled = False - lblFrom.Enabled = False - lblTo.Enabled = False - ucrInputRangeFro.Enabled = False - ucrInputRangeTo.Enabled = False + ucrInputOldValue.SetName("") + ucrInputNewValue.SetName("") + chkIncludeMinimum.Checked = True + chkIncludingMaximum.Checked = True + ucrInputRangeFrom.SetName("") + ucrInputRangeTo.SetName("") + RangeOption() TestOKEnabled() End Sub Private Sub TestOKEnabled() If (Not ucrReceiverReplace.IsEmpty()) Then - ucrBaseReplace.OKEnabled(True) + If (rdoOldValue.Checked AndAlso ucrInputOldValue.IsEmpty()) OrElse (rdoRange.Checked AndAlso ucrInputRangeFrom.IsEmpty() AndAlso ucrInputRangeTo.IsEmpty()) OrElse (rdoNewValue.Checked AndAlso ucrInputNewValue.IsEmpty()) Then + ucrBaseReplace.OKEnabled(False) + Else + ucrBaseReplace.OKEnabled(True) + End If Else ucrBaseReplace.OKEnabled(False) End If @@ -72,14 +76,16 @@ Public Class dlgReplace Private Sub CheckType() If (Not ucrReceiverReplace.IsEmpty() And ucrReceiverReplace.lstSelectedVariables.Items.Count = 1) Then - strVarType = frmMain.clsRLink.GetDataType(ucrSelectorReplace.ucrAvailableDataFrames.cboAvailableDataFrames.Text, ucrReceiverReplace.GetVariableNames(bWithQuotes:=False)) - If (strVarType = "numeric" Or strVarType = "integer" Or strVarType = "positive integer") Then + clsGetDataType.AddParameter("data_name", Chr(34) & ucrSelectorReplace.ucrAvailableDataFrames.cboAvailableDataFrames.Text & Chr(34)) + clsGetDataType.AddParameter("column", ucrReceiverReplace.GetVariableNames()) + strVarType = frmMain.clsRLink.RunInternalScriptGetValue(clsGetDataType.ToScript()).AsCharacter(0) + If (strVarType = "numeric" OrElse strVarType = "integer") Then ucrReceiverReplace.SetDataType("numeric") End If If (strVarType = "character") Then ucrReceiverReplace.SetDataType("character") End If - If (strVarType = "factor" Or strVarType = "two level factor" Or strVarType = "multilevel factor") Then + If (strVarType = "factor") Then ucrReceiverReplace.SetDataType("factor") End If If (strVarType = "logical") Then @@ -88,7 +94,8 @@ Public Class dlgReplace If (strVarType = "Date") Then ucrReceiverReplace.SetDataType("Date") End If - Else + ElseIf ucrReceiverReplace.IsEmpty() Then + strVarType = "" ucrReceiverReplace.RemoveIncludedMetadataProperty(strProperty:="class") End If End Sub @@ -112,117 +119,139 @@ Public Class dlgReplace End Sub Private Sub InputOldValue() - If (strVarType = "numeric" Or strVarType = "integer" Or strVarType = "positive integer") Then - ucrBaseReplace.clsRsyntax.AddParameter("old_value", ucrInputOldValue.GetText) - End If - If (strVarType = "character") Then - ucrBaseReplace.clsRsyntax.AddParameter("old_value", Chr(34) & ucrInputOldValue.GetText & Chr(34)) - End If - If (strVarType = "factor" Or strVarType = "two level factor" Or strVarType = "multilevel factor") Then - ucrBaseReplace.clsRsyntax.AddParameter("old_value", Chr(34) & ucrInputOldValue.GetText & Chr(34)) + If ucrInputOldValue.IsEmpty() Then + ucrBaseReplace.clsRsyntax.RemoveParameter("old_value") + Else + If (strVarType = "numeric" OrElse strVarType = "integer") Then + ucrBaseReplace.clsRsyntax.AddParameter("old_value", ucrInputOldValue.GetText) + Else + ucrBaseReplace.clsRsyntax.AddParameter("old_value", Chr(34) & ucrInputOldValue.GetText() & Chr(34)) + End If End If - 'If (strVarType = "logical") Then - - 'End If - 'If (strVarType = "Date") Then - - 'End If End Sub Private Sub InputNewValue() - If (strVarType = "numeric" Or strVarType = "integer" Or strVarType = "positive integer") Then - ucrBaseReplace.clsRsyntax.AddParameter("new_value", ucrInputNewValue.GetText) - End If - If (strVarType = "character") Then - ucrBaseReplace.clsRsyntax.AddParameter("new_value", Chr(34) & ucrInputNewValue.GetText & Chr(34)) - End If - If (strVarType = "character" or strVarType = "factor" Or strVarType = "two level factor" Or strVarType = "multilevel factor") Then - ucrBaseReplace.clsRsyntax.AddParameter("new_value", Chr(34) & ucrInputNewValue.GetText & Chr(34)) + If ucrInputNewValue.IsEmpty() Then + ucrBaseReplace.clsRsyntax.RemoveParameter("new_value") + Else + If (strVarType = "numeric" OrElse strVarType = "integer") Then + ucrBaseReplace.clsRsyntax.AddParameter("new_value", ucrInputNewValue.GetText) + Else + ucrBaseReplace.clsRsyntax.AddParameter("new_value", Chr(34) & ucrInputNewValue.GetText & Chr(34)) + End If End If - 'If (strVarType = "logical") Then - - 'End If - 'If (strVarType = "Date") Then - - 'End If End Sub Private Sub rdoOldValue_CheckedChanged(sender As Object, e As EventArgs) Handles rdoOldValue.CheckedChanged If rdoOldValue.Checked Then + ucrInputOldValue.Visible = True InputOldValue() Else ucrBaseReplace.clsRsyntax.RemoveParameter("old_value") - ucrInputOldValue.txtInput.Text = "" + ucrInputOldValue.Visible = False End If + TestOKEnabled() End Sub Private Sub rdoOldMissing_CheckedChanged(sender As Object, e As EventArgs) Handles rdoOldMissing.CheckedChanged If rdoOldMissing.Checked Then - If (strVarType = "numeric" Or strVarType = "integer" Or strVarType = "positive integer") Then - ucrBaseReplace.clsRsyntax.AddParameter("old_value", "NA") - End If - If (strVarType = "character" Or strVarType = "factor" Or strVarType = "two level factor" Or strVarType = "multilevel factor") Then - ucrBaseReplace.clsRsyntax.AddParameter("old_value", Chr(34) & "" & Chr(34)) - End If - 'If (strVarType = "logical") Then - - 'End If - 'If (strVarType = "Date") Then - - 'End If + ucrBaseReplace.clsRsyntax.AddParameter("old_value", "NA") Else ucrBaseReplace.clsRsyntax.RemoveParameter("old_value") End If + TestOKEnabled() End Sub Private Sub rdoNewValue_CheckedChanged(sender As Object, e As EventArgs) Handles rdoNewValue.CheckedChanged If rdoNewValue.Checked Then + ucrInputNewValue.Visible = True InputNewValue() Else + ucrInputNewValue.Visible = False ucrBaseReplace.clsRsyntax.RemoveParameter("new_value") - ucrInputNewValue.txtInput.Text = "" End If + TestOKEnabled() End Sub + Private Sub rdoRange_CheckedChanged(sender As Object, e As EventArgs) Handles rdoRange.CheckedChanged + RangeOption() + End Sub + + Private Sub RangeOption() If rdoRange.Checked Then - ucrBaseReplace.clsRsyntax.AddParameter("start_value", ucrInputRangeFro.GetText) - ucrBaseReplace.clsRsyntax.AddParameter("end_value", ucrInputRangeTo.GetText) - chkClosedLowerRange.Enabled = True - chkClosedUpperRange.Enabled = True + chkIncludeMinimum.Visible = True + chkIncludingMaximum.Visible = True + ucrInputRangeFrom.Visible = True + ucrInputRangeTo.Visible = True + lblMaximum.Visible = True + lblRangeMin.Visible = True + If ucrInputRangeFrom.IsEmpty() Then + ucrBaseReplace.clsRsyntax.RemoveParameter("start_value") + Else + ucrBaseReplace.clsRsyntax.AddParameter("start_value", ucrInputRangeFrom.GetText) + End If + If ucrInputRangeTo.IsEmpty() Then + ucrBaseReplace.clsRsyntax.RemoveParameter("end_value") + Else + ucrBaseReplace.clsRsyntax.AddParameter("end_value", ucrInputRangeTo.GetText) + End If Else ucrBaseReplace.clsRsyntax.RemoveParameter("start_value") ucrBaseReplace.clsRsyntax.RemoveParameter("end_value") - ucrInputRangeFro.txtInput.Text = "" - ucrInputRangeTo.txtInput.Text = "" - chkClosedLowerRange.Checked = True - chkClosedUpperRange.Checked = True - chkClosedLowerRange.Enabled = False - chkClosedUpperRange.Enabled = False + chkIncludeMinimum.Visible = False + chkIncludingMaximum.Visible = False + ucrInputRangeFrom.Visible = False + ucrInputRangeTo.Visible = False + lblMaximum.Visible = False + lblRangeMin.Visible = False End If + ClosedRangeParameters() + RangeToParameter() + RangeFromParameter() + TestOKEnabled() End Sub - Private Sub ucrInputOldValue_NameChanged() Handles ucrInputOldValue.NameChanged If rdoOldValue.Checked Then InputOldValue() Else ucrBaseReplace.clsRsyntax.RemoveParameter("old_value") End If - 'TestOKEnabled() + TestOKEnabled() End Sub - Private Sub ucrInputRangeFro_NameChanged() Handles ucrInputRangeFro.NameChanged + Private Sub ucrInputRangeFrom_NameChanged() Handles ucrInputRangeFrom.NameChanged + RangeFromParameter() + TestOKEnabled() + End Sub + + Private Sub RangeFromParameter() If rdoRange.Checked Then - ucrBaseReplace.clsRsyntax.AddParameter("start_value", ucrInputRangeFro.GetText) + If ucrInputRangeFrom.IsEmpty() Then + ucrBaseReplace.clsRsyntax.RemoveParameter("start_value") + Else + ucrBaseReplace.clsRsyntax.AddParameter("start_value", ucrInputRangeFrom.GetText) + End If + Else + ucrBaseReplace.clsRsyntax.RemoveParameter("start_value") End If - 'TestOKEnabled() End Sub Private Sub ucrInputRangeTo_NameChanged() Handles ucrInputRangeTo.NameChanged + RangeToParameter() + TestOKEnabled() + End Sub + + Private Sub RangeToParameter() If rdoRange.Checked Then - ucrBaseReplace.clsRsyntax.AddParameter("end_value", ucrInputRangeTo.GetText) + If ucrInputRangeTo.IsEmpty() Then + ucrBaseReplace.clsRsyntax.RemoveParameter("end_value") + Else + ucrBaseReplace.clsRsyntax.AddParameter("end_value", ucrInputRangeTo.GetText) + End If + Else + ucrBaseReplace.clsRsyntax.RemoveParameter("end_value") End If - 'TestOKEnabled() End Sub Private Sub ucrInputNewValue_NameChanged() Handles ucrInputNewValue.NameChanged @@ -231,56 +260,63 @@ Public Class dlgReplace Else ucrBaseReplace.clsRsyntax.RemoveParameter("new_value") End If - 'TestOKEnabled() + TestOKEnabled() End Sub - Private Sub chkClosedLowerRange_CheckedChanged(sender As Object, e As EventArgs) Handles chkClosedLowerRange.CheckedChanged - If chkClosedLowerRange.Checked Then - ucrBaseReplace.clsRsyntax.RemoveParameter("closed_start_value") - Else - ucrBaseReplace.clsRsyntax.AddParameter("closed_start_value", "FALSE") - End If + Private Sub chkClosedLowerRange_CheckedChanged(sender As Object, e As EventArgs) Handles chkIncludeMinimum.CheckedChanged + ClosedRangeParameters() + TestOKEnabled() End Sub - Private Sub chkClosedUpperRange_CheckedChanged(sender As Object, e As EventArgs) Handles chkClosedUpperRange.CheckedChanged - If chkClosedUpperRange.Checked Then - ucrBaseReplace.clsRsyntax.RemoveParameter("closed_end_value") + Private Sub chkClosedUpperRange_CheckedChanged(sender As Object, e As EventArgs) Handles chkIncludingMaximum.CheckedChanged + ClosedRangeParameters() + TestOKEnabled() + End Sub + + Private Sub ClosedRangeParameters() + If rdoRange.Checked Then + If chkIncludingMaximum.Checked Then + If frmMain.clsInstatOptions.bIncludeRDefaultParameters Then + ucrBaseReplace.clsRsyntax.AddParameter("closed_end_value", "TRUE") + Else + ucrBaseReplace.clsRsyntax.RemoveParameter("closed_end_value") + End If + Else + ucrBaseReplace.clsRsyntax.AddParameter("closed_end_value", "FALSE") + End If + + If chkIncludeMinimum.Checked Then + If frmMain.clsInstatOptions.bIncludeRDefaultParameters Then + ucrBaseReplace.clsRsyntax.AddParameter("closed_start_value", "TRUE") + Else + ucrBaseReplace.clsRsyntax.RemoveParameter("closed_start_value") + End If + Else + ucrBaseReplace.clsRsyntax.AddParameter("closed_start_value", "FALSE") + End If Else - ucrBaseReplace.clsRsyntax.AddParameter("closed_end_value", "FALSE") + ucrBaseReplace.clsRsyntax.RemoveParameter("closed_start_value") + ucrBaseReplace.clsRsyntax.RemoveParameter("closed_end_value") End If End Sub Private Sub rdoNewMissing_CheckedChanged(sender As Object, e As EventArgs) Handles rdoNewMissing.CheckedChanged If rdoNewMissing.Checked Then - If (strVarType = "numeric" Or strVarType = "integer" Or strVarType = "positive integer") Then - ucrBaseReplace.clsRsyntax.AddParameter("new_value", "NA") - End If - If (strVarType = "character" Or strVarType = "factor" Or strVarType = "two level factor" Or strVarType = "multilevel factor") Then - ucrBaseReplace.clsRsyntax.AddParameter("new_value", Chr(34) & "" & Chr(34)) - End If - 'If (strVarType = "logical") Then - - 'End If - 'If (strVarType = "Date") Then - - 'End If + ucrBaseReplace.clsRsyntax.AddParameter("new_value", "NA") Else - ucrBaseReplace.clsRsyntax.RemoveParameter("new_value") + ucrBaseReplace.clsRsyntax.RemoveParameter("new_value") End If + TestOKEnabled() End Sub + Private Sub RangeEnable() - If ((Not ucrReceiverReplace.IsEmpty()) And (strVarType = "numeric" Or strVarType = "integer" Or strVarType = "positive integer")) Then + If strVarType = "" OrElse strVarType = "numeric" OrElse strVarType = "integer" Then rdoRange.Enabled = True - lblFrom.Enabled = True - lblTo.Enabled = True - ucrInputRangeFro.Enabled = True - ucrInputRangeTo.Enabled = True Else rdoRange.Enabled = False - lblFrom.Enabled = False - lblTo.Enabled = False - ucrInputRangeFro.Enabled = False - ucrInputRangeTo.Enabled = False + If rdoRange.Checked Then + rdoOldValue.Checked = True + End If End If End Sub End Class \ No newline at end of file diff --git a/instat/dlgSummaryBarOrPieChart.vb b/instat/dlgSummaryBarOrPieChart.vb index 577ba027f6f..55d41b7df98 100644 --- a/instat/dlgSummaryBarOrPieChart.vb +++ b/instat/dlgSummaryBarOrPieChart.vb @@ -163,6 +163,7 @@ Public Class dlgSummaryBarOrPieChart End Sub Private Sub cmdOptions_Click(sender As Object, e As EventArgs) Handles cmdOptions.Click + sdgPlots.SetDataFrame(strNewDataFrame:=ucrSummarybarSelector.ucrAvailableDataFrames.cboAvailableDataFrames.Text) sdgPlots.ShowDialog() End Sub diff --git a/instat/frmEditor.vb b/instat/frmEditor.vb index a617bcdcb53..1cbcf124c3f 100644 --- a/instat/frmEditor.vb +++ b/instat/frmEditor.vb @@ -101,7 +101,7 @@ Public Class frmEditor End Sub Private Sub mnuDeleteCol_Click(sender As Object, e As EventArgs) Handles mnuDeleteCol.Click - Dim deleteCol = MsgBox("Are you sure you want to delete this column?", MessageBoxButtons.YesNo, "Delete Column") + Dim deleteCol = MsgBox("Are you sure you want to delete these column(s)?" & vbNewLine & "This action cannot be undone.", MessageBoxButtons.YesNo, "Delete Column") If deleteCol = DialogResult.Yes Then clsDeleteColumns.AddParameter("cols", SelectedColumns()) frmMain.clsRLink.RunScript(clsDeleteColumns.ToScript(), strComment:="Right click menu: Delete Column(s)") @@ -227,9 +227,12 @@ Public Class frmEditor frmMain.clsRLink.RunScript(clsInsertRows.ToScript(), strComment:="Right Click menu: Insert row(s) Before") End Sub - Private Sub mnuDeleteRows_Click(sender As Object, e As EventArgs) Handles mnuDeleteRows.Click - clsDeleteRows.AddParameter("row_names", SelectedRows()) - frmMain.clsRLink.RunScript(clsDeleteRows.ToScript(), strComment:="Right Click menu: Delete row(s)") + Private Sub mnuDeleteRows_Click(sender As Object, e As EventArgs) Handles mnuDeleteRows.Click + Dim Delete = MsgBox("Are you sure you want to delete these row(s)?" & vbNewLine & "This action cannot be undone.", MessageBoxButtons.YesNo, "Delete Row(s)") + If Delete = DialogResult.Yes Then + clsDeleteRows.AddParameter("row_names", SelectedRows()) + frmMain.clsRLink.RunScript(clsDeleteRows.ToScript(), strComment:="Right Click menu: Delete row(s)") + End If End Sub 'Private Sub resetToDefaultHeightToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles resetToDefaultHeightToolStripMenuItem.Click @@ -278,12 +281,12 @@ Public Class frmEditor End Sub Private Sub deleteSheet_Click(sender As Object, e As EventArgs) Handles deleteSheet.Click - Dim strSctipt As String - Dim Delete = MsgBox("Are you sure you want to delete this dataframe?", MessageBoxButtons.YesNo, "Delete Sheet") + Dim strScript As String + Dim Delete = MsgBox("Are you sure you want to delete this dataframe?" & vbNewLine & "This action cannot be undone.", MessageBoxButtons.YesNo, "Delete Sheet") If grdData.Worksheets.Count > 0 Then If Delete = DialogResult.Yes Then - strSctipt = frmMain.clsRLink.strInstatDataObject & "$delete_dataframe(data_name =" & Chr(34) & grdData.CurrentWorksheet.Name & Chr(34) & ")" - frmMain.clsRLink.RunScript(strSctipt) + strScript = frmMain.clsRLink.strInstatDataObject & "$delete_dataframe(data_name =" & Chr(34) & grdData.CurrentWorksheet.Name & Chr(34) & ")" + frmMain.clsRLink.RunScript(strScript) End If End If End Sub @@ -575,4 +578,18 @@ Public Class frmEditor Private Sub UnfreezeToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles UnfreezeToolStripMenuItem.Click frmMain.clsRLink.RunScript(clsUnfreezeColumns.ToScript(), strComment:="Right click menu: Freeze columns") End Sub + + Private Sub grdCurrSheet_BeforeCut(sender As Object, e As BeforeRangeOperationEventArgs) Handles grdCurrSheet.BeforeCut + e.IsCancelled = True + End Sub + + Private Sub grdCurrSheet_BeforePaste(sender As Object, e As BeforeRangeOperationEventArgs) Handles grdCurrSheet.BeforePaste + e.IsCancelled = True + End Sub + + ' Not currently working. Bug with reogrid reported here: + ' https://reogrid.net/forum/viewtopic.php?id=350 + Private Sub grdCurrSheet_BeforeRangeMove(sender As Object, e As BeforeCopyOrMoveRangeEventArgs) Handles grdCurrSheet.BeforeRangeMove + e.IsCancelled = True + End Sub End Class \ No newline at end of file diff --git a/instat/frmMain.Designer.vb b/instat/frmMain.Designer.vb index f84b9d7983d..37b8835bd9e 100644 --- a/instat/frmMain.Designer.vb +++ b/instat/frmMain.Designer.vb @@ -388,9 +388,8 @@ Partial Class frmMain ' 'mnuDescribeTwoVariablesSummarise ' - Me.mnuDescribeTwoVariablesSummarise.Enabled = False Me.mnuDescribeTwoVariablesSummarise.Name = "mnuDescribeTwoVariablesSummarise" - Me.mnuDescribeTwoVariablesSummarise.Size = New System.Drawing.Size(142, 22) + Me.mnuDescribeTwoVariablesSummarise.Size = New System.Drawing.Size(152, 22) Me.mnuDescribeTwoVariablesSummarise.Tag = "Summarise..." Me.mnuDescribeTwoVariablesSummarise.Text = "Summarise..." ' @@ -398,7 +397,7 @@ Partial Class frmMain ' Me.mnuDescribeTwoVariablesTabulate.Enabled = False Me.mnuDescribeTwoVariablesTabulate.Name = "mnuDescribeTwoVariablesTabulate" - Me.mnuDescribeTwoVariablesTabulate.Size = New System.Drawing.Size(142, 22) + Me.mnuDescribeTwoVariablesTabulate.Size = New System.Drawing.Size(152, 22) Me.mnuDescribeTwoVariablesTabulate.Tag = "Tabulate..." Me.mnuDescribeTwoVariablesTabulate.Text = "Tabulate..." ' @@ -406,7 +405,7 @@ Partial Class frmMain ' Me.mnuDescribeTwoVariablesGraph.Enabled = False Me.mnuDescribeTwoVariablesGraph.Name = "mnuDescribeTwoVariablesGraph" - Me.mnuDescribeTwoVariablesGraph.Size = New System.Drawing.Size(142, 22) + Me.mnuDescribeTwoVariablesGraph.Size = New System.Drawing.Size(152, 22) Me.mnuDescribeTwoVariablesGraph.Tag = "Graph..." Me.mnuDescribeTwoVariablesGraph.Text = "Graph..." ' @@ -414,7 +413,7 @@ Partial Class frmMain ' Me.mnuDescribeTwoVariablesCorrelate.Enabled = False Me.mnuDescribeTwoVariablesCorrelate.Name = "mnuDescribeTwoVariablesCorrelate" - Me.mnuDescribeTwoVariablesCorrelate.Size = New System.Drawing.Size(142, 22) + Me.mnuDescribeTwoVariablesCorrelate.Size = New System.Drawing.Size(152, 22) Me.mnuDescribeTwoVariablesCorrelate.Tag = "Correlate..." Me.mnuDescribeTwoVariablesCorrelate.Text = "Correlate..." ' @@ -877,28 +876,28 @@ Partial Class frmMain 'mnuModelOtherTwoVariablesTwoSamples ' Me.mnuModelOtherTwoVariablesTwoSamples.Name = "mnuModelOtherTwoVariablesTwoSamples" - Me.mnuModelOtherTwoVariablesTwoSamples.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesTwoSamples.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesTwoSamples.Tag = "Two_Samples..." Me.mnuModelOtherTwoVariablesTwoSamples.Text = "Two Samples..." ' 'mnuModelOtherTwoVariablesSummaryData ' Me.mnuModelOtherTwoVariablesSummaryData.Name = "mnuModelOtherTwoVariablesSummaryData" - Me.mnuModelOtherTwoVariablesSummaryData.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesSummaryData.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesSummaryData.Tag = "Summary_Data" Me.mnuModelOtherTwoVariablesSummaryData.Text = "Summary Data..." ' 'mnuModelOtherTwoVariablesSimpleRegression ' Me.mnuModelOtherTwoVariablesSimpleRegression.Name = "mnuModelOtherTwoVariablesSimpleRegression" - Me.mnuModelOtherTwoVariablesSimpleRegression.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesSimpleRegression.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesSimpleRegression.Tag = "Simple_Regression" Me.mnuModelOtherTwoVariablesSimpleRegression.Text = "Simple Regression..." ' 'mnuModelOtherTwoVariablesOneWayANOVA ' Me.mnuModelOtherTwoVariablesOneWayANOVA.Name = "mnuModelOtherTwoVariablesOneWayANOVA" - Me.mnuModelOtherTwoVariablesOneWayANOVA.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesOneWayANOVA.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesOneWayANOVA.Tag = "One_Way_ANOVA" Me.mnuModelOtherTwoVariablesOneWayANOVA.Text = "One Way ANOVA..." ' @@ -906,14 +905,14 @@ Partial Class frmMain ' Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Enabled = False Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Name = "mnuModelOtherTwoVariablesNonParametricTwoSamples" - Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Tag = "Non_Parameteric_Two_Samples" Me.mnuModelOtherTwoVariablesNonParametricTwoSamples.Text = "Non Parametric Two Samples..." ' 'mnuModelOtherTwoVariablesNonParametricOneWayANOVA ' Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Name = "mnuModelOtherTwoVariablesNonParametricOneWayANOVA" - Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Size = New System.Drawing.Size(267, 22) + Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Size = New System.Drawing.Size(266, 22) Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Tag = "Non_Parameteric_One_Way_ANOVA..." Me.mnuModelOtherTwoVariablesNonParametricOneWayANOVA.Text = "Non Parameteric One Way ANOVA..." ' @@ -929,21 +928,21 @@ Partial Class frmMain ' Me.mnuModelOtherThreeVariablesSimpleWithGroups.Enabled = False Me.mnuModelOtherThreeVariablesSimpleWithGroups.Name = "mnuModelOtherThreeVariablesSimpleWithGroups" - Me.mnuModelOtherThreeVariablesSimpleWithGroups.Size = New System.Drawing.Size(262, 22) + Me.mnuModelOtherThreeVariablesSimpleWithGroups.Size = New System.Drawing.Size(260, 22) Me.mnuModelOtherThreeVariablesSimpleWithGroups.Tag = "Simple_with_groups" Me.mnuModelOtherThreeVariablesSimpleWithGroups.Text = "Simple With Groups..." ' 'mnuModelOtherThreeVariablesNonParametricTwoWayANOVA ' Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Name = "mnuModelOtherThreeVariablesNonParametricTwoWayANOVA" - Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Size = New System.Drawing.Size(262, 22) + Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Size = New System.Drawing.Size(260, 22) Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Tag = "Non_Parametric_Two_Way_ANOVA..." Me.mnuModelOtherThreeVariablesNonParametricTwoWayANOVA.Text = "Non Parametric Two Way ANOVA..." ' 'mnuModelOtherThreeVariablesChisquareTest ' Me.mnuModelOtherThreeVariablesChisquareTest.Name = "mnuModelOtherThreeVariablesChisquareTest" - Me.mnuModelOtherThreeVariablesChisquareTest.Size = New System.Drawing.Size(262, 22) + Me.mnuModelOtherThreeVariablesChisquareTest.Size = New System.Drawing.Size(260, 22) Me.mnuModelOtherThreeVariablesChisquareTest.Tag = "Chi-square_Test" Me.mnuModelOtherThreeVariablesChisquareTest.Text = "Chi-square Test..." ' @@ -958,21 +957,21 @@ Partial Class frmMain 'mnuModelOtherGeneralANOVAGeneral ' Me.mnuModelOtherGeneralANOVAGeneral.Name = "mnuModelOtherGeneralANOVAGeneral" - Me.mnuModelOtherGeneralANOVAGeneral.Size = New System.Drawing.Size(167, 22) + Me.mnuModelOtherGeneralANOVAGeneral.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherGeneralANOVAGeneral.Tag = "ANOVA_General..." Me.mnuModelOtherGeneralANOVAGeneral.Text = "ANOVA General..." ' 'mnuModelOtherGeneralRegression ' Me.mnuModelOtherGeneralRegression.Name = "mnuModelOtherGeneralRegression" - Me.mnuModelOtherGeneralRegression.Size = New System.Drawing.Size(167, 22) + Me.mnuModelOtherGeneralRegression.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherGeneralRegression.Tag = "Regression" Me.mnuModelOtherGeneralRegression.Text = "Regression..." ' 'mnuModelOtherGeneralLogLinear ' Me.mnuModelOtherGeneralLogLinear.Name = "mnuModelOtherGeneralLogLinear" - Me.mnuModelOtherGeneralLogLinear.Size = New System.Drawing.Size(167, 22) + Me.mnuModelOtherGeneralLogLinear.Size = New System.Drawing.Size(166, 22) Me.mnuModelOtherGeneralLogLinear.Tag = "Log_Linear" Me.mnuModelOtherGeneralLogLinear.Text = "Log Linear..." ' @@ -1780,7 +1779,6 @@ Partial Class frmMain ' 'mnuOrganiseDataFrameReplaceValues ' - Me.mnuOrganiseDataFrameReplaceValues.Enabled = False Me.mnuOrganiseDataFrameReplaceValues.Name = "mnuOrganiseDataFrameReplaceValues" Me.mnuOrganiseDataFrameReplaceValues.Size = New System.Drawing.Size(200, 22) Me.mnuOrganiseDataFrameReplaceValues.Tag = "Replace_Values..." @@ -2078,6 +2076,7 @@ Partial Class frmMain ' 'mnuOrganiseColumnTextFindReplace ' + Me.mnuOrganiseColumnTextFindReplace.Enabled = False Me.mnuOrganiseColumnTextFindReplace.Name = "mnuOrganiseColumnTextFindReplace" Me.mnuOrganiseColumnTextFindReplace.Size = New System.Drawing.Size(152, 22) Me.mnuOrganiseColumnTextFindReplace.Tag = "Find/Replace..." @@ -2631,7 +2630,7 @@ Partial Class frmMain ' Me.mnuTools.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.mnuToolsRunRCode, Me.mnuToolsRestartR, Me.mnuToolsCheckForUpdates, Me.mnuToolsClearOutputWindow, Me.ToolStripSeparator5, Me.mnuToolsSaveCurrentOptions, Me.mnuToolsLoadOptions, Me.mnuToolsOptions}) Me.mnuTools.Name = "mnuTools" - Me.mnuTools.Size = New System.Drawing.Size(48, 20) + Me.mnuTools.Size = New System.Drawing.Size(47, 20) Me.mnuTools.Text = "Tools" ' 'mnuToolsRunRCode diff --git a/instat/frmMain.vb b/instat/frmMain.vb index 29345faf695..057f50c19c8 100644 --- a/instat/frmMain.vb +++ b/instat/frmMain.vb @@ -971,7 +971,7 @@ Public Class frmMain Private Sub ColourByPropertyToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles ColourByPropertyToolStripMenuItem.Click 'TODO change this dialog ' dlgMetadata should be separate - dlgMetadata.ShowDialog() + dlgColourbyProperty.ShowDialog() End Sub Private Sub mnuViewCascade_Click(sender As Object, e As EventArgs) Handles mnuViewCascade.Click @@ -987,7 +987,7 @@ Public Class frmMain End Sub Private Sub mnuOrganiseColumnTextFindReplace_Click(sender As Object, e As EventArgs) Handles mnuOrganiseColumnTextFindReplace.Click - dlgReplace.ShowDialog() + 'dlgReplace.ShowDialog() End Sub Private Sub mnuDescribeOneVariableSummarise_Click(sender As Object, e As EventArgs) Handles mnuDescribeOneVariableSummarise.Click @@ -1010,4 +1010,8 @@ Public Class frmMain Private Sub mnuOrganiseDataFrameReplaceValues_Click(sender As Object, e As EventArgs) Handles mnuOrganiseDataFrameReplaceValues.Click dlgReplace.ShowDialog() End Sub + + Private Sub mnuDescribeTwoVariablesSummarise_Click(sender As Object, e As EventArgs) Handles mnuDescribeTwoVariablesSummarise.Click + dlgDescribeTwoVariable.ShowDialog() + End Sub End Class diff --git a/instat/instat.vbproj b/instat/instat.vbproj index a32af80c947..4c0379fb7e9 100644 --- a/instat/instat.vbproj +++ b/instat/instat.vbproj @@ -135,6 +135,12 @@ + + dlgDescribeTwoVariable.vb + + + Form + ucrAxes.vb @@ -237,6 +243,12 @@ Form + + dlgColourbyProperty.vb + + + Form + dlgColumnMetadata.vb @@ -1846,6 +1858,15 @@ dlgCliPlot.vb + + dlgColourbyProperty.vb + + + dlgColourbyProperty.vb + + + dlgColourbyProperty.vb + dlgColumnMetadata.vb @@ -1945,6 +1966,15 @@ dlgDeleteSheet.vb + + dlgDescribeTwoVariable.vb + + + dlgDescribeTwoVariable.vb + + + dlgDescribeTwoVariable.vb + dlgDistanceText.vb diff --git a/instat/sdgDescribe.Designer.vb b/instat/sdgDescribe.Designer.vb index ea48584de84..376f7d3bab7 100644 --- a/instat/sdgDescribe.Designer.vb +++ b/instat/sdgDescribe.Designer.vb @@ -1,9 +1,9 @@ - _ + Partial Class sdgDescribe 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 @@ -20,31 +20,426 @@ Partial Class sdgDescribe '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.UcrButtonsSubdialogue1 = New instat.ucrButtonsSubdialogue() + Me.chkN = New System.Windows.Forms.CheckBox() + Me.chkNMissing = New System.Windows.Forms.CheckBox() + Me.chkNTotal = New System.Windows.Forms.CheckBox() + Me.chkMinimum = New System.Windows.Forms.CheckBox() + Me.chkMaximum = New System.Windows.Forms.CheckBox() + Me.chkRange = New System.Windows.Forms.CheckBox() + Me.chkMean = New System.Windows.Forms.CheckBox() + Me.chkMedian = New System.Windows.Forms.CheckBox() + Me.chkQuartiles = New System.Windows.Forms.CheckBox() + Me.chkHigherMoments = New System.Windows.Forms.CheckBox() + Me.chkSumSquares = New System.Windows.Forms.CheckBox() + Me.chkMeanDeviation = New System.Windows.Forms.CheckBox() + Me.chkStdDev = New System.Windows.Forms.CheckBox() + Me.chkGeometricMean = New System.Windows.Forms.CheckBox() + Me.ChkCoeffVariations = New System.Windows.Forms.CheckBox() + Me.grpPecents = New System.Windows.Forms.GroupBox() + Me.ucrInputProportions = New instat.ucrInputComboBox() + Me.ucrInputInequality = New instat.ucrInputComboBox() + Me.ucrInputPercentiles = New instat.ucrInputComboBox() + Me.chkPercentiles = New System.Windows.Forms.CheckBox() + Me.chkProportions = New System.Windows.Forms.CheckBox() + Me.chkResults = New System.Windows.Forms.CheckBox() + Me.grpPrecision = New System.Windows.Forms.GroupBox() + Me.ucrInputUnits = New instat.ucrInputComboBox() + Me.ucrInputPrecision = New instat.ucrInputComboBox() + Me.lblUnits = New System.Windows.Forms.Label() + Me.lblPrecision = New System.Windows.Forms.Label() + Me.rdoSignificantFigures = New System.Windows.Forms.RadioButton() + Me.rdoDecimals = New System.Windows.Forms.RadioButton() + Me.grpPecents.SuspendLayout() + Me.grpPrecision.SuspendLayout() Me.SuspendLayout() ' 'UcrButtonsSubdialogue1 ' - Me.UcrButtonsSubdialogue1.Location = New System.Drawing.Point(42, 222) + Me.UcrButtonsSubdialogue1.Location = New System.Drawing.Point(103, 297) Me.UcrButtonsSubdialogue1.Name = "UcrButtonsSubdialogue1" Me.UcrButtonsSubdialogue1.Size = New System.Drawing.Size(142, 30) Me.UcrButtonsSubdialogue1.TabIndex = 0 ' + 'chkN + ' + Me.chkN.AutoSize = True + Me.chkN.Location = New System.Drawing.Point(12, 9) + Me.chkN.Name = "chkN" + Me.chkN.Size = New System.Drawing.Size(34, 17) + Me.chkN.TabIndex = 1 + Me.chkN.Tag = "N" + Me.chkN.Text = "N" + Me.chkN.UseVisualStyleBackColor = True + ' + 'chkNMissing + ' + Me.chkNMissing.AutoSize = True + Me.chkNMissing.Location = New System.Drawing.Point(12, 31) + Me.chkNMissing.Name = "chkNMissing" + Me.chkNMissing.Size = New System.Drawing.Size(72, 17) + Me.chkNMissing.TabIndex = 2 + Me.chkNMissing.Tag = "N_Missing" + Me.chkNMissing.Text = "N Missing" + Me.chkNMissing.UseVisualStyleBackColor = True + ' + 'chkNTotal + ' + Me.chkNTotal.AutoSize = True + Me.chkNTotal.Location = New System.Drawing.Point(12, 53) + Me.chkNTotal.Name = "chkNTotal" + Me.chkNTotal.Size = New System.Drawing.Size(61, 17) + Me.chkNTotal.TabIndex = 3 + Me.chkNTotal.Tag = "N_Total" + Me.chkNTotal.Text = "N Total" + Me.chkNTotal.UseVisualStyleBackColor = True + ' + 'chkMinimum + ' + Me.chkMinimum.AutoSize = True + Me.chkMinimum.Location = New System.Drawing.Point(12, 75) + Me.chkMinimum.Name = "chkMinimum" + Me.chkMinimum.Size = New System.Drawing.Size(67, 17) + Me.chkMinimum.TabIndex = 4 + Me.chkMinimum.Tag = "Minimum" + Me.chkMinimum.Text = "Minimum" + Me.chkMinimum.UseVisualStyleBackColor = True + ' + 'chkMaximum + ' + Me.chkMaximum.AutoSize = True + Me.chkMaximum.Location = New System.Drawing.Point(12, 97) + Me.chkMaximum.Name = "chkMaximum" + Me.chkMaximum.Size = New System.Drawing.Size(70, 17) + Me.chkMaximum.TabIndex = 5 + Me.chkMaximum.Tag = "Maximum" + Me.chkMaximum.Text = "Maximum" + Me.chkMaximum.UseVisualStyleBackColor = True + ' + 'chkRange + ' + Me.chkRange.AutoSize = True + Me.chkRange.Location = New System.Drawing.Point(12, 119) + Me.chkRange.Name = "chkRange" + Me.chkRange.Size = New System.Drawing.Size(58, 17) + Me.chkRange.TabIndex = 6 + Me.chkRange.Tag = "Range" + Me.chkRange.Text = "Range" + Me.chkRange.UseVisualStyleBackColor = True + ' + 'chkMean + ' + Me.chkMean.AutoSize = True + Me.chkMean.Location = New System.Drawing.Point(12, 141) + Me.chkMean.Name = "chkMean" + Me.chkMean.Size = New System.Drawing.Size(53, 17) + Me.chkMean.TabIndex = 7 + Me.chkMean.Tag = "Mean" + Me.chkMean.Text = "Mean" + Me.chkMean.UseVisualStyleBackColor = True + ' + 'chkMedian + ' + Me.chkMedian.AutoSize = True + Me.chkMedian.Location = New System.Drawing.Point(172, 7) + Me.chkMedian.Name = "chkMedian" + Me.chkMedian.Size = New System.Drawing.Size(61, 17) + Me.chkMedian.TabIndex = 8 + Me.chkMedian.Tag = "Median" + Me.chkMedian.Text = "Median" + Me.chkMedian.UseVisualStyleBackColor = True + ' + 'chkQuartiles + ' + Me.chkQuartiles.AutoSize = True + Me.chkQuartiles.Location = New System.Drawing.Point(172, 31) + Me.chkQuartiles.Name = "chkQuartiles" + Me.chkQuartiles.Size = New System.Drawing.Size(67, 17) + Me.chkQuartiles.TabIndex = 9 + Me.chkQuartiles.Tag = "Quartiles" + Me.chkQuartiles.Text = "Quartiles" + Me.chkQuartiles.UseVisualStyleBackColor = True + ' + 'chkHigherMoments + ' + Me.chkHigherMoments.AutoSize = True + Me.chkHigherMoments.Location = New System.Drawing.Point(172, 55) + Me.chkHigherMoments.Name = "chkHigherMoments" + Me.chkHigherMoments.Size = New System.Drawing.Size(103, 17) + Me.chkHigherMoments.TabIndex = 10 + Me.chkHigherMoments.Tag = "Higher_Moments" + Me.chkHigherMoments.Text = "Higher Moments" + Me.chkHigherMoments.UseVisualStyleBackColor = True + ' + 'chkSumSquares + ' + Me.chkSumSquares.AutoSize = True + Me.chkSumSquares.Location = New System.Drawing.Point(172, 79) + Me.chkSumSquares.Name = "chkSumSquares" + Me.chkSumSquares.Size = New System.Drawing.Size(99, 17) + Me.chkSumSquares.TabIndex = 11 + Me.chkSumSquares.Tag = "Sum_of_squares" + Me.chkSumSquares.Text = "Sum of squares" + Me.chkSumSquares.UseVisualStyleBackColor = True + ' + 'chkMeanDeviation + ' + Me.chkMeanDeviation.AutoSize = True + Me.chkMeanDeviation.Location = New System.Drawing.Point(172, 103) + Me.chkMeanDeviation.Name = "chkMeanDeviation" + Me.chkMeanDeviation.Size = New System.Drawing.Size(101, 17) + Me.chkMeanDeviation.TabIndex = 12 + Me.chkMeanDeviation.Tag = "Mean_Deviation" + Me.chkMeanDeviation.Text = "Mean Deviation" + Me.chkMeanDeviation.UseVisualStyleBackColor = True + ' + 'chkStdDev + ' + Me.chkStdDev.AutoSize = True + Me.chkStdDev.Location = New System.Drawing.Point(12, 163) + Me.chkStdDev.Name = "chkStdDev" + Me.chkStdDev.Size = New System.Drawing.Size(117, 17) + Me.chkStdDev.TabIndex = 13 + Me.chkStdDev.Tag = "Standard_Deviation" + Me.chkStdDev.Text = "Standard Deviation" + Me.chkStdDev.UseVisualStyleBackColor = True + ' + 'chkGeometricMean + ' + Me.chkGeometricMean.AutoSize = True + Me.chkGeometricMean.Location = New System.Drawing.Point(172, 127) + Me.chkGeometricMean.Name = "chkGeometricMean" + Me.chkGeometricMean.Size = New System.Drawing.Size(104, 17) + Me.chkGeometricMean.TabIndex = 14 + Me.chkGeometricMean.Tag = "Geometric_Mean" + Me.chkGeometricMean.Text = "Geometric Mean" + Me.chkGeometricMean.UseVisualStyleBackColor = True + ' + 'ChkCoeffVariations + ' + Me.ChkCoeffVariations.AutoSize = True + Me.ChkCoeffVariations.Location = New System.Drawing.Point(172, 151) + Me.ChkCoeffVariations.Name = "ChkCoeffVariations" + Me.ChkCoeffVariations.Size = New System.Drawing.Size(137, 17) + Me.ChkCoeffVariations.TabIndex = 15 + Me.ChkCoeffVariations.Tag = "Coefficient_of_Variations" + Me.ChkCoeffVariations.Text = "Coefficient of Variations" + Me.ChkCoeffVariations.UseVisualStyleBackColor = True + ' + 'grpPecents + ' + Me.grpPecents.Controls.Add(Me.ucrInputProportions) + Me.grpPecents.Controls.Add(Me.ucrInputInequality) + Me.grpPecents.Controls.Add(Me.ucrInputPercentiles) + Me.grpPecents.Controls.Add(Me.chkPercentiles) + Me.grpPecents.Controls.Add(Me.chkProportions) + Me.grpPecents.Controls.Add(Me.chkResults) + Me.grpPecents.Location = New System.Drawing.Point(11, 185) + Me.grpPecents.Name = "grpPecents" + Me.grpPecents.Size = New System.Drawing.Size(185, 109) + Me.grpPecents.TabIndex = 16 + Me.grpPecents.TabStop = False + ' + 'ucrInputProportions + ' + Me.ucrInputProportions.IsReadOnly = False + Me.ucrInputProportions.Location = New System.Drawing.Point(118, 53) + Me.ucrInputProportions.Name = "ucrInputProportions" + Me.ucrInputProportions.Size = New System.Drawing.Size(50, 21) + Me.ucrInputProportions.TabIndex = 23 + ' + 'ucrInputInequality + ' + Me.ucrInputInequality.IsReadOnly = False + Me.ucrInputInequality.Location = New System.Drawing.Point(85, 53) + Me.ucrInputInequality.Name = "ucrInputInequality" + Me.ucrInputInequality.Size = New System.Drawing.Size(28, 21) + Me.ucrInputInequality.TabIndex = 22 + ' + 'ucrInputPercentiles + ' + Me.ucrInputPercentiles.IsReadOnly = False + Me.ucrInputPercentiles.Location = New System.Drawing.Point(88, 16) + Me.ucrInputPercentiles.Name = "ucrInputPercentiles" + Me.ucrInputPercentiles.Size = New System.Drawing.Size(84, 21) + Me.ucrInputPercentiles.TabIndex = 21 + ' + 'chkPercentiles + ' + Me.chkPercentiles.AutoSize = True + Me.chkPercentiles.Location = New System.Drawing.Point(7, 19) + Me.chkPercentiles.Name = "chkPercentiles" + Me.chkPercentiles.Size = New System.Drawing.Size(78, 17) + Me.chkPercentiles.TabIndex = 18 + Me.chkPercentiles.Tag = "Percentiles" + Me.chkPercentiles.Text = "Percentiles" + Me.chkPercentiles.UseVisualStyleBackColor = True + ' + 'chkProportions + ' + Me.chkProportions.AutoSize = True + Me.chkProportions.Location = New System.Drawing.Point(7, 53) + Me.chkProportions.Name = "chkProportions" + Me.chkProportions.Size = New System.Drawing.Size(79, 17) + Me.chkProportions.TabIndex = 19 + Me.chkProportions.Tag = "Proportions" + Me.chkProportions.Text = "Proportions" + Me.chkProportions.UseVisualStyleBackColor = True + ' + 'chkResults + ' + Me.chkResults.AutoSize = True + Me.chkResults.Location = New System.Drawing.Point(75, 84) + Me.chkResults.Name = "chkResults" + Me.chkResults.Size = New System.Drawing.Size(86, 17) + Me.chkResults.TabIndex = 20 + Me.chkResults.Tag = "Results_as_%" + Me.chkResults.Text = "Results as %" + Me.chkResults.UseVisualStyleBackColor = True + ' + 'grpPrecision + ' + Me.grpPrecision.Controls.Add(Me.ucrInputUnits) + Me.grpPrecision.Controls.Add(Me.ucrInputPrecision) + Me.grpPrecision.Controls.Add(Me.lblUnits) + Me.grpPrecision.Controls.Add(Me.lblPrecision) + Me.grpPrecision.Controls.Add(Me.rdoSignificantFigures) + Me.grpPrecision.Controls.Add(Me.rdoDecimals) + Me.grpPrecision.Location = New System.Drawing.Point(198, 185) + Me.grpPrecision.Name = "grpPrecision" + Me.grpPrecision.Size = New System.Drawing.Size(161, 109) + Me.grpPrecision.TabIndex = 17 + Me.grpPrecision.TabStop = False + ' + 'ucrInputUnits + ' + Me.ucrInputUnits.IsReadOnly = False + Me.ucrInputUnits.Location = New System.Drawing.Point(43, 70) + Me.ucrInputUnits.Name = "ucrInputUnits" + Me.ucrInputUnits.Size = New System.Drawing.Size(43, 21) + Me.ucrInputUnits.TabIndex = 23 + ' + 'ucrInputPrecision + ' + Me.ucrInputPrecision.IsReadOnly = False + Me.ucrInputPrecision.Location = New System.Drawing.Point(60, 15) + Me.ucrInputPrecision.Name = "ucrInputPrecision" + Me.ucrInputPrecision.Size = New System.Drawing.Size(58, 21) + Me.ucrInputPrecision.TabIndex = 22 + ' + 'lblUnits + ' + Me.lblUnits.AccessibleDescription = "" + Me.lblUnits.AutoSize = True + Me.lblUnits.Location = New System.Drawing.Point(6, 73) + Me.lblUnits.Name = "lblUnits" + Me.lblUnits.Size = New System.Drawing.Size(31, 13) + Me.lblUnits.TabIndex = 3 + Me.lblUnits.Tag = "Units" + Me.lblUnits.Text = "Units" + ' + 'lblPrecision + ' + Me.lblPrecision.AccessibleDescription = "v" + Me.lblPrecision.AutoSize = True + Me.lblPrecision.Location = New System.Drawing.Point(6, 16) + Me.lblPrecision.Name = "lblPrecision" + Me.lblPrecision.Size = New System.Drawing.Size(50, 13) + Me.lblPrecision.TabIndex = 2 + Me.lblPrecision.Tag = "Precision" + Me.lblPrecision.Text = "Precision" + ' + 'rdoSignificantFigures + ' + Me.rdoSignificantFigures.AutoSize = True + Me.rdoSignificantFigures.Location = New System.Drawing.Point(71, 47) + Me.rdoSignificantFigures.Name = "rdoSignificantFigures" + Me.rdoSignificantFigures.Size = New System.Drawing.Size(80, 17) + Me.rdoSignificantFigures.TabIndex = 1 + Me.rdoSignificantFigures.TabStop = True + Me.rdoSignificantFigures.Tag = "Sig_Figures" + Me.rdoSignificantFigures.Text = "Sig. Figures" + Me.rdoSignificantFigures.UseVisualStyleBackColor = True + ' + 'rdoDecimals + ' + Me.rdoDecimals.AutoSize = True + Me.rdoDecimals.Location = New System.Drawing.Point(4, 47) + Me.rdoDecimals.Name = "rdoDecimals" + Me.rdoDecimals.Size = New System.Drawing.Size(68, 17) + Me.rdoDecimals.TabIndex = 0 + Me.rdoDecimals.TabStop = True + Me.rdoDecimals.Tag = "Decimals" + Me.rdoDecimals.Text = "Decimals" + Me.rdoDecimals.UseVisualStyleBackColor = True + ' 'sdgDescribe ' 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.ClientSize = New System.Drawing.Size(364, 332) + Me.Controls.Add(Me.grpPrecision) + Me.Controls.Add(Me.grpPecents) + Me.Controls.Add(Me.ChkCoeffVariations) + Me.Controls.Add(Me.chkGeometricMean) + Me.Controls.Add(Me.chkMeanDeviation) + Me.Controls.Add(Me.chkSumSquares) + Me.Controls.Add(Me.chkHigherMoments) + Me.Controls.Add(Me.chkQuartiles) + Me.Controls.Add(Me.chkMedian) + Me.Controls.Add(Me.chkStdDev) + Me.Controls.Add(Me.chkMean) + Me.Controls.Add(Me.chkRange) + Me.Controls.Add(Me.chkMaximum) + Me.Controls.Add(Me.chkMinimum) + Me.Controls.Add(Me.chkNTotal) + Me.Controls.Add(Me.chkNMissing) + Me.Controls.Add(Me.chkN) Me.Controls.Add(Me.UcrButtonsSubdialogue1) Me.MaximizeBox = False Me.MinimizeBox = False Me.Name = "sdgDescribe" Me.Text = "sdgDescribe" + Me.grpPecents.ResumeLayout(False) + Me.grpPecents.PerformLayout() + Me.grpPrecision.ResumeLayout(False) + Me.grpPrecision.PerformLayout() Me.ResumeLayout(False) + Me.PerformLayout() End Sub Friend WithEvents UcrButtonsSubdialogue1 As ucrButtonsSubdialogue + Friend WithEvents chkN As CheckBox + Friend WithEvents chkNMissing As CheckBox + Friend WithEvents chkNTotal As CheckBox + Friend WithEvents chkMinimum As CheckBox + Friend WithEvents chkMaximum As CheckBox + Friend WithEvents chkRange As CheckBox + Friend WithEvents chkMean As CheckBox + Friend WithEvents chkMedian As CheckBox + Friend WithEvents chkQuartiles As CheckBox + Friend WithEvents chkHigherMoments As CheckBox + Friend WithEvents chkSumSquares As CheckBox + Friend WithEvents chkMeanDeviation As CheckBox + Friend WithEvents chkStdDev As CheckBox + Friend WithEvents chkGeometricMean As CheckBox + Friend WithEvents ChkCoeffVariations As CheckBox + Friend WithEvents grpPecents As GroupBox + Friend WithEvents grpPrecision As GroupBox + Friend WithEvents ucrInputProportions As ucrInputComboBox + Friend WithEvents ucrInputInequality As ucrInputComboBox + Friend WithEvents ucrInputPercentiles As ucrInputComboBox + Friend WithEvents chkPercentiles As CheckBox + Friend WithEvents chkProportions As CheckBox + Friend WithEvents chkResults As CheckBox + Friend WithEvents ucrInputUnits As ucrInputComboBox + Friend WithEvents ucrInputPrecision As ucrInputComboBox + Friend WithEvents lblUnits As Label + Friend WithEvents lblPrecision As Label + Friend WithEvents rdoSignificantFigures As RadioButton + Friend WithEvents rdoDecimals As RadioButton End Class + diff --git a/instat/sdgDescribe.vb b/instat/sdgDescribe.vb index 4f2373f73fe..b14e95696c2 100644 --- a/instat/sdgDescribe.vb +++ b/instat/sdgDescribe.vb @@ -18,4 +18,14 @@ Public Class sdgDescribe Private Sub sdgDescribe_Load(sender As Object, e As EventArgs) Handles MyBase.Load autoTranslate(Me) End Sub + + Public Sub SetDefaults() + chkMean.Checked = True + chkStdDev.Checked = True + chkMinimum.Checked = True + chkMaximum.Checked = True + chkNMissing.Checked = True + chkN.Checked = True + chkNTotal.Checked = True + End Sub End Class \ No newline at end of file diff --git a/instat/sdgPlots.vb b/instat/sdgPlots.vb index a9225bec550..d3ae3d5d8e4 100644 --- a/instat/sdgPlots.vb +++ b/instat/sdgPlots.vb @@ -69,6 +69,14 @@ Public Class sdgPlots clsRggplotFunction = clsGgplotFunc End Sub + Public Sub me_me() Handles tabctrlBoxSubdialog.TabIndexChanged + If tabctrlBoxSubdialog.SelectedTab Is tbpXAxis Then + ucrXAxis.bIsX = True + ElseIf tabctrlBoxSubdialog.SelectedTab Is tbpYAxis Then + ucrYAxis.bIsX = False + End If + End Sub + Private Sub Themes() ucrInputThemes.cboInput.Items.AddRange({"default", "theme_bw", "theme_linedraw", "theme_light", "theme_minimal", "theme_classic", "theme_dark", "theme_void", "theme_base", "theme_calc", "theme_economist", "theme_few", "theme_fivethirtyeight", "theme_foundation", "theme_gdocs", "theme_igray", "theme_map", "theme_par", "theme_solarized", "theme_hc", "theme_pander", "theme_solid", "theme_stata", "theme_tufte", "theme_wsj"}) cmdAllOptions.Enabled = False @@ -285,7 +293,6 @@ Public Class sdgPlots Public Sub SetRsyntaxAxis(clsRsyntaxAxis As RSyntax) clsRsyntax = clsRsyntaxAxis End Sub - Private Sub ucrInputGraphTitle_NameChanged() Handles ucrInputGraphTitle.NameChanged If Not ucrInputGraphTitle.IsEmpty Then clsGraphTitleFunction.SetRCommand("ggtitle") diff --git a/instat/static/InstatObject/R/data_object_R6.R b/instat/static/InstatObject/R/data_object_R6.R index ea601a0fa61..4a653864821 100644 --- a/instat/static/InstatObject/R/data_object_R6.R +++ b/instat/static/InstatObject/R/data_object_R6.R @@ -193,7 +193,7 @@ data_object$set("public", "update_variables_metadata", function() { #} for(col in colnames(private$data)) { if(!self$is_variables_metadata(display_decimal_label, col)) self$append_to_variables_metadata(col, display_decimal_label, get_default_decimal_places(private$data[[col]])) - if(!self$is_variables_metadata(data_type_label, col)) self$append_to_variables_metadata(col, data_type_label, class(private$data[[col]])) + #self$append_to_variables_metadata(col, data_type_label, class(private$data[[col]])) self$append_to_variables_metadata(col, name_label, col) } self$append_to_changes(list(Set_property, "variables_metadata")) @@ -232,7 +232,7 @@ data_object$set("public", "get_data_frame", function(convert_to_character = FALS } ) -data_object$set("public", "get_variables_metadata", function(data_type = "all", convert_to_character = FALSE, property, column, error_if_no_property = TRUE, update = FALSE, direct_from_attributes = FALSE) { +data_object$set("public", "get_variables_metadata", function(data_type = "all", convert_to_character = FALSE, property, column, error_if_no_property = TRUE, update = TRUE, direct_from_attributes = FALSE) { if(update) self$update_variables_metadata() if(direct_from_attributes) { if(missing(property)) return(attributes(private$data[[column]])) @@ -248,10 +248,10 @@ data_object$set("public", "get_variables_metadata", function(data_type = "all", for(att_name in names(col_attributes)) { if(length(col_attributes[[att_name]]) > 1) col_attributes[[att_name]] <- paste(as.character(col_attributes[[att_name]]), collapse = ",") } - if(is.null(col_attributes)) { - col_attributes <- data.frame(class = NA) - } - #if(names(private$data)[i] == "summary_max_Field") print(col_attributes) + col_attributes[[data_type_label]] <- class(col) + #if(is.null(col_attributes)) { + # col_attributes <- data.frame(class = NA) + #} out[[i]] <- col_attributes i = i + 1 } @@ -481,21 +481,39 @@ data_object$set("public", "replace_value_in_data", function(col_names, rows, old if(!missing(rows) && !all(rows %in% row.names(private$data))) stop("Not all rows found in the data.") if(!is.na(start_value) && !is.numeric(start_value)) stop("start_value must be numeric") if(!is.na(end_value) && !is.numeric(end_value)) stop("start_value must be numeric") - if(!is.na(start_value) && !is.na(end_value) && start_value > end_value) { - stop("start_value must be less than or equal to end_value") - } + data_row_names <- row.names(self$get_data_frame(use_current_filter = FALSE)) + filter_applied <- self$filter_applied() + if(filter_applied) curr_filter <- self$current_filter for(col_name in col_names) { + done = FALSE str_data_type <- self$get_variables_metadata(property = data_type_label, column = col_name) + curr_column <- self$get_columns_from_data(col_name, use_current_filter = FALSE) if(str_data_type == "factor") { - self$edit_factor_level(col_name = col_name, old_level = old_value, new_level = new_value) + if(!missing(rows)) { + if(!is.na(new_value) && !new_value %in% levels(private$data[[col_name]])) { + stop("new_value must be an existing level of the factor column.") + } + replace_rows <- (data_row_names %in% rows) + } + else { + if(filter_applied) stop("Cannot replace values in a factor column when a filter is applied. Remove the filter to do this replacement.") + if(is.na(old_value)) { + if(!new_value %in% levels(private$data[[col_name]])) stop(new_value, " is not a level of this factor. Add this as a level of the factor before using replace.") + replace_rows <- (is.na(curr_column)) + } + else { + self$edit_factor_level(col_name = col_name, old_level = old_value, new_level = new_value) + done = TRUE + } + } } else if(str_data_type == "integer" || str_data_type == "numeric") { if(!is.na(new_value)) { - if(str_data_type == "integer" && !(as.integer(new_value) %% 1 == 0)) stop(col_name, " is an integer column. new_value must be an integer") - if(str_data_type == "numeric" && !is.numeric(as.numeric(new_value))) stop(col_name, " is a numeric column. new_value must be numeric") + if(!is.numeric(new_value)) stop(col_name, " is a numeric/integer column. new_value must be of the same type") + if(str_data_type == "integer" && !(new_value %% 1 == 0)) stop(col_name, " is an integer column. new_value must be an integer") } if(!missing(rows)) { - replace_rows <- (row.names(private$data) %in% rows) + replace_rows <- (data_row_names %in% rows) if(!missing(old_value) || !is.na(start_value) || !is.na(end_value)) warning("old_value, start_value and end_value will be ignored because rows has been specified.") } else { @@ -507,54 +525,66 @@ data_object$set("public", "replace_value_in_data", function(col_names, rows, old else end_value_ineq = match.fun("<") if(!is.na(start_value) && is.na(end_value)) { - replace_rows <- start_value_ineq(private$data[[col_name]], start_value) + replace_rows <- start_value_ineq(curr_column, start_value) } else if(is.na(start_value) && !is.na(end_value)) { - replace_rows <- end_value_ineq(private$data[[col_name]], end_value) + replace_rows <- end_value_ineq(curr_column, end_value) } else if(!is.na(start_value) && !is.na(end_value)) { - replace_rows <- (start_value_ineq(private$data[[col_name]],start_value) & end_value_ineq(private$data[[col_name]], end_value)) + replace_rows <- (start_value_ineq(curr_column,start_value) & end_value_ineq(private$data[[col_name]], end_value)) } } else { - if(str_data_type == "integer"){ - old_value = as.integer(old_value) - new_value = as.integer(new_value) - } - if(str_data_type == "numeric"){ - old_value = as.numeric(old_value) - new_value = as.numeric(new_value) - } - replace_rows <- (private$data[[col_name]] == old_value) + if(is.na(old_value)) replace_rows <- (is.na(curr_column)) + else replace_rows <- (curr_column == old_value) } } } else if(str_data_type == "character") { if(!missing(rows)) { - replace_rows <- (row.names(private$data) %in% rows) + replace_rows <- (data_row_names %in% rows) if(!missing(old_value)) warning("old_value will be ignored because rows has been specified.") } - else replace_rows <- (private$data[[col_name]] == old_value) - #Is this needed? + else { + if(is.na(old_value)) replace_rows <- (is.na(curr_column)) + else replace_rows <- (curr_column == old_value) + } new_value <- as.character(new_value) } else if(str_data_type == "logical") { - if(!is.logical(new_value)) stop(col_name, " is a logical column. new_value must be a logical value") + #Removed because new columns are logical and we need to be able to type in new values + #if(!is.logical(new_value)) stop(col_name, " is a logical column. new_value must be a logical value") if(!missing(rows)) { - replace_rows <- (row.names(private$data) %in% rows) + replace_rows <- (data_row_names %in% rows) if(!missing(old_value)) warning("old_value will be ignored because rows has been specified.") } - else replace_rows <- (private$data[[col_name]] == old_value) + else { + if(is.na(old_value)) replace_rows <- (is.na(curr_column)) + else replace_rows <- (curr_column == old_value) + } } #TODO add other data type cases else { if(!missing(rows)) { - replace_rows <- (row.names(private$data) %in% rows) + replace_rows <- (data_row_names %in% rows) if(!missing(old_value)) warning("old_value will be ignored because rows has been specified.") } - else replace_rows <- (private$data[[col_name]] == old_value) + else { + if(is.na(old_value)) replace_rows <- (is.na(curr_column)) + else replace_rows <- (curr_column == old_value) + } + } + if(!done) { + replace_rows[is.na(replace_rows)] <- FALSE + if(sum(replace_rows) > 0) { + if(filter_applied) { + replace_rows <- replace_rows & curr_filter + } + if(sum(replace_rows) > 0) private$data[[col_name]][replace_rows] <- new_value + else message("No values to replace in ", col_name) + } + else message("No values to replace in ", col_name) } - if(str_data_type != "factor")(private$data[[col_name]][replace_rows] <- new_value) } #TODO need to think what to add to changes self$append_to_changes(list(Replaced_value, col_names)) @@ -673,7 +703,8 @@ data_object$set("public", "add_defaults_variables_metadata", function() { data_object$set("public", "remove_rows_in_data", function(row_names) { if(!all(row_names %in% rownames(private$data))) stop("Some of the row_names not found in data") - self$set_data(private$data[!(rownames(private$data) %in% row_names), ]) + rows_to_remove <- which(rownames(private$data) %in% row_names) + self$set_data(slice(private$data, -rows_to_remove)) self$append_to_changes(list(Removed_row, row_names)) self$data_changed <- TRUE } @@ -882,7 +913,7 @@ data_object$set("public", "set_factor_levels", function(col_name, new_levels) { data_object$set("public", "edit_factor_level", function(col_name, old_level, new_level) { if(!col_name %in% names(private$data)) stop(paste(col_name,"not found in data.")) if(!is.factor(private$data[[col_name]])) stop(paste(col_name,"is not a factor.")) - private$data[[col_name]] <- plyr::mapvalues(x = private$data[[col_name]], from = old_level, to = new_level) + self$add_columns_to_data(col_name, mapvalues(x = private$data[[col_name]], from = old_level, to = new_level)) self$data_changed <- TRUE self$variables_metadata_changed <- TRUE } diff --git a/instat/static/InstatObject/R/instat_object_R6.R b/instat/static/InstatObject/R/instat_object_R6.R index e3406ad3f2a..5a79c768a4d 100644 --- a/instat/static/InstatObject/R/instat_object_R6.R +++ b/instat/static/InstatObject/R/instat_object_R6.R @@ -262,7 +262,7 @@ instat_object$set("public", "get_data_frame", function(data_name, convert_to_cha } ) -instat_object$set("public", "get_variables_metadata", function(data_name, data_type = "all", convert_to_character = FALSE, property, column, error_if_no_property = TRUE, update = FALSE, direct_from_attributes = FALSE) { +instat_object$set("public", "get_variables_metadata", function(data_name, data_type = "all", convert_to_character = FALSE, property, column, error_if_no_property = TRUE, update = TRUE, direct_from_attributes = FALSE) { if(missing(data_name)) { retlist <- list() for (curr_obj in private$.data_objects) { diff --git a/instat/ucrAxes.Designer.vb b/instat/ucrAxes.Designer.vb index 7268d7b3244..42775af403a 100644 --- a/instat/ucrAxes.Designer.vb +++ b/instat/ucrAxes.Designer.vb @@ -29,6 +29,7 @@ Partial Class ucrAxes Me.chkOverwriteTitle = New System.Windows.Forms.CheckBox() Me.chkDisplayTitle = New System.Windows.Forms.CheckBox() Me.grpTickMarkers = New System.Windows.Forms.GroupBox() + Me.ucrTickMarkers = New instat.ucrInputComboBox() Me.lblTickMarkersNoOfDecimalPlaces = New System.Windows.Forms.Label() Me.nudTickMarkersNoOfDecimalPlaces = New System.Windows.Forms.NumericUpDown() Me.rdoTickMarkersAuto = New System.Windows.Forms.RadioButton() @@ -49,7 +50,6 @@ Partial Class ucrAxes Me.lblLowerLimit = New System.Windows.Forms.Label() Me.rdoScalesCustom = New System.Windows.Forms.RadioButton() Me.rdoScalesAuto = New System.Windows.Forms.RadioButton() - Me.ucrTickMarkers = New instat.ucrInputComboBox() Me.grpAxisTitle.SuspendLayout() Me.grpTickMarkers.SuspendLayout() CType(Me.nudTickMarkersNoOfDecimalPlaces, System.ComponentModel.ISupportInitialize).BeginInit() @@ -147,6 +147,14 @@ Partial Class ucrAxes Me.grpTickMarkers.TabStop = False Me.grpTickMarkers.Text = "Tick Markers" ' + 'ucrTickMarkers + ' + Me.ucrTickMarkers.IsReadOnly = False + Me.ucrTickMarkers.Location = New System.Drawing.Point(6, 51) + Me.ucrTickMarkers.Name = "ucrTickMarkers" + Me.ucrTickMarkers.Size = New System.Drawing.Size(137, 21) + Me.ucrTickMarkers.TabIndex = 16 + ' 'lblTickMarkersNoOfDecimalPlaces ' Me.lblTickMarkersNoOfDecimalPlaces.AutoSize = True @@ -177,7 +185,7 @@ Partial Class ucrAxes 'ucrSpecificValues ' Me.ucrSpecificValues.IsReadOnly = False - Me.ucrSpecificValues.Location = New System.Drawing.Point(6, 88) + Me.ucrSpecificValues.Location = New System.Drawing.Point(6, 78) Me.ucrSpecificValues.Name = "ucrSpecificValues" Me.ucrSpecificValues.Size = New System.Drawing.Size(173, 21) Me.ucrSpecificValues.TabIndex = 15 @@ -328,14 +336,6 @@ Partial Class ucrAxes Me.rdoScalesAuto.Text = "Auto" Me.rdoScalesAuto.UseVisualStyleBackColor = True ' - 'ucrTickMarkers - ' - Me.ucrTickMarkers.IsReadOnly = False - Me.ucrTickMarkers.Location = New System.Drawing.Point(6, 51) - Me.ucrTickMarkers.Name = "ucrTickMarkers" - Me.ucrTickMarkers.Size = New System.Drawing.Size(137, 21) - Me.ucrTickMarkers.TabIndex = 16 - ' 'ucrAxes ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/instat/ucrAxes.vb b/instat/ucrAxes.vb index 054c3118493..f11d79fbe70 100644 --- a/instat/ucrAxes.vb +++ b/instat/ucrAxes.vb @@ -19,6 +19,9 @@ Public Class ucrAxes Public clsRsyntax As New RSyntax Public clsRggplotFunction As New RFunction Public clsTitleFunction As New RFunction + Public clsScalecontinuousFunction As New RFunction + Public clsSeqFunction As New RFunction + Public strAxis As String Public bFirstLoad As Boolean = True Private Sub ucrAxes_Load(sender As Object, e As EventArgs) Handles Me.Load @@ -91,7 +94,7 @@ Public Class ucrAxes nudTickMarkersNoOfDecimalPlaces.Visible = False ucrSpecificValues.Visible = False ElseIf rdoTickMarkersCustom.Checked Then - ucrTickMarkers.Visible = False + ucrTickMarkers.Visible = True lblFrom.Visible = True nudFrom.Visible = True lblTo.Visible = True @@ -104,13 +107,21 @@ Public Class ucrAxes End If End Sub - Public Sub SetXorY(bIsX) - If bIsX = True Then + Public Sub SetXorY(bIsXAxis As Boolean) + If bIsXAxis = True Then + bIsX = True + strAxis = "x" clsTitleFunction.SetRCommand("xlab") + clsScalecontinuousFunction.SetRCommand("scale_" & strAxis & "_continuous") + ' put scale_x_continuous function here - ElseIf bIsX = False Then + ElseIf bIsXAxis = False Then + bIsX = False + strAxis = "y" clsTitleFunction.SetRCommand("ylab") + clsScalecontinuousFunction.SetRCommand("scale_" & strAxis & "_continuous") ' put scale_y_continuous function here + End If End Sub @@ -122,13 +133,22 @@ Public Class ucrAxes If rdoTitleCustom.Checked AndAlso chkDisplayTitle.Checked Then If chkOverwriteTitle.Checked AndAlso Not ucrOverwriteTitle.IsEmpty Then clsTitleFunction.AddParameter("label", Chr(34) & ucrOverwriteTitle.GetText & Chr(34)) - clsRsyntax.AddOperatorParameter("axistitle", clsRFunc:=clsTitleFunction) + clsRsyntax.AddOperatorParameter(strAxis & "axistitle", clsRFunc:=clsTitleFunction) Else - clsRsyntax.RemoveOperatorParameter("axistitle") + clsRsyntax.RemoveOperatorParameter(strAxis & "axistitle") End If Else clsTitleFunction.AddParameter("label", Chr(34) & "" & Chr(34)) - clsRsyntax.AddOperatorParameter("axistitle", clsRFunc:=clsTitleFunction) + clsRsyntax.AddOperatorParameter(strAxis & "axistitle", clsRFunc:=clsTitleFunction) + End If + End Sub + + Private Sub ScalesFunction() + If rdoScalesCustom.Checked Then + clsScalecontinuousFunction.AddParameter("limits", "c(" & nudLowerLimit.Value & "," & nudUpperLimit.Value & ")") + clsRsyntax.AddOperatorParameter("scale_" & strAxis & "_continuous", clsRFunc:=clsScalecontinuousFunction) + Else + clsRsyntax.RemoveOperatorParameter("scale_" & strAxis & "_continuous") End If End Sub @@ -162,5 +182,97 @@ Public Class ucrAxes TitleFunction() End Sub + Private Sub rdoTitleCustom_CheckedChanged(sender As Object, e As EventArgs) Handles rdoTitleCustom.CheckedChanged + TitleDefaults() + End Sub + + Private Sub rdoTitleAuto_CheckedChanged(sender As Object, e As EventArgs) Handles rdoTitleAuto.CheckedChanged + TitleDefaults() + End Sub + + Private Sub rdoScalesCustom_CheckedChanged(sender As Object, e As EventArgs) Handles rdoScalesCustom.CheckedChanged + ScalesDefaults() + End Sub + + Private Sub rdoScalesAuto_CheckedChanged(sender As Object, e As EventArgs) Handles rdoScalesAuto.CheckedChanged + ScalesDefaults() + End Sub + + Private Sub rdoTickMarkersAuto_CheckedChanged(sender As Object, e As EventArgs) Handles rdoTickMarkersAuto.CheckedChanged + TickMarkersDefaults() + End Sub + + Private Sub rdoTickMarkersCustom_CheckedChanged(sender As Object, e As EventArgs) Handles rdoTickMarkersCustom.CheckedChanged + TickMarkersDefaults() + End Sub + + Private Sub nudLowerLimit_TextChanged(sender As Object, e As EventArgs) Handles nudLowerLimit.TextChanged, nudUpperLimit.TextChanged + ScalesFunction() + End Sub + Private Sub nudScalesNoOfDecimalPlaces_TextChanged(sender As Object, e As EventArgs) Handles nudScalesNoOfDecimalPlaces.TextChanged + nudUpperLimit.DecimalPlaces = nudScalesNoOfDecimalPlaces.Value + nudLowerLimit.DecimalPlaces = nudScalesNoOfDecimalPlaces.Value + End Sub + + Private Sub nudTickMarkersNoOfDecimalPlaces_TextChanged(sender As Object, e As EventArgs) Handles nudTickMarkersNoOfDecimalPlaces.TextChanged + nudFrom.DecimalPlaces = nudTickMarkersNoOfDecimalPlaces.Value + nudTo.DecimalPlaces = nudTickMarkersNoOfDecimalPlaces.Value + nudInStepsOf.DecimalPlaces = nudTickMarkersNoOfDecimalPlaces.Value + End Sub + + Private Sub ucrTickMarkers_NameChanged() Handles ucrTickMarkers.NameChanged + If ucrTickMarkers.cboInput.SelectedItem = "Interval" Then + clsSeqFunction.SetRCommand("seq") + clsScalecontinuousFunction.AddParameter("breaks", clsRFunctionParameter:=clsSeqFunction) + ElseIf ucrTickMarkers.cboInput.SelectedItem = "Specific Values" Then + clsScalecontinuousFunction.RemoveParameterByName("breaks") + ucrSpecificValues.Visible = True + lblFrom.Visible = False + nudFrom.Visible = False + lblTo.Visible = False + nudTo.Visible = False + lblInStepsOf.Visible = False + nudInStepsOf.Visible = False + lblTickMarkersNoOfDecimalPlaces.Visible = False + nudTickMarkersNoOfDecimalPlaces.Visible = False + End If + End Sub + + Private Sub TickMarkersInterval() + + End Sub + + Private Sub ucrSpecificValues_NameChanged() Handles ucrSpecificValues.NameChanged + If Not ucrSpecificValues.IsEmpty Then + clsScalecontinuousFunction.AddParameter("breaks", "c(" & ucrSpecificValues.GetText & ")") + Else + clsScalecontinuousFunction.RemoveParameterByName("breaks") + End If + End Sub + + Private Sub nudFrom_TextChanged(sender As Object, e As EventArgs) Handles nudFrom.TextChanged + If nudFrom.Text <> "" Then + clsSeqFunction.AddParameter("from", nudFrom.Value) + Else + clsSeqFunction.RemoveParameterByName("from") + End If + End Sub + + Private Sub nudTo_TextChanged(sender As Object, e As EventArgs) Handles nudTo.TextChanged + If nudTo.Text <> "" Then + clsSeqFunction.AddParameter("to", nudTo.Value) + Else + clsSeqFunction.RemoveParameterByName("to") + End If + End Sub + + Private Sub nudInStepsOf_TextChanged(sender As Object, e As EventArgs) Handles nudInStepsOf.TextChanged + If nudFrom.Text <> "" Then + clsSeqFunction.AddParameter("by", nudFrom.Value) + Else + clsSeqFunction.RemoveParameterByName("by") + End If + End Sub End Class + diff --git a/instat/ucrInput.vb b/instat/ucrInput.vb index 115a469fa91..b875a0bac6b 100644 --- a/instat/ucrInput.vb +++ b/instat/ucrInput.vb @@ -341,7 +341,7 @@ Public Class ucrInput If Not bUserTyped Then SetDefaultName() End If - RaiseEvent NameChanged() + 'RaiseEvent NameChanged() End Sub Private Sub ucrInput_TextChanged(sender As Object, e As EventArgs) Handles Me.TextChanged diff --git a/instat/ucrReceiverExpression.vb b/instat/ucrReceiverExpression.vb index cd0e4fa2350..d868366ee51 100644 --- a/instat/ucrReceiverExpression.vb +++ b/instat/ucrReceiverExpression.vb @@ -102,8 +102,9 @@ Public Class ucrReceiverExpression MyBase.RemoveSelected() End Sub - Public Overrides Sub Clear() + Public Overrides Sub Clear() RemoveSelected() + iCurrentPosition = 0 End Sub Public Overrides Function IsEmpty() As Boolean