aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEverythingWindows <[email protected]>2022-11-27 21:27:36 +0700
committerEverythingWindows <[email protected]>2022-11-27 21:27:36 +0700
commit23547b2d87e6416707d576b72956df271ebc303d (patch)
tree2815d96de614b21f47ee5937e9452f4441fed0c0
parentd7cdf48c58d3663550a88975747c3db04efe7c29 (diff)
downloadshiftos-therevival-old-23547b2d87e6416707d576b72956df271ebc303d.tar.gz
shiftos-therevival-old-23547b2d87e6416707d576b72956df271ebc303d.tar.bz2
shiftos-therevival-old-23547b2d87e6416707d576b72956df271ebc303d.zip
rough working file skimmer
-rw-r--r--ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.Designer.vb117
-rw-r--r--ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.resx2
-rw-r--r--ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.vb80
3 files changed, 131 insertions, 68 deletions
diff --git a/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.Designer.vb b/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.Designer.vb
index f3a1c20..8e816a4 100644
--- a/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.Designer.vb
+++ b/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.Designer.vb
@@ -24,7 +24,7 @@ Partial Class Uni_FileSkimmer
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Uni_FileSkimmer))
- Dim ListViewItem2 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem("test", 0)
+ Dim ListViewItem1 As System.Windows.Forms.ListViewItem = New System.Windows.Forms.ListViewItem("test", 0)
Me.msn_Options = New System.Windows.Forms.MenuStrip()
Me.FileToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.CloseToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
@@ -32,24 +32,27 @@ Partial Class Uni_FileSkimmer
Me.PropertyPaneToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.AboutToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.pnl_Ribbon = New System.Windows.Forms.Panel()
+ Me.Button1 = New System.Windows.Forms.Button()
+ Me.btn_Delete = New System.Windows.Forms.Button()
+ Me.btn_NewFolder = New System.Windows.Forms.Button()
Me.pnl_Properties = New System.Windows.Forms.Panel()
+ Me.pic_Icon = New System.Windows.Forms.PictureBox()
Me.lbl_filesize = New System.Windows.Forms.Label()
Me.lbl_filetype = New System.Windows.Forms.Label()
Me.lbl_filename = New System.Windows.Forms.Label()
Me.lbl_Properties = New System.Windows.Forms.Label()
Me.iml_icons = New System.Windows.Forms.ImageList(Me.components)
Me.pnl_AddressBar = New System.Windows.Forms.Panel()
+ Me.btn_Refresh = New System.Windows.Forms.Button()
Me.btn_Up = New System.Windows.Forms.Button()
Me.txt_AddressBar = New System.Windows.Forms.TextBox()
Me.lbl_Address = New System.Windows.Forms.Label()
Me.lsv_Content = New System.Windows.Forms.ListView()
- Me.pic_Icon = New System.Windows.Forms.PictureBox()
- Me.btn_NewFolder = New System.Windows.Forms.Button()
Me.msn_Options.SuspendLayout()
Me.pnl_Ribbon.SuspendLayout()
Me.pnl_Properties.SuspendLayout()
- Me.pnl_AddressBar.SuspendLayout()
CType(Me.pic_Icon, System.ComponentModel.ISupportInitialize).BeginInit()
+ Me.pnl_AddressBar.SuspendLayout()
Me.SuspendLayout()
'
'msn_Options
@@ -99,6 +102,8 @@ Partial Class Uni_FileSkimmer
'pnl_Ribbon
'
Me.pnl_Ribbon.BackColor = System.Drawing.Color.Silver
+ Me.pnl_Ribbon.Controls.Add(Me.Button1)
+ Me.pnl_Ribbon.Controls.Add(Me.btn_Delete)
Me.pnl_Ribbon.Controls.Add(Me.btn_NewFolder)
Me.pnl_Ribbon.Dock = System.Windows.Forms.DockStyle.Top
Me.pnl_Ribbon.Location = New System.Drawing.Point(0, 27)
@@ -106,6 +111,51 @@ Partial Class Uni_FileSkimmer
Me.pnl_Ribbon.Size = New System.Drawing.Size(800, 69)
Me.pnl_Ribbon.TabIndex = 1
'
+ 'Button1
+ '
+ Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.Button1.Font = New System.Drawing.Font("Segoe UI", 7.0!)
+ Me.Button1.Image = Global.ShiftOS_TheRevival.My.Resources.Resources.ico_folder
+ Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
+ Me.Button1.Location = New System.Drawing.Point(142, 0)
+ Me.Button1.Name = "Button1"
+ Me.Button1.Size = New System.Drawing.Size(116, 26)
+ Me.Button1.TabIndex = 0
+ Me.Button1.Text = "Rename"
+ Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
+ Me.Button1.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
+ Me.Button1.UseVisualStyleBackColor = True
+ '
+ 'btn_Delete
+ '
+ Me.btn_Delete.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.btn_Delete.Font = New System.Drawing.Font("Segoe UI", 7.0!)
+ Me.btn_Delete.Image = Global.ShiftOS_TheRevival.My.Resources.Resources.ico_folder
+ Me.btn_Delete.ImageAlign = System.Drawing.ContentAlignment.TopCenter
+ Me.btn_Delete.Location = New System.Drawing.Point(71, 0)
+ Me.btn_Delete.Name = "btn_Delete"
+ Me.btn_Delete.Size = New System.Drawing.Size(72, 69)
+ Me.btn_Delete.TabIndex = 0
+ Me.btn_Delete.Text = "Delete"
+ Me.btn_Delete.TextAlign = System.Drawing.ContentAlignment.BottomCenter
+ Me.btn_Delete.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
+ Me.btn_Delete.UseVisualStyleBackColor = True
+ '
+ 'btn_NewFolder
+ '
+ Me.btn_NewFolder.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.btn_NewFolder.Font = New System.Drawing.Font("Segoe UI", 7.0!)
+ Me.btn_NewFolder.Image = Global.ShiftOS_TheRevival.My.Resources.Resources.ico_folder
+ Me.btn_NewFolder.ImageAlign = System.Drawing.ContentAlignment.TopCenter
+ Me.btn_NewFolder.Location = New System.Drawing.Point(0, 0)
+ Me.btn_NewFolder.Name = "btn_NewFolder"
+ Me.btn_NewFolder.Size = New System.Drawing.Size(72, 69)
+ Me.btn_NewFolder.TabIndex = 0
+ Me.btn_NewFolder.Text = "New Folder"
+ Me.btn_NewFolder.TextAlign = System.Drawing.ContentAlignment.BottomCenter
+ Me.btn_NewFolder.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
+ Me.btn_NewFolder.UseVisualStyleBackColor = True
+ '
'pnl_Properties
'
Me.pnl_Properties.BackColor = System.Drawing.Color.Gray
@@ -121,6 +171,15 @@ Partial Class Uni_FileSkimmer
Me.pnl_Properties.TabIndex = 2
Me.pnl_Properties.Visible = False
'
+ 'pic_Icon
+ '
+ Me.pic_Icon.Location = New System.Drawing.Point(10, 42)
+ Me.pic_Icon.Name = "pic_Icon"
+ Me.pic_Icon.Size = New System.Drawing.Size(64, 64)
+ Me.pic_Icon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
+ Me.pic_Icon.TabIndex = 2
+ Me.pic_Icon.TabStop = False
+ '
'lbl_filesize
'
Me.lbl_filesize.AutoSize = True
@@ -177,6 +236,7 @@ Partial Class Uni_FileSkimmer
'
'pnl_AddressBar
'
+ Me.pnl_AddressBar.Controls.Add(Me.btn_Refresh)
Me.pnl_AddressBar.Controls.Add(Me.btn_Up)
Me.pnl_AddressBar.Controls.Add(Me.txt_AddressBar)
Me.pnl_AddressBar.Controls.Add(Me.lbl_Address)
@@ -186,11 +246,21 @@ Partial Class Uni_FileSkimmer
Me.pnl_AddressBar.Size = New System.Drawing.Size(800, 36)
Me.pnl_AddressBar.TabIndex = 4
'
+ 'btn_Refresh
+ '
+ Me.btn_Refresh.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
+ Me.btn_Refresh.FlatStyle = System.Windows.Forms.FlatStyle.Flat
+ Me.btn_Refresh.Location = New System.Drawing.Point(5, 5)
+ Me.btn_Refresh.Name = "btn_Refresh"
+ Me.btn_Refresh.Size = New System.Drawing.Size(24, 24)
+ Me.btn_Refresh.TabIndex = 2
+ Me.btn_Refresh.UseVisualStyleBackColor = True
+ '
'btn_Up
'
Me.btn_Up.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
Me.btn_Up.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.btn_Up.Location = New System.Drawing.Point(65, 5)
+ Me.btn_Up.Location = New System.Drawing.Point(28, 5)
Me.btn_Up.Name = "btn_Up"
Me.btn_Up.Size = New System.Drawing.Size(24, 24)
Me.btn_Up.TabIndex = 2
@@ -201,16 +271,16 @@ Partial Class Uni_FileSkimmer
Me.txt_AddressBar.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txt_AddressBar.Font = New System.Drawing.Font("Segoe UI", 10.0!)
- Me.txt_AddressBar.Location = New System.Drawing.Point(161, 5)
+ Me.txt_AddressBar.Location = New System.Drawing.Point(129, 5)
Me.txt_AddressBar.Name = "txt_AddressBar"
- Me.txt_AddressBar.Size = New System.Drawing.Size(627, 25)
+ Me.txt_AddressBar.Size = New System.Drawing.Size(659, 25)
Me.txt_AddressBar.TabIndex = 1
'
'lbl_Address
'
Me.lbl_Address.AutoSize = True
Me.lbl_Address.Font = New System.Drawing.Font("Segoe UI", 10.0!)
- Me.lbl_Address.Location = New System.Drawing.Point(90, 8)
+ Me.lbl_Address.Location = New System.Drawing.Point(58, 8)
Me.lbl_Address.Name = "lbl_Address"
Me.lbl_Address.Size = New System.Drawing.Size(65, 19)
Me.lbl_Address.TabIndex = 0
@@ -221,8 +291,9 @@ Partial Class Uni_FileSkimmer
Me.lsv_Content.BackColor = System.Drawing.Color.White
Me.lsv_Content.BorderStyle = System.Windows.Forms.BorderStyle.None
Me.lsv_Content.Dock = System.Windows.Forms.DockStyle.Fill
+ Me.lsv_Content.Font = New System.Drawing.Font("Segoe UI", 8.0!)
Me.lsv_Content.HideSelection = False
- Me.lsv_Content.Items.AddRange(New System.Windows.Forms.ListViewItem() {ListViewItem2})
+ Me.lsv_Content.Items.AddRange(New System.Windows.Forms.ListViewItem() {ListViewItem1})
Me.lsv_Content.LargeImageList = Me.iml_icons
Me.lsv_Content.Location = New System.Drawing.Point(0, 132)
Me.lsv_Content.MultiSelect = False
@@ -232,29 +303,6 @@ Partial Class Uni_FileSkimmer
Me.lsv_Content.TabIndex = 5
Me.lsv_Content.UseCompatibleStateImageBehavior = False
'
- 'pic_Icon
- '
- Me.pic_Icon.Location = New System.Drawing.Point(10, 42)
- Me.pic_Icon.Name = "pic_Icon"
- Me.pic_Icon.Size = New System.Drawing.Size(64, 64)
- Me.pic_Icon.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
- Me.pic_Icon.TabIndex = 2
- Me.pic_Icon.TabStop = False
- '
- 'btn_NewFolder
- '
- Me.btn_NewFolder.FlatStyle = System.Windows.Forms.FlatStyle.Flat
- Me.btn_NewFolder.Image = Global.ShiftOS_TheRevival.My.Resources.Resources.ico_folder
- Me.btn_NewFolder.ImageAlign = System.Drawing.ContentAlignment.TopCenter
- Me.btn_NewFolder.Location = New System.Drawing.Point(0, 0)
- Me.btn_NewFolder.Name = "btn_NewFolder"
- Me.btn_NewFolder.Size = New System.Drawing.Size(72, 69)
- Me.btn_NewFolder.TabIndex = 0
- Me.btn_NewFolder.Text = "New Folder"
- Me.btn_NewFolder.TextAlign = System.Drawing.ContentAlignment.BottomCenter
- Me.btn_NewFolder.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageAboveText
- Me.btn_NewFolder.UseVisualStyleBackColor = True
- '
'Uni_FileSkimmer
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -277,9 +325,9 @@ Partial Class Uni_FileSkimmer
Me.pnl_Ribbon.ResumeLayout(False)
Me.pnl_Properties.ResumeLayout(False)
Me.pnl_Properties.PerformLayout()
+ CType(Me.pic_Icon, System.ComponentModel.ISupportInitialize).EndInit()
Me.pnl_AddressBar.ResumeLayout(False)
Me.pnl_AddressBar.PerformLayout()
- CType(Me.pic_Icon, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
Me.PerformLayout()
@@ -305,4 +353,7 @@ Partial Class Uni_FileSkimmer
Friend WithEvents PropertyPaneToolStripMenuItem As ToolStripMenuItem
Friend WithEvents btn_NewFolder As Button
Friend WithEvents btn_Up As Button
+ Friend WithEvents btn_Refresh As Button
+ Friend WithEvents btn_Delete As Button
+ Friend WithEvents Button1 As Button
End Class
diff --git a/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.resx b/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.resx
index c259752..aa2fe9c 100644
--- a/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.resx
+++ b/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.resx
@@ -128,7 +128,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAACA
- FwAAAk1TRnQBSQFMAgEBCQEAATgBAAE4AQABKgEAASoBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
+ FwAAAk1TRnQBSQFMAgEBCQEAAUABAAFAAQABKgEAASoBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABqAMAAX4DAAEBAQABCAUAAbABUhgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz
diff --git a/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.vb b/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.vb
index c5fe628..75d97f9 100644
--- a/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.vb
+++ b/ShiftOS-TheRevival/MainForms/Applications/Universal/File Skimmer/Uni_FileSkimmer.vb
@@ -6,6 +6,7 @@ Public Class Uni_FileSkimmer
Dim ItemsDeleted As Integer
Private Sub Uni_FileSkimmer_Load(sender As Object, e As EventArgs) Handles MyBase.Load
+ CheckAvailable()
'Sets icons for buttons in here, for some reason
btn_Up.BackgroundImage = My.Resources.FileSkimmerFunctionIcons.ico_up1
'End thingy
@@ -15,6 +16,11 @@ Public Class Uni_FileSkimmer
ShowContent()
End Sub
+ Private Sub CheckAvailable()
+ btn_NewFolder.Text = "???"
+ btn_NewFolder.Image = Nothing
+ End Sub
+
Private Sub PropertyPaneToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles PropertyPaneToolStripMenuItem.Click
If PropertyPaneToolStripMenuItem.CheckState = False Then
pnl_Properties.Visible = False
@@ -28,41 +34,43 @@ Public Class Uni_FileSkimmer
End Sub
Private Sub btn_Up_Click(sender As Object, e As EventArgs) Handles btn_Up.Click
- If txt_AddressBar.Text = "!\" Then
- btn_Up.Enabled = False
- Else
- Try
- If txt_AddressBar.Text = "!\" Then
- Else
- Dim directoryInfo As System.IO.DirectoryInfo
- directoryInfo = System.IO.Directory.GetParent(txt_AddressBar.Text.Replace("!\", Strings.OnceInfo(1) & "\"))
- txt_AddressBar.Text = directoryInfo.FullName
- CurrentDir = directoryInfo.FullName
-
- Dim endloop As Boolean = False
- txt_AddressBar.Text = txt_AddressBar.Text.Substring(0, txt_AddressBar.Text.Length - 1)
-
- While endloop = False
- Try
- If txt_AddressBar.Text.Substring(txt_AddressBar.Text.Length - 1) = "\" Then
- endloop = True
- Else
- txt_AddressBar.Text = txt_AddressBar.Text.Substring(0, txt_AddressBar.Text.Length - 1)
- End If
- Catch
- End Try
- End While
- ShowContent()
- 'Try
- ' ShowContent()
- 'Catch
-
- 'End Try
- End If
- Catch ex As Exception
+ Try
+ If txt_AddressBar.Text = "!\" Or txt_AddressBar.Text = "!\" Then
- End Try
- End If
+ Else
+ Dim directoryInfo As System.IO.DirectoryInfo
+ MsgBox(CurrentDir.Replace("!\", Strings.OnceInfo(1) & "\"))
+ directoryInfo = System.IO.Directory.GetParent(CurrentDir.Replace("!\", Strings.OnceInfo(1) & "\"))
+ MsgBox(directoryInfo.FullName)
+
+ 'Dim endloop As Boolean = False
+ 'lbllocation.Text = lbllocation.Text.Substring(0, lbllocation.Text.Length - 1)
+
+ 'While endloop = False
+ ' Try
+ ' If lbllocation.Text.Substring(lbllocation.Text.Length - 1) = "/" Then
+ ' endloop = True
+ ' Else
+ ' lbllocation.Text = lbllocation.Text.Substring(0, lbllocation.Text.Length - 1)
+ ' End If
+ ' Catch
+ ' infobox.title = "File Skimmer - Error!"
+ ' infobox.textinfo = "Unable to move into a higher directory due to error reading the requested folder on the drive." & Environment.NewLine & Environment.NewLine & "An error occured going up"
+ ' infobox.Show()
+ ' End Try
+ 'End While
+ Dim DirFullName As String = directoryInfo.FullName
+ txt_AddressBar.Text = DirFullName.Replace(Strings.OnceInfo(1), "!\")
+ CurrentDir = DirFullName
+ ShowContent()
+ End If
+ Catch ex As Exception
+
+ End Try
+ End Sub
+
+ Private Sub btn_Refresh_Click(sender As Object, e As EventArgs) Handles btn_Refresh.Click
+ ShowContent()
End Sub
Private Sub lsv_Content_MouseDoubleClick(sender As Object, e As MouseEventArgs) Handles lsv_Content.MouseDoubleClick
@@ -241,4 +249,8 @@ Public Class Uni_FileSkimmer
'WARNING TO GET BACK BUTTON DISABLED
End If
End Function
+
+ Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btn_Delete.Click, Button1.Click
+ DeleteFile(CurrentDir & lsv_Content.SelectedItems(0).Text)
+ End Sub
End Class \ No newline at end of file