From 12c235cfcce4d5144c626f849032ec32ff66a039 Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Sun, 8 Jan 2017 22:32:32 +0300 Subject: [PATCH 1/2] Working on options dialog --- instat/clsInstatOptions.vb | 11 ++-- instat/dlgOptions.Designer.vb | 102 +++++++++++++++++----------------- instat/dlgOptions.vb | 11 +++- instat/ucrButtons.vb | 4 +- 4 files changed, 70 insertions(+), 58 deletions(-) diff --git a/instat/clsInstatOptions.vb b/instat/clsInstatOptions.vb index 11f9ae737c7..11300068c24 100644 --- a/instat/clsInstatOptions.vb +++ b/instat/clsInstatOptions.vb @@ -14,12 +14,14 @@ Imports unvell.ReoGrid Public strGraphDisplayOption As String Public bCommandsinOutput As Boolean Public bDefaultforComments As Boolean 'sets the default for comments on the dialog + Public bIncludeCommentDefault As Boolean Public Sub New() 'TODO Is this sensible to do in constructor? bIncludeRDefaultParameters = False bDefaultforComments = True bCommandsinOutput = False + bIncludeCommentDefault = True SetFormatOutput(New Font(FontFamily.GenericMonospace, 8, FontStyle.Regular), Color.Blue) SetFormatComment(New Font(FontFamily.GenericSansSerif, 8, FontStyle.Regular), Color.Green) SetFormatCommand(New Font(FontFamily.GenericSansSerif, 8, FontStyle.Regular), Color.Black) @@ -27,9 +29,8 @@ Imports unvell.ReoGrid SetPreviewRows(10) SetMaxRows(1000) SetComment("code generated by the dialog") - 'set the deault option here SetGraphDisplayOption("view_output_window") - SetOutputWindowDisplay("") + SetOutputWindowDisplay() 'TODO is this sensible? SetLanguageCultureCode(Thread.CurrentThread.CurrentCulture.Name) SetWorkingDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) @@ -107,10 +108,12 @@ Imports unvell.ReoGrid Public Sub SetGraphDisplayOption(strGraphOption As String) strGraphDisplayOption = strGraphOption 'setting the string for graphs display - + frmMain.clsRLink.strGraphDisplayOption = strGraphDisplayOption End Sub - Public Sub SetOutputWindowDisplay(strOutput As String) + Public Sub SetOutputWindowDisplay() 'set the options for the display + bIncludeCommentDefault = bDefaultforComments + frmMain.clsRLink.bShowCommands = bCommandsinOutput End Sub End Class \ No newline at end of file diff --git a/instat/dlgOptions.Designer.vb b/instat/dlgOptions.Designer.vb index 94119f3ac3c..5b6d79f9548 100644 --- a/instat/dlgOptions.Designer.vb +++ b/instat/dlgOptions.Designer.vb @@ -22,12 +22,12 @@ Partial Class dlgOptions 'Do not modify it using the code editor. Private Sub InitializeComponent() - Dim TreeNode13 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Languages") - Dim TreeNode14 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Comments") - Dim TreeNode15 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Import") - Dim TreeNode16 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Output Window") - Dim TreeNode17 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Commands") - Dim TreeNode18 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Data View") + Dim TreeNode7 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Languages") + Dim TreeNode8 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Comments") + Dim TreeNode9 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Import") + Dim TreeNode10 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Output Window") + Dim TreeNode11 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Commands") + Dim TreeNode12 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Data View") Me.cmdApply = New System.Windows.Forms.Button() Me.cmdHelp = New System.Windows.Forms.Button() Me.cmdCancel = New System.Windows.Forms.Button() @@ -49,6 +49,8 @@ Partial Class dlgOptions Me.lblPreviewRows = New System.Windows.Forms.Label() Me.nudPreviewRows = New System.Windows.Forms.NumericUpDown() Me.tbpOutputWindow = New System.Windows.Forms.TabPage() + Me.chkShowRCommandsinOutputWindow = New System.Windows.Forms.CheckBox() + Me.chkDefault = New System.Windows.Forms.CheckBox() Me.pnFormatOptions = New System.Windows.Forms.Panel() Me.rtbCommentPreview = New System.Windows.Forms.RichTextBox() Me.rtbOutputPreview = New System.Windows.Forms.RichTextBox() @@ -79,8 +81,6 @@ Partial Class dlgOptions Me.rdoDisplayinOutputWindow = New System.Windows.Forms.RadioButton() Me.trOptions = New System.Windows.Forms.TreeView() Me.spltControls = New System.Windows.Forms.SplitContainer() - Me.chkDefault = New System.Windows.Forms.CheckBox() - Me.chkShowRCommandsinOutputWindow = New System.Windows.Forms.CheckBox() Me.tbcOptions.SuspendLayout() Me.tbpLanguages.SuspendLayout() Me.pnLanguages.SuspendLayout() @@ -334,6 +334,26 @@ Partial Class dlgOptions Me.tbpOutputWindow.Text = "Output Window" Me.tbpOutputWindow.UseVisualStyleBackColor = True ' + 'chkShowRCommandsinOutputWindow + ' + Me.chkShowRCommandsinOutputWindow.AutoSize = True + Me.chkShowRCommandsinOutputWindow.Location = New System.Drawing.Point(10, 168) + Me.chkShowRCommandsinOutputWindow.Name = "chkShowRCommandsinOutputWindow" + Me.chkShowRCommandsinOutputWindow.Size = New System.Drawing.Size(207, 17) + Me.chkShowRCommandsinOutputWindow.TabIndex = 24 + Me.chkShowRCommandsinOutputWindow.Text = "Show R Commands in Output Window" + Me.chkShowRCommandsinOutputWindow.UseVisualStyleBackColor = True + ' + 'chkDefault + ' + Me.chkDefault.AutoSize = True + Me.chkDefault.Location = New System.Drawing.Point(10, 145) + Me.chkDefault.Name = "chkDefault" + Me.chkDefault.Size = New System.Drawing.Size(60, 17) + Me.chkDefault.TabIndex = 24 + Me.chkDefault.Text = "Default" + Me.chkDefault.UseVisualStyleBackColor = True + ' 'pnFormatOptions ' Me.pnFormatOptions.AutoSize = True @@ -627,29 +647,29 @@ Partial Class dlgOptions Me.trOptions.Dock = System.Windows.Forms.DockStyle.Fill Me.trOptions.Location = New System.Drawing.Point(0, 0) Me.trOptions.Name = "trOptions" - TreeNode13.Name = "ndLanguages" - TreeNode13.Tag = "1" - TreeNode13.Text = "Languages" - TreeNode13.ToolTipText = "Choose different languages" - TreeNode14.Name = "ndComments" - TreeNode14.Tag = "2" - TreeNode14.Text = "Comments" - TreeNode14.ToolTipText = "Comments for the dialogs" - TreeNode15.Name = "ndImport" - TreeNode15.Tag = "3" - TreeNode15.Text = "Import" - TreeNode15.ToolTipText = "Import Data Settings" - TreeNode16.Name = "ndOutputWindow" - TreeNode16.Tag = "4" - TreeNode16.Text = "Output Window" - TreeNode16.ToolTipText = "Output Window Formatting Options" - TreeNode17.Name = "ndCommands" - TreeNode17.Tag = "8" - TreeNode17.Text = "Commands" - TreeNode17.ToolTipText = "Commands Options" - TreeNode18.Name = "ndDataView" - TreeNode18.Text = "Data View" - Me.trOptions.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode13, TreeNode14, TreeNode15, TreeNode16, TreeNode17, TreeNode18}) + TreeNode7.Name = "ndLanguages" + TreeNode7.Tag = "1" + TreeNode7.Text = "Languages" + TreeNode7.ToolTipText = "Choose different languages" + TreeNode8.Name = "ndComments" + TreeNode8.Tag = "2" + TreeNode8.Text = "Comments" + TreeNode8.ToolTipText = "Comments for the dialogs" + TreeNode9.Name = "ndImport" + TreeNode9.Tag = "3" + TreeNode9.Text = "Import" + TreeNode9.ToolTipText = "Import Data Settings" + TreeNode10.Name = "ndOutputWindow" + TreeNode10.Tag = "4" + TreeNode10.Text = "Output Window" + TreeNode10.ToolTipText = "Output Window Formatting Options" + TreeNode11.Name = "ndCommands" + TreeNode11.Tag = "8" + TreeNode11.Text = "Commands" + TreeNode11.ToolTipText = "Commands Options" + TreeNode12.Name = "ndDataView" + TreeNode12.Text = "Data View" + Me.trOptions.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode7, TreeNode8, TreeNode9, TreeNode10, TreeNode11, TreeNode12}) Me.trOptions.Size = New System.Drawing.Size(184, 317) Me.trOptions.TabIndex = 0 ' @@ -669,26 +689,6 @@ Partial Class dlgOptions Me.spltControls.SplitterDistance = 184 Me.spltControls.TabIndex = 8 ' - 'chkDefault - ' - Me.chkDefault.AutoSize = True - Me.chkDefault.Location = New System.Drawing.Point(10, 145) - Me.chkDefault.Name = "chkDefault" - Me.chkDefault.Size = New System.Drawing.Size(60, 17) - Me.chkDefault.TabIndex = 24 - Me.chkDefault.Text = "Default" - Me.chkDefault.UseVisualStyleBackColor = True - ' - 'chkShowRCommandsinOutputWindow - ' - Me.chkShowRCommandsinOutputWindow.AutoSize = True - Me.chkShowRCommandsinOutputWindow.Location = New System.Drawing.Point(10, 168) - Me.chkShowRCommandsinOutputWindow.Name = "chkShowRCommandsinOutputWindow" - Me.chkShowRCommandsinOutputWindow.Size = New System.Drawing.Size(207, 17) - Me.chkShowRCommandsinOutputWindow.TabIndex = 24 - Me.chkShowRCommandsinOutputWindow.Text = "Show R Commands in Output Window" - Me.chkShowRCommandsinOutputWindow.UseVisualStyleBackColor = True - ' 'dlgOptions ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) diff --git a/instat/dlgOptions.vb b/instat/dlgOptions.vb index 8545f350202..f3efd8c5d64 100644 --- a/instat/dlgOptions.vb +++ b/instat/dlgOptions.vb @@ -107,7 +107,6 @@ Public Class dlgOptions frmMain.clsInstatOptions.SetLanguageCultureCode(strCurrLanguageCulture) frmMain.clsInstatOptions.SetWorkingDirectory(strWorkingDirectory) frmMain.clsInstatOptions.SetGraphDisplayOption(strGraphDisplayOption) - frmMain.clsInstatOptions.SetOutputWindowDisplay(strOutputWindowDisplay) frmMain.clsInstatOptions.bCommandsinOutput = chkShowRCommandsinOutputWindow.Checked frmMain.clsInstatOptions.bDefaultforComments = chkDefault.Checked @@ -300,6 +299,16 @@ Public Class dlgOptions ApplyEnabled(True) End Sub + Private Sub chkDefault_CheckedChanged(sender As Object, e As EventArgs) Handles chkDefault.CheckedChanged + frmMain.clsInstatOptions.bDefaultforComments = chkDefault.Checked + ApplyEnabled(True) + End Sub + + Private Sub chkShowRCommandsinOutputWindow_CheckedChanged(sender As Object, e As EventArgs) Handles chkShowRCommandsinOutputWindow.CheckedChanged + frmMain.clsInstatOptions.bCommandsinOutput = chkShowRCommandsinOutputWindow.Checked + ApplyEnabled(True) + End Sub + Private Sub ApplyEnabled(bEnable As Boolean) cmdApply.Enabled = bEnable cmdOk.Enabled = bEnable diff --git a/instat/ucrButtons.vb b/instat/ucrButtons.vb index 6fe8a147d10..02eceed4072 100644 --- a/instat/ucrButtons.vb +++ b/instat/ucrButtons.vb @@ -21,7 +21,7 @@ Public Class ucrButtons Public iHelpTopicID As Integer Public bFirstLoad As Boolean Public strComment As String - Public bIncludeCommentDefault As Boolean = True + Public Sub New() ' This call is required by the designer. @@ -113,7 +113,7 @@ Public Class ucrButtons End Sub Private Sub SetDefaults() - chkComment.Checked = bIncludeCommentDefault + chkComment.Checked = frmMain.clsInstatOptions.bIncludeCommentDefault SetCommentEditable() 'TODO default text should be translatable 'This is needed only so that the designer displays correctly in VS From 56dc97583e944dc4741df19de284f977473d483e Mon Sep 17 00:00:00 2001 From: maxwell fundi Date: Mon, 9 Jan 2017 00:16:10 +0300 Subject: [PATCH 2/2] Adding default comments and commands to output --- instat/clsInstatOptions.vb | 18 ++++--- instat/dlgOptions.Designer.vb | 98 +++++++++++++++++------------------ instat/dlgOptions.vb | 14 +++-- 3 files changed, 65 insertions(+), 65 deletions(-) diff --git a/instat/clsInstatOptions.vb b/instat/clsInstatOptions.vb index 11300068c24..f3ae693abb6 100644 --- a/instat/clsInstatOptions.vb +++ b/instat/clsInstatOptions.vb @@ -13,14 +13,12 @@ Imports unvell.ReoGrid Public lstColourPalette As List(Of Color) Public strGraphDisplayOption As String Public bCommandsinOutput As Boolean - Public bDefaultforComments As Boolean 'sets the default for comments on the dialog - Public bIncludeCommentDefault As Boolean + Public bIncludeCommentDefault As Boolean 'sets the default for comments on the dialog Public Sub New() 'TODO Is this sensible to do in constructor? bIncludeRDefaultParameters = False - bDefaultforComments = True - bCommandsinOutput = False + bCommandsinOutput = True bIncludeCommentDefault = True SetFormatOutput(New Font(FontFamily.GenericMonospace, 8, FontStyle.Regular), Color.Blue) SetFormatComment(New Font(FontFamily.GenericSansSerif, 8, FontStyle.Regular), Color.Green) @@ -28,9 +26,10 @@ Imports unvell.ReoGrid SetEditorFormat(New Font(FontFamily.GenericSansSerif, 10, FontStyle.Regular), Color.Black) SetPreviewRows(10) SetMaxRows(1000) + SetCommentsInOutput(True) + SetCommandInOutpt(True) SetComment("code generated by the dialog") SetGraphDisplayOption("view_output_window") - SetOutputWindowDisplay() 'TODO is this sensible? SetLanguageCultureCode(Thread.CurrentThread.CurrentCulture.Name) SetWorkingDirectory(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)) @@ -111,9 +110,12 @@ Imports unvell.ReoGrid frmMain.clsRLink.strGraphDisplayOption = strGraphDisplayOption End Sub - Public Sub SetOutputWindowDisplay() - 'set the options for the display - bIncludeCommentDefault = bDefaultforComments + Public Sub SetCommandInOutpt(bCommand As Boolean) + bCommandsinOutput = bCommand frmMain.clsRLink.bShowCommands = bCommandsinOutput End Sub + + Public Sub SetCommentsInOutput(bComment As Boolean) + bCommandsinOutput = bComment + End Sub End Class \ No newline at end of file diff --git a/instat/dlgOptions.Designer.vb b/instat/dlgOptions.Designer.vb index 5b6d79f9548..b1632a159f1 100644 --- a/instat/dlgOptions.Designer.vb +++ b/instat/dlgOptions.Designer.vb @@ -22,12 +22,12 @@ Partial Class dlgOptions 'Do not modify it using the code editor. Private Sub InitializeComponent() - Dim TreeNode7 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Languages") - Dim TreeNode8 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Comments") - Dim TreeNode9 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Import") - Dim TreeNode10 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Output Window") - Dim TreeNode11 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Commands") - Dim TreeNode12 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Data View") + Dim TreeNode13 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Languages") + Dim TreeNode14 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Comments") + Dim TreeNode15 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Import") + Dim TreeNode16 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Output Window") + Dim TreeNode17 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Commands") + Dim TreeNode18 As System.Windows.Forms.TreeNode = New System.Windows.Forms.TreeNode("Data View") Me.cmdApply = New System.Windows.Forms.Button() Me.cmdHelp = New System.Windows.Forms.Button() Me.cmdCancel = New System.Windows.Forms.Button() @@ -50,7 +50,7 @@ Partial Class dlgOptions Me.nudPreviewRows = New System.Windows.Forms.NumericUpDown() Me.tbpOutputWindow = New System.Windows.Forms.TabPage() Me.chkShowRCommandsinOutputWindow = New System.Windows.Forms.CheckBox() - Me.chkDefault = New System.Windows.Forms.CheckBox() + Me.chkIncludeCommentsbyDefault = New System.Windows.Forms.CheckBox() Me.pnFormatOptions = New System.Windows.Forms.Panel() Me.rtbCommentPreview = New System.Windows.Forms.RichTextBox() Me.rtbOutputPreview = New System.Windows.Forms.RichTextBox() @@ -74,13 +74,13 @@ Partial Class dlgOptions Me.tbpWorkingDirectory = New System.Windows.Forms.TabPage() Me.cmdWorkingDirectory = New System.Windows.Forms.Button() Me.lblWorkingDirectory = New System.Windows.Forms.Label() - Me.ucrWorkingDirectory = New instat.ucrInputTextBox() Me.tbpGraphDisplay = New System.Windows.Forms.TabPage() Me.rdoDisplayinSeparateWindows = New System.Windows.Forms.RadioButton() Me.rdoDisplayinRViewer = New System.Windows.Forms.RadioButton() Me.rdoDisplayinOutputWindow = New System.Windows.Forms.RadioButton() Me.trOptions = New System.Windows.Forms.TreeView() Me.spltControls = New System.Windows.Forms.SplitContainer() + Me.ucrWorkingDirectory = New instat.ucrInputTextBox() Me.tbcOptions.SuspendLayout() Me.tbpLanguages.SuspendLayout() Me.pnLanguages.SuspendLayout() @@ -324,7 +324,7 @@ Partial Class dlgOptions 'tbpOutputWindow ' Me.tbpOutputWindow.Controls.Add(Me.chkShowRCommandsinOutputWindow) - Me.tbpOutputWindow.Controls.Add(Me.chkDefault) + Me.tbpOutputWindow.Controls.Add(Me.chkIncludeCommentsbyDefault) Me.tbpOutputWindow.Controls.Add(Me.pnFormatOptions) Me.tbpOutputWindow.Location = New System.Drawing.Point(4, 22) Me.tbpOutputWindow.Name = "tbpOutputWindow" @@ -344,15 +344,15 @@ Partial Class dlgOptions Me.chkShowRCommandsinOutputWindow.Text = "Show R Commands in Output Window" Me.chkShowRCommandsinOutputWindow.UseVisualStyleBackColor = True ' - 'chkDefault + 'chkIncludeCommentsbyDefault ' - Me.chkDefault.AutoSize = True - Me.chkDefault.Location = New System.Drawing.Point(10, 145) - Me.chkDefault.Name = "chkDefault" - Me.chkDefault.Size = New System.Drawing.Size(60, 17) - Me.chkDefault.TabIndex = 24 - Me.chkDefault.Text = "Default" - Me.chkDefault.UseVisualStyleBackColor = True + Me.chkIncludeCommentsbyDefault.AutoSize = True + Me.chkIncludeCommentsbyDefault.Location = New System.Drawing.Point(10, 145) + Me.chkIncludeCommentsbyDefault.Name = "chkIncludeCommentsbyDefault" + Me.chkIncludeCommentsbyDefault.Size = New System.Drawing.Size(164, 17) + Me.chkIncludeCommentsbyDefault.TabIndex = 24 + Me.chkIncludeCommentsbyDefault.Text = "Include Comments by Default" + Me.chkIncludeCommentsbyDefault.UseVisualStyleBackColor = True ' 'pnFormatOptions ' @@ -588,14 +588,6 @@ Partial Class dlgOptions Me.lblWorkingDirectory.TabIndex = 0 Me.lblWorkingDirectory.Text = "Working Directory:" ' - 'ucrWorkingDirectory - ' - Me.ucrWorkingDirectory.IsReadOnly = False - Me.ucrWorkingDirectory.Location = New System.Drawing.Point(111, 17) - Me.ucrWorkingDirectory.Name = "ucrWorkingDirectory" - Me.ucrWorkingDirectory.Size = New System.Drawing.Size(282, 21) - Me.ucrWorkingDirectory.TabIndex = 1 - ' 'tbpGraphDisplay ' Me.tbpGraphDisplay.Controls.Add(Me.rdoDisplayinSeparateWindows) @@ -647,29 +639,29 @@ Partial Class dlgOptions Me.trOptions.Dock = System.Windows.Forms.DockStyle.Fill Me.trOptions.Location = New System.Drawing.Point(0, 0) Me.trOptions.Name = "trOptions" - TreeNode7.Name = "ndLanguages" - TreeNode7.Tag = "1" - TreeNode7.Text = "Languages" - TreeNode7.ToolTipText = "Choose different languages" - TreeNode8.Name = "ndComments" - TreeNode8.Tag = "2" - TreeNode8.Text = "Comments" - TreeNode8.ToolTipText = "Comments for the dialogs" - TreeNode9.Name = "ndImport" - TreeNode9.Tag = "3" - TreeNode9.Text = "Import" - TreeNode9.ToolTipText = "Import Data Settings" - TreeNode10.Name = "ndOutputWindow" - TreeNode10.Tag = "4" - TreeNode10.Text = "Output Window" - TreeNode10.ToolTipText = "Output Window Formatting Options" - TreeNode11.Name = "ndCommands" - TreeNode11.Tag = "8" - TreeNode11.Text = "Commands" - TreeNode11.ToolTipText = "Commands Options" - TreeNode12.Name = "ndDataView" - TreeNode12.Text = "Data View" - Me.trOptions.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode7, TreeNode8, TreeNode9, TreeNode10, TreeNode11, TreeNode12}) + TreeNode13.Name = "ndLanguages" + TreeNode13.Tag = "1" + TreeNode13.Text = "Languages" + TreeNode13.ToolTipText = "Choose different languages" + TreeNode14.Name = "ndComments" + TreeNode14.Tag = "2" + TreeNode14.Text = "Comments" + TreeNode14.ToolTipText = "Comments for the dialogs" + TreeNode15.Name = "ndImport" + TreeNode15.Tag = "3" + TreeNode15.Text = "Import" + TreeNode15.ToolTipText = "Import Data Settings" + TreeNode16.Name = "ndOutputWindow" + TreeNode16.Tag = "4" + TreeNode16.Text = "Output Window" + TreeNode16.ToolTipText = "Output Window Formatting Options" + TreeNode17.Name = "ndCommands" + TreeNode17.Tag = "8" + TreeNode17.Text = "Commands" + TreeNode17.ToolTipText = "Commands Options" + TreeNode18.Name = "ndDataView" + TreeNode18.Text = "Data View" + Me.trOptions.Nodes.AddRange(New System.Windows.Forms.TreeNode() {TreeNode13, TreeNode14, TreeNode15, TreeNode16, TreeNode17, TreeNode18}) Me.trOptions.Size = New System.Drawing.Size(184, 317) Me.trOptions.TabIndex = 0 ' @@ -689,6 +681,14 @@ Partial Class dlgOptions Me.spltControls.SplitterDistance = 184 Me.spltControls.TabIndex = 8 ' + 'ucrWorkingDirectory + ' + Me.ucrWorkingDirectory.IsReadOnly = False + Me.ucrWorkingDirectory.Location = New System.Drawing.Point(111, 17) + Me.ucrWorkingDirectory.Name = "ucrWorkingDirectory" + Me.ucrWorkingDirectory.Size = New System.Drawing.Size(282, 21) + Me.ucrWorkingDirectory.TabIndex = 1 + ' 'dlgOptions ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -799,5 +799,5 @@ Partial Class dlgOptions Friend WithEvents rdoDisplayinRViewer As RadioButton Friend WithEvents rdoDisplayinOutputWindow As RadioButton Friend WithEvents chkShowRCommandsinOutputWindow As CheckBox - Friend WithEvents chkDefault As CheckBox + Friend WithEvents chkIncludeCommentsbyDefault As CheckBox End Class diff --git a/instat/dlgOptions.vb b/instat/dlgOptions.vb index f3efd8c5d64..02f5026009e 100644 --- a/instat/dlgOptions.vb +++ b/instat/dlgOptions.vb @@ -69,7 +69,7 @@ Public Class dlgOptions nudPreviewRows.Value = frmMain.clsInstatOptions.iPreviewRows txtComment.Text = frmMain.clsInstatOptions.strComment ucrWorkingDirectory.SetName(frmMain.clsInstatOptions.strWorkingDirectory) - chkDefault.Checked = frmMain.clsInstatOptions.bDefaultforComments + chkIncludeCommentsbyDefault.Checked = frmMain.clsInstatOptions.bIncludeCommentDefault chkShowRCommandsinOutputWindow.Checked = frmMain.clsInstatOptions.bCommandsinOutput Select Case frmMain.clsInstatOptions.strLanguageCultureCode @@ -107,8 +107,8 @@ Public Class dlgOptions frmMain.clsInstatOptions.SetLanguageCultureCode(strCurrLanguageCulture) frmMain.clsInstatOptions.SetWorkingDirectory(strWorkingDirectory) frmMain.clsInstatOptions.SetGraphDisplayOption(strGraphDisplayOption) - frmMain.clsInstatOptions.bCommandsinOutput = chkShowRCommandsinOutputWindow.Checked - frmMain.clsInstatOptions.bDefaultforComments = chkDefault.Checked + frmMain.clsInstatOptions.bIncludeCommentDefault = chkIncludeCommentsbyDefault.Checked + frmMain.clsInstatOptions.SetCommandInOutpt(chkShowRCommandsinOutputWindow.Checked) End Sub @@ -279,8 +279,8 @@ Public Class dlgOptions ApplyEnabled(True) End Sub - Private Sub chkIncludeDefaultParams_CheckedChanged(sender As Object, e As EventArgs) Handles chkIncludeDefaultParams.CheckedChanged - frmMain.clsInstatOptions.bIncludeRDefaultParameters = chkIncludeDefaultParams.Checked + Private Sub chkIncludeDefaultParams_CheckedChanged(sender As Object, e As EventArgs) Handles chkIncludeDefaultParams.CheckedChanged + ApplyEnabled(True) End Sub Private Sub nudMaxRows_TextChanged(sender As Object, e As EventArgs) Handles nudMaxRows.TextChanged @@ -299,13 +299,11 @@ Public Class dlgOptions ApplyEnabled(True) End Sub - Private Sub chkDefault_CheckedChanged(sender As Object, e As EventArgs) Handles chkDefault.CheckedChanged - frmMain.clsInstatOptions.bDefaultforComments = chkDefault.Checked + Private Sub chkDefault_CheckedChanged(sender As Object, e As EventArgs) Handles chkIncludeCommentsbyDefault.CheckedChanged ApplyEnabled(True) End Sub Private Sub chkShowRCommandsinOutputWindow_CheckedChanged(sender As Object, e As EventArgs) Handles chkShowRCommandsinOutputWindow.CheckedChanged - frmMain.clsInstatOptions.bCommandsinOutput = chkShowRCommandsinOutputWindow.Checked ApplyEnabled(True) End Sub