Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated master #486

Merged
merged 102 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
12d45c3
Added New Restore backup Dialog
derekagorhom Feb 19, 2024
1e930a9
Added the Restore Backup code
derekagorhom Feb 19, 2024
a61ad8a
Merge branch 'master' into Changes_AutoRecovery
derekagorhom Feb 19, 2024
50e1ccb
Design Changes
derekagorhom Feb 19, 2024
06e2304
Code Changes
derekagorhom Feb 21, 2024
4f14d69
Merge branch 'master' into Changes_AutoRecovery
derekagorhom Feb 26, 2024
488be3a
Removing Unused code
derekagorhom Feb 26, 2024
320346c
added a function which works similar to the one used for autorecovery…
derekagorhom Mar 11, 2024
73d313f
Removing commented out code
derekagorhom Mar 11, 2024
f164b40
removing warning message
derekagorhom Mar 11, 2024
f53c189
Added the HelpIDno
derekagorhom Mar 11, 2024
52eacf9
Code Changes
derekagorhom Mar 14, 2024
c07cc74
Merge branch 'master' into Changes_AutoRecovery
derekagorhom Apr 2, 2024
2e80962
Enabling Save Backup for data files
derekagorhom Apr 2, 2024
2d97a1b
Merge pull request #232 from IDEMSInternational/master
Vitalis95 Apr 8, 2024
2095c76
Code Changes
derekagorhom Apr 8, 2024
96f5ce3
Made code changes after review
N-thony Apr 8, 2024
9c8325e
minor code correction
N-thony Apr 8, 2024
fa2cd19
Merge pull request #233 from IDEMSInternational/master
Vitalis95 Apr 8, 2024
d5629b5
minor code correction
N-thony Apr 8, 2024
1b3bf09
Revert "minor code correction"
derekagorhom Apr 8, 2024
bd5e0e8
Revert "minor code correction"
derekagorhom Apr 8, 2024
34e355f
Revert "Made code changes after review"
derekagorhom Apr 8, 2024
1625b8e
Added backup message
N-thony Apr 9, 2024
6b60c3b
Added checkbox to select/unselect items
N-thony Apr 12, 2024
9d7c913
minor code correction
N-thony Apr 13, 2024
b2c7d60
Code improvement
N-thony Apr 13, 2024
c5c95a2
minor addition
N-thony Apr 13, 2024
c49ec28
added tooltip
N-thony Apr 13, 2024
4ed2627
cleaning code
N-thony Apr 14, 2024
93fd56d
Merge pull request #234 from IDEMSInternational/master
Vitalis95 Apr 15, 2024
df63e90
minor text change
N-thony Apr 15, 2024
11f6b57
Redesigning the Restore Backup dialogue with additional code changes
derekagorhom Apr 15, 2024
ba6b60d
Added Shit Click
N-thony Apr 17, 2024
02b8e6f
code change on the selection range
N-thony Apr 17, 2024
24b4147
More code changes
derekagorhom Apr 17, 2024
a32dceb
added the possibility to deselect checkboxes in between
N-thony Apr 17, 2024
f01fb1b
Code Changes
derekagorhom Apr 18, 2024
3f567dd
code changes
derekagorhom Apr 18, 2024
06f0d6b
Final Fixes for the reset
derekagorhom Apr 18, 2024
b895866
minor code change
N-thony Apr 19, 2024
d1befed
Bug fix on pasting multiple columns
N-thony Apr 29, 2024
56f7fd0
minor code change
N-thony Apr 29, 2024
47b89dc
Added more comments
N-thony May 1, 2024
30a24da
Merge pull request #237 from IDEMSInternational/master
Vitalis95 May 2, 2024
d4e7a0c
changes to the code
Vitalis95 May 2, 2024
4866e52
Code Changes
derekagorhom May 2, 2024
e870a2b
removing unnecessary code
derekagorhom May 2, 2024
adc1dde
Removing the option which deletes log files when restarting R-instat
derekagorhom May 2, 2024
1400983
code changes
derekagorhom May 2, 2024
c784d96
Code Changes
derekagorhom May 2, 2024
f8b50c2
Merge branch 'Changes_AutoRecovery' of https://github.com/derekagorho…
N-thony May 3, 2024
fe62bd2
code improvement
N-thony May 3, 2024
20bac80
minor addition
N-thony May 3, 2024
e138aaf
more code addition
N-thony May 3, 2024
bd9843b
Improve the deleting of the files
N-thony May 3, 2024
8aa8a86
minor change
N-thony May 6, 2024
cf08c41
code improvements
N-thony May 6, 2024
9182941
minor change
N-thony May 6, 2024
db10fb1
help
Fidel365 May 6, 2024
515b326
calculator
Fidel365 May 6, 2024
e935c96
minor code change
N-thony May 6, 2024
0132ca3
translation
Fidel365 May 6, 2024
9ee89d4
code changes
N-thony May 6, 2024
974287e
minor code change
N-thony May 6, 2024
195be4d
minor change
N-thony May 6, 2024
854de6b
Merge pull request #104 from N-thony/derekagorhom-Changes_AutoRecovery
N-thony May 6, 2024
4d60271
Merge pull request #72 from N-thony/restore_dlg
derekagorhom May 6, 2024
e287b23
Merge pull request #8965 from Vitalis95/scale_issue
N-thony May 8, 2024
80ff0c3
Merge pull request #8969 from Fidel365/transformhelp
N-thony May 8, 2024
b65c902
Merge pull request #238 from IDEMSInternational/master
Vitalis95 May 9, 2024
b688b1e
changes
Vitalis95 May 10, 2024
80fd9fe
changes to the code
Vitalis95 May 10, 2024
219e7ed
changes
Vitalis95 May 10, 2024
cac0135
changes
Vitalis95 May 10, 2024
ab27c7a
changes to the code
Vitalis95 May 10, 2024
053880f
changes
Vitalis95 May 13, 2024
b4f185e
changes to the code
Vitalis95 May 13, 2024
3fdc243
Code changes
derekagorhom May 13, 2024
d4ba30a
Merge branch 'master' into Created_Restore_backup_Dialogue
derekagorhom May 13, 2024
9f8c9a6
changes
Vitalis95 May 14, 2024
7870dea
changes to the code
Vitalis95 May 14, 2024
9e1fbe5
changes to the code
Vitalis95 May 14, 2024
7996b3d
changes
Vitalis95 May 14, 2024
d127292
Code Changes
derekagorhom May 14, 2024
8c95611
Merge pull request #8977 from Vitalis95/exportdfnsdlg
N-thony May 14, 2024
ec1d97d
Merge pull request #240 from IDEMSInternational/master
Vitalis95 May 14, 2024
c8ee600
Code Improvements
derekagorhom May 15, 2024
94500de
changes
Vitalis95 May 15, 2024
ba26682
Merge branch 'master' into Created_Restore_backup_Dialogue
derekagorhom May 15, 2024
c19ba38
Code Fixes in the Frmmain.designer.vb
derekagorhom May 15, 2024
70d41b0
Merge pull request #8973 from Vitalis95/new_exportdfndlg
N-thony May 15, 2024
84de622
Merge pull request #8954 from N-thony/bug_fix_pasting_df
conlooptechnologies May 15, 2024
5ddff6a
Code Changes
derekagorhom May 16, 2024
34c555b
Merge pull request #8970 from derekagorhom/Created_Restore_backup_Dia…
conlooptechnologies May 16, 2024
990096a
changes
Fidel365 May 16, 2024
8fa8708
translation
Fidel365 May 16, 2024
5f129ca
final
Fidel365 May 16, 2024
f05e027
changes to the code
Vitalis95 May 17, 2024
ff2376e
Merge pull request #8983 from Vitalis95/dlghide
conlooptechnologies May 17, 2024
a186359
Merge pull request #8980 from Fidel365/help_new
N-thony May 21, 2024
36408d1
Merge pull request #8932 from N-thony/checkbox_toolstrip
conlooptechnologies May 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion instat/Model/Output/clsOutputLogger.vb
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ Public Class clsOutputLogger

'add the output with it's R script as another output element
outputElement.SetContent("", outputType, strOutput)
'_outputElements.Add(outputElement)
_outputElements.Add(outputElement)
'raise event for output pages
RaiseEvent NewOutputAdded(outputElement, bDisplayOutputInExternalViewer)

Expand Down
54 changes: 49 additions & 5 deletions instat/UserControl/ucrOutputPage.vb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ Imports RInsightF461
''' </summary>
Public Class ucrOutputPage
Private _checkBoxes As List(Of CheckBox)

''' <summary> lastCheckedBox used to store a reference to a CheckBox control. </summary>
Private lastCheckedBox As CheckBox = Nothing

Private _bCanReOrder As Boolean
Private _bCanRename As Boolean
Private _bCanDelete As Boolean
Expand Down Expand Up @@ -115,6 +119,15 @@ Public Class ucrOutputPage
Next
End Sub

''' <summary>
''' Selects all check boxes on the page
''' </summary>
Public Sub SelectAllCheckBoxes()
For Each checkbox In _checkBoxes
checkbox.Checked = True
Next
End Sub

''' <summary>
''' Clears all outputs on the page
''' </summary>
Expand Down Expand Up @@ -215,8 +228,6 @@ Public Class ucrOutputPage
End If
End Sub



Private Sub AddNewTextOutput(outputElement As clsOutputElement)
Dim panel As Panel = AddElementPanel(outputElement)

Expand Down Expand Up @@ -377,12 +388,11 @@ Public Class ucrOutputPage
}
panel.Controls.Add(checkBox)
_checkBoxes.Add(checkBox)
AddHandler checkBox.CheckedChanged, AddressOf CheckBox_CheckedChanged
AddHandler checkBox.Click, AddressOf checkButton_Click
AddHandler checkBox.MouseLeave, AddressOf panelContents_MouseLeave
End Sub



''' <summary>
''' Copies selected elements to clipboard
''' </summary>
Expand Down Expand Up @@ -478,7 +488,6 @@ Public Class ucrOutputPage
Next
End Sub


Private Sub SetRichTextBoxHeight(richTextBox As RichTextBox)
richTextBox.Height = (richTextBox.GetLineFromCharIndex(richTextBox.Text.Length) + 1) * (richTextBox.Font.Height + richTextBox.Margin.Vertical) + 5
End Sub
Expand All @@ -487,6 +496,41 @@ Public Class ucrOutputPage
pictureBox.Height = pictureBox.Width / (pictureBox.Image.Width / pictureBox.Image.Height)
End Sub

Private Sub CheckBox_CheckedChanged(sender As Object, e As EventArgs)
Dim currentBox As CheckBox = DirectCast(sender, CheckBox)

If lastCheckedBox IsNot Nothing AndAlso Control.ModifierKeys = Keys.Shift Then
Dim startIndex As Integer = _checkBoxes.IndexOf(lastCheckedBox)
Dim endIndex As Integer = _checkBoxes.IndexOf(currentBox)

' Toggle check state for checkboxes between startIndex and endIndex
For i As Integer = Math.Min(startIndex, endIndex) To Math.Max(startIndex, endIndex)
_checkBoxes(i).Checked = currentBox.Checked
Next
End If

lastCheckedBox = currentBox
End Sub

Private Sub CheckBox_MouseDown(sender As Object, e As MouseEventArgs)
Dim currentBox As CheckBox = DirectCast(sender, CheckBox)

If e.Button = MouseButtons.Left AndAlso Control.ModifierKeys = Keys.Shift Then
' Deselect all checkboxes between lastCheckedBox and currentBox
Dim startIndex As Integer = _checkBoxes.IndexOf(lastCheckedBox)
Dim endIndex As Integer = _checkBoxes.IndexOf(currentBox)

For i As Integer = Math.Min(startIndex, endIndex) + 1 To Math.Max(startIndex, endIndex) - 1
_checkBoxes(i).Checked = False
Next
ElseIf currentBox.Checked AndAlso Not Control.ModifierKeys = Keys.Shift Then
' Deselect the current checkbox if already checked without Shift key
currentBox.Checked = False
End If

lastCheckedBox = currentBox
End Sub

Private Sub checkButton_Click(sender As Object, e As EventArgs)
RaiseEvent RefreshContextButtons()
End Sub
Expand Down
18 changes: 9 additions & 9 deletions instat/UserControl/ucrOutputPages.resx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<data name="tdbAddToExisting.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand All @@ -139,7 +139,7 @@
<data name="tbAddToNew.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand All @@ -154,7 +154,7 @@
<data name="tbCopy.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand All @@ -169,7 +169,7 @@
<data name="tbMoveUp.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand All @@ -184,7 +184,7 @@
<data name="tbMoveDown.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand All @@ -199,7 +199,7 @@
<data name="tbDelete.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand All @@ -214,7 +214,7 @@
<data name="tbRename.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand All @@ -229,7 +229,7 @@
<data name="tbSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand All @@ -244,7 +244,7 @@
<data name="tbHelp.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YQUAAAAJcEhZcwAAFiUAABYlAUlSJPAAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG
YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9
0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw
bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc
Expand Down
79 changes: 79 additions & 0 deletions instat/UserControl/ucrOutputPages.vb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Public Class ucrOutputPages
Private _outputLogger As clsOutputLogger
Private _selectedOutputPage As ucrOutputPage
Private _strSaveDirectory As String
Private checkBoxSelectAll As New CheckBox()
Public Sub New()

' This call is required by the designer.
Expand All @@ -38,6 +39,10 @@ Public Class ucrOutputPages
EnableDisableTopButtons()
End Sub

Private Sub ucrOutputPages_Load(sender As Object, e As EventArgs) Handles Me.Load
AddSelectAllCheckBoxToToolStripControl()
End Sub

''' <summary>
''' Holds options.
''' ToDo InstatOptions should be able to be accessed from anywhere
Expand Down Expand Up @@ -84,6 +89,7 @@ Public Class ucrOutputPages

Private Sub AddNewOutput(outputElement As clsOutputElement, bDisplayOutputInExternalViewer As Boolean)
ucrMainOutputPage.AddNewOutput(outputElement, bDisplayOutputInExternalViewer)
UpdateSelectAllCheckBoxText()
End Sub

Private Sub AddNewOutputToTab(outputElement As clsOutputElement, tabName As String)
Expand Down Expand Up @@ -153,6 +159,7 @@ Public Class ucrOutputPages
tbMoveUp.Enabled = False
End If
tbRename.Enabled = _selectedOutputPage.BCanRename
UpdateSelectAllCheckBoxText()
End Sub

Private Sub RefreshPage()
Expand Down Expand Up @@ -213,6 +220,7 @@ Public Class ucrOutputPages
_outputLogger.AddOutputToFilteredList(element.Clone, strTabName)
Next
_selectedOutputPage.ClearAllCheckBoxes()
UpdateSelectAllCheckBoxText()
End Sub

Private Sub tbCopy_Click(sender As Object, e As EventArgs) Handles tbCopy.Click
Expand All @@ -239,6 +247,7 @@ Public Class ucrOutputPages
Else
RefreshPage()
End If
UpdateSelectAllCheckBoxText()
End Sub

''' <summary>
Expand Down Expand Up @@ -303,4 +312,74 @@ Public Class ucrOutputPages
End If
Next
End Sub

Private Sub AddSelectAllCheckBoxToToolStripControl()
' Create a ToolStripControlHost to host the CheckBox
Dim checkBoxHost As ToolStripControlHost = New ToolStripControlHost(checkBoxSelectAll)

' Insert the CheckBox host at the beginning of tsButtons items
tsButtons.Items.Insert(0, checkBoxHost)

' Create a ToolTip for the checkBoxSelectAll CheckBox
Dim ttcheckBoxSelectAll As New ToolTip
ttcheckBoxSelectAll.SetToolTip(checkBoxSelectAll, "Toggle selection for all elements")

' Add a Click event handler to the checkBoxSelectAll CheckBox
AddHandler checkBoxSelectAll.Click, AddressOf checkBoxSelectAll_Click
End Sub

''' <summary>
''' Updates the text and state of checkBoxSelectAll based on selected elements and output count.
''' </summary>
Private Sub UpdateSelectAllCheckBoxText()
' Check if _outputLogger is initialized
If _outputLogger Is Nothing Then
Exit Sub ' Exit the sub if logger is not initialized
End If

' Variable to hold the count of output elements
Dim iCountOutputElements As Integer = 0

' Determine the count of output elements based on the selected tab
If SelectedTab() = "Main" Then
iCountOutputElements = _outputLogger.OutputElements.Count
Else
iCountOutputElements = _outputLogger.GetFilteredList(SelectedTab).Output.Count
End If

' Enable or disable checkBoxSelectAll based on the count of output elements
checkBoxSelectAll.Enabled = iCountOutputElements > 0

' Get the count of selected elements
Dim iSelectedElements = _selectedOutputPage.SelectedElements.Count

' Determine the text and check state of checkBoxSelectAll based on selected and total elements
Select Case True
Case iSelectedElements > 0 AndAlso iCountOutputElements > iSelectedElements
' Indeterminate state when some but not all elements are selected
checkBoxSelectAll.Text = $"{iSelectedElements} item(s)"
checkBoxSelectAll.CheckState = CheckState.Indeterminate
Case iSelectedElements > 0 AndAlso iCountOutputElements = iSelectedElements
' All elements selected
checkBoxSelectAll.Text = "Deselect All"
checkBoxSelectAll.CheckState = CheckState.Checked
Case Else
' No elements selected
checkBoxSelectAll.Text = "Select All"
checkBoxSelectAll.CheckState = CheckState.Unchecked
End Select
End Sub

Private Sub checkBoxSelectAll_Click(sender As Object, e As EventArgs)
' Handle CheckBox checked changed event here
Dim checkBoxSelectAll As CheckBox = TryCast(sender, CheckBox)

If checkBoxSelectAll.Checked Then
_selectedOutputPage.SelectAllCheckBoxes()
Else
_selectedOutputPage.ClearAllCheckBoxes()
End If
EnableDisableTopButtons()
End Sub

End Class
2 changes: 1 addition & 1 deletion instat/clsRLink.vb
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ Public Class RLink
'''
''' <param name="strScript"> The text to add to the save log file. </param>
'''--------------------------------------------------------------------------------------------
Private Sub AppendToAutoSaveLog(strScript As String)
Public Sub AppendToAutoSaveLog(strScript As String)
Dim strTempFile As String
Dim i As Integer = 1
Try
Expand Down
2 changes: 1 addition & 1 deletion instat/dlgCluster.vb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Public Class dlgCluster
ucrPnlPrepareData.AddToLinkedControls({ucrChkMatrix, ucrSaveDistance}, {rdoDistanceData}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)
ucrPnlPrepareData.AddToLinkedControls(ucrInputMethod, {rdoDistanceData}, bNewLinkedAddRemoveParameter:=True, bNewLinkedHideIfParameterMissing:=True)

ucrSaveNewDataFrame.SetSaveTypeAsModel()
ucrSaveNewDataFrame.SetSaveTypeAsDataFrame()
ucrSaveNewDataFrame.SetDataFrameSelector(ucrSelectorPrepareData.ucrAvailableDataFrames)
ucrSaveNewDataFrame.SetLabelText("New Data Frame Name:")
ucrSaveNewDataFrame.SetPrefix("scale")
Expand Down
Loading
Loading