Shift Desktop Icons - 0 CP

Yes, I added the ability to customize the Desktop Icons in the Shifter.
This is very basic, and I tried my best to allow older skins to be
converted to enable these abilities. Don't worry though, the title was
just a creative title and no upgrades were added to the Shiftorium. I
also added the ability to delete files from the desktop.
This commit is contained in:
TheUltimateHacker 2015-03-10 18:31:11 -04:00
parent 583b06b4be
commit a2361f8ea1
11 changed files with 417 additions and 70 deletions

View file

@ -1646,6 +1646,9 @@
Private Sub pnlnewcolour_Click(sender As Object, e As EventArgs) Handles pnlnewcolour.Click
Select Case colourtochange
Case "Desktop Icon Text Color"
Shifter.icontextcolor = pnlnewcolour.BackColor
Case "Title Bar Colour"
Shifter.titlebarcolour = pnlnewcolour.BackColor
If Shifter.shifterskintitlebar(0) Is Nothing Then Else Shifter.shifterskintitlebar(0).Dispose()

View file

@ -333,14 +333,14 @@ Partial Class File_Skimmer
Me.fileactions.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DeleteToolStripMenuItem})
Me.fileactions.Name = "fileactions"
Me.fileactions.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional
Me.fileactions.Size = New System.Drawing.Size(153, 48)
Me.fileactions.Size = New System.Drawing.Size(108, 26)
'
'DeleteToolStripMenuItem
'
Me.DeleteToolStripMenuItem.BackColor = System.Drawing.Color.Black
Me.DeleteToolStripMenuItem.ForeColor = System.Drawing.Color.White
Me.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem"
Me.DeleteToolStripMenuItem.Size = New System.Drawing.Size(152, 22)
Me.DeleteToolStripMenuItem.Size = New System.Drawing.Size(107, 22)
Me.DeleteToolStripMenuItem.Text = "Delete"
'
'pullbs

View file

@ -125,7 +125,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAABG
QQAAAk1TRnQBSQFMAgEBFAEAAYABAQGAAQEBKgEAASoBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
QQAAAk1TRnQBSQFMAgEBFAEAAYgBAQGIAQEBKgEAASoBAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABqAMAAfwDAAEBAQABCAUAAWABpRgAAYACAAGAAwACgAEAAYADAAGAAQABgAEAAoACAAPAAQABwAHc
AcABAAHwAcoBpgEAATMFAAEzAQABMwEAATMBAAIzAgADFgEAAxwBAAMiAQADKQEAA1UBAANNAQADQgEA
AzkBAAGAAXwB/wEAAlAB/wEAAZMBAAHWAQAB/wHsAcwBAAHGAdYB7wEAAdYC5wEAAZABqQGtAgAB/wEz

View file

@ -93,9 +93,13 @@ Public Class File_Skimmer
End Sub
Private Sub closebutton_Click(sender As Object, e As EventArgs) Handles closebutton.Click
ShiftOSDesktop.refreshIcons()
Me.Close()
End Sub
Private Sub Me_Close(sender As Object, e As EventArgs) Handles MyBase.FormClosing
ShiftOSDesktop.refreshIcons()
End Sub
Private Sub closebutton_MouseEnter(sender As Object, e As EventArgs) Handles closebutton.MouseEnter, closebutton.MouseUp
closebutton.BackgroundImage = Skins.closebtnhover
End Sub
@ -935,4 +939,6 @@ Public Class File_Skimmer
Private Sub DeleteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DeleteToolStripMenuItem.Click
btndeletefile_Click()
End Sub
End Class

View file

@ -189,9 +189,10 @@ Partial Class ShiftOSDesktop
Me.WebpageToolStripMenuItem = New System.Windows.Forms.ToolStripSeparator()
Me.ShortcutToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem3 = New System.Windows.Forms.ToolStripSeparator()
Me.IconViewToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.TileViewToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem4 = New System.Windows.Forms.ToolStripSeparator()
Me.RenameToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DeleteToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.fileActionsSeparator = New System.Windows.Forms.ToolStripSeparator()
Me.AboutToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.desktoppanel.SuspendLayout()
Me.pnlpanelbuttonholder.SuspendLayout()
@ -1903,7 +1904,7 @@ Partial Class ShiftOSDesktop
'
'ContextMenuStrip1
'
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripMenuItem, Me.ToolStripMenuItem3, Me.IconViewToolStripMenuItem, Me.TileViewToolStripMenuItem, Me.ToolStripMenuItem4, Me.AboutToolStripMenuItem})
Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.NewToolStripMenuItem, Me.ToolStripMenuItem3, Me.TileViewToolStripMenuItem, Me.fileActionsSeparator, Me.AboutToolStripMenuItem})
Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
Me.ContextMenuStrip1.Size = New System.Drawing.Size(170, 104)
'
@ -1971,22 +1972,29 @@ Partial Class ShiftOSDesktop
Me.ToolStripMenuItem3.Name = "ToolStripMenuItem3"
Me.ToolStripMenuItem3.Size = New System.Drawing.Size(166, 6)
'
'IconViewToolStripMenuItem
'
Me.IconViewToolStripMenuItem.Name = "IconViewToolStripMenuItem"
Me.IconViewToolStripMenuItem.Size = New System.Drawing.Size(169, 22)
Me.IconViewToolStripMenuItem.Text = "Icon View"
'
'TileViewToolStripMenuItem
'
Me.TileViewToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.RenameToolStripMenuItem, Me.DeleteToolStripMenuItem})
Me.TileViewToolStripMenuItem.Name = "TileViewToolStripMenuItem"
Me.TileViewToolStripMenuItem.Size = New System.Drawing.Size(169, 22)
Me.TileViewToolStripMenuItem.Text = "Tile View"
Me.TileViewToolStripMenuItem.Text = "File Actions"
'
'ToolStripMenuItem4
'RenameToolStripMenuItem
'
Me.ToolStripMenuItem4.Name = "ToolStripMenuItem4"
Me.ToolStripMenuItem4.Size = New System.Drawing.Size(166, 6)
Me.RenameToolStripMenuItem.Name = "RenameToolStripMenuItem"
Me.RenameToolStripMenuItem.Size = New System.Drawing.Size(117, 22)
Me.RenameToolStripMenuItem.Text = "Rename"
'
'DeleteToolStripMenuItem
'
Me.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem"
Me.DeleteToolStripMenuItem.Size = New System.Drawing.Size(117, 22)
Me.DeleteToolStripMenuItem.Text = "Delete"
'
'fileActionsSeparator
'
Me.fileActionsSeparator.Name = "fileActionsSeparator"
Me.fileActionsSeparator.Size = New System.Drawing.Size(166, 6)
'
'AboutToolStripMenuItem
'
@ -2291,9 +2299,10 @@ Partial Class ShiftOSDesktop
Friend WithEvents WebpageToolStripMenuItem As System.Windows.Forms.ToolStripSeparator
Friend WithEvents ShortcutToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem3 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents IconViewToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents TileViewToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents ToolStripMenuItem4 As System.Windows.Forms.ToolStripSeparator
Friend WithEvents fileActionsSeparator As System.Windows.Forms.ToolStripSeparator
Friend WithEvents AboutToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents NewSkin As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents RenameToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
Friend WithEvents DeleteToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
End Class

View file

@ -120,6 +120,9 @@
<metadata name="desktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>190, 17</value>
</metadata>
<metadata name="desktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>190, 17</value>
</metadata>
<metadata name="clocktick.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>337, 17</value>
</metadata>

View file

@ -1976,6 +1976,10 @@
Item.ForeColor = Skins.launcheritemcolour
Item.Font = New Font(Skins.launcheritemfont, Skins.launcheritemsize, Skins.launcheritemstyle)
Next
For Each Item In TileViewToolStripMenuItem.DropDownItems
Item.ForeColor = Skins.launcheritemcolour
Item.Font = New Font(Skins.launcheritemfont, Skins.launcheritemsize, Skins.launcheritemstyle)
Next
If boughtalclock = True Then
ClockToolStripMenuItem.Visible = True
@ -4620,50 +4624,53 @@
Public Sub refreshIcons()
desktopicons.Items.Clear()
desktopicons.ForeColor = Skins.icontextcolor
desktopicons.View = iconview1
If Skins.showicons = True Then
desktopicons.LargeImageList = File_Skimmer.ImageList1
desktopicons.SmallImageList = File_Skimmer.ImageList1
desktopicons.LargeImageList = File_Skimmer.ImageList1
desktopicons.SmallImageList = File_Skimmer.ImageList1
Dim dir As New IO.DirectoryInfo("C:\ShiftOS\Home\Desktop")
Dim files As IO.FileInfo() = dir.GetFiles()
Dim file As IO.FileInfo
Dim folders As IO.DirectoryInfo() = dir.GetDirectories()
Dim folder As IO.DirectoryInfo
Dim filetype As Integer
For Each folder In folders
Dim Str(3) As String
Dim dir As New IO.DirectoryInfo("C:\ShiftOS\Home\Desktop")
Dim files As IO.FileInfo() = dir.GetFiles()
Dim file As IO.FileInfo
Dim folders As IO.DirectoryInfo() = dir.GetDirectories()
Dim folder As IO.DirectoryInfo
Dim filetype As Integer
For Each folder In folders
Dim Str(3) As String
Str(0) = folder.Name
Str(1) = folder.LastAccessTime
Str(2) = "Directory"
Str(0) = folder.Name
Str(1) = folder.LastAccessTime
Str(2) = "Directory"
Dim folderIcon As New ListViewItem
folderIcon.Text = Str(0)
folderIcon.Tag = folder.FullName
folderIcon.SubItems.Add(Str(1))
folderIcon.SubItems.Add(Str(2))
folderIcon.ImageIndex = 0
Dim folderIcon As New ListViewItem
folderIcon.Text = Str(0)
folderIcon.Tag = folder.FullName
folderIcon.SubItems.Add(Str(1))
folderIcon.SubItems.Add(Str(2))
folderIcon.ImageIndex = 0
desktopicons.Items.Add(folderIcon)
Next
desktopicons.Items.Add(folderIcon)
Next
For Each file In files
Dim filename As String = file.Name
Dim fileex As String = file.Extension
Dim program As String
Dim item As New ListViewItem
For Each file In files
Dim filename As String = file.Name
Dim fileex As String = file.Extension
Dim program As String
Dim item As New ListViewItem
item.Text = filename
item.Tag = file.FullName
item.SubItems.Add(file.LastWriteTime)
item.Text = filename
item.Tag = file.FullName
item.SubItems.Add(file.LastWriteTime)
filetype = File_Skimmer.getExType(fileex)(0)
program = File_Skimmer.getExType(fileex)(1)
filetype = File_Skimmer.getExType(fileex)(0)
program = File_Skimmer.getExType(fileex)(1)
item.SubItems.Add(program)
item.ImageIndex = filetype
desktopicons.Items.Add(item)
Next
item.SubItems.Add(program)
item.ImageIndex = filetype
desktopicons.Items.Add(item)
Next
End If
End Sub
Private Sub ClickDesktopIcon(sender As Object, e As EventArgs) Handles desktopicons.DoubleClick
@ -4679,7 +4686,7 @@
infobox.resizeAndLoad(infobox.Width, 325) 'Resizes Infobox because if not, the full text for the message is cut off.
End Sub
Private Sub IconViewToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles IconViewToolStripMenuItem.Click
Private Sub IconViewToolStripMenuItem_Click(sender As Object, e As EventArgs)
desktopicons.View = View.LargeIcon
refreshIcons()
End Sub
@ -4704,7 +4711,14 @@
infobox.Show()
End Sub
Private Sub desktopicons_SelectedIndexChanged(sender As Object, e As EventArgs) Handles desktopicons.SelectedIndexChanged
Private Sub contextmenu_Show(sender As Object, e As PaintEventArgs) Handles ContextMenuStrip1.Paint
If desktopicons.SelectedItems.Count > 0 Then
TileViewToolStripMenuItem.Visible = True
fileActionsSeparator.Visible = True
Else
TileViewToolStripMenuItem.Visible = False
fileActionsSeparator.Visible = False
End If
End Sub
@ -4745,18 +4759,34 @@
End Sub
Private Sub desktopicons_ItemDrag(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemDragEventArgs) Handles desktopicons.ItemDrag
Dim lvi As ListViewItem = CType(e.Item, ListViewItem)
desktopicons.DoDragDrop(New DataObject("System.Windows.Forms.ListViewItem", lvi), DragDropEffects.Move)
If Skins.enabledraggableicons = True Then
Dim lvi As ListViewItem = CType(e.Item, ListViewItem)
desktopicons.DoDragDrop(New DataObject("System.Windows.Forms.ListViewItem", lvi), DragDropEffects.Move)
End If
End Sub
Private Sub desktopicons_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles desktopicons.DragEnter
If e.Data.GetDataPresent("System.Windows.Forms.ListViewItem") Then
e.Effect = DragDropEffects.Move
If Skins.enabledraggableicons = True Then
If e.Data.GetDataPresent("System.Windows.Forms.ListViewItem") Then
e.Effect = DragDropEffects.Move
End If
End If
End Sub
Private Sub desktopicons_DragOver(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles desktopicons.DragOver
Dim lvi As ListViewItem = CType(e.Data.GetData("System.Windows.Forms.ListViewItem"), ListViewItem)
Dim Offset As Size = Size.Subtract(Cursor.Size, New Size(Cursor.HotSpot.X, Cursor.HotSpot.Y))
lvi.Position = Point.Subtract(desktopicons.PointToClient(New Point(e.X, e.Y)), Offset)
e.Effect = DragDropEffects.Move
If Skins.enabledraggableicons = True Then
Dim lvi As ListViewItem = CType(e.Data.GetData("System.Windows.Forms.ListViewItem"), ListViewItem)
Dim Offset As Size = Size.Subtract(Cursor.Size, New Size(Cursor.HotSpot.X, Cursor.HotSpot.Y))
lvi.Position = Point.Subtract(desktopicons.PointToClient(New Point(e.X, e.Y)), Offset)
e.Effect = DragDropEffects.Move
End If
End Sub
Private Sub DeleteToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles DeleteToolStripMenuItem.Click
If My.Computer.FileSystem.DirectoryExists(desktopicons.SelectedItems(0).Tag) Then
My.Computer.FileSystem.DeleteDirectory(desktopicons.SelectedItems(0).Tag, FileIO.DeleteDirectoryOption.DeleteAllContents)
Else
My.Computer.FileSystem.DeleteFile(desktopicons.SelectedItems(0).Tag)
End If
refreshIcons()
End Sub
End Class

View file

@ -45,6 +45,7 @@ Partial Class Shifter
Me.btnapply = New System.Windows.Forms.Button()
Me.catholder = New System.Windows.Forms.Panel()
Me.btnreset = New System.Windows.Forms.Button()
Me.btndeskdoubleplus = New System.Windows.Forms.Button()
Me.btnprograms = New System.Windows.Forms.Button()
Me.btnicons = New System.Windows.Forms.Button()
Me.btnwindows = New System.Windows.Forms.Button()
@ -314,8 +315,21 @@ Partial Class Shifter
Me.Label109 = New System.Windows.Forms.Label()
Me.Label111 = New System.Windows.Forms.Label()
Me.pgcontents = New System.Windows.Forms.Panel()
Me.pnldeskdoubleplus = New System.Windows.Forms.Panel()
Me.tmrfix = New System.Windows.Forms.Timer(Me.components)
Me.tmrdelay = New System.Windows.Forms.Timer(Me.components)
Me.pnldppoptions = New System.Windows.Forms.Panel()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.desktopiconspreview = New System.Windows.Forms.ListView()
Me.btndppicons = New System.Windows.Forms.Button()
Me.btndppfiles = New System.Windows.Forms.Button()
Me.btndppappearance = New System.Windows.Forms.Button()
Me.btndppfunctions = New System.Windows.Forms.Button()
Me.pnldppfunctions = New System.Windows.Forms.Panel()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.pnldppicons = New System.Windows.Forms.Panel()
Me.Label117 = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.pgleft.SuspendLayout()
Me.pgright.SuspendLayout()
Me.titlebar.SuspendLayout()
@ -356,6 +370,11 @@ Partial Class Shifter
CType(Me.prepnlicon, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlreset.SuspendLayout()
Me.pgcontents.SuspendLayout()
Me.pnldeskdoubleplus.SuspendLayout()
Me.pnldppoptions.SuspendLayout()
Me.Panel2.SuspendLayout()
Me.pnldppfunctions.SuspendLayout()
Me.pnldppicons.SuspendLayout()
Me.SuspendLayout()
'
'pgleft
@ -528,6 +547,7 @@ Partial Class Shifter
'
Me.catholder.BackColor = System.Drawing.Color.White
Me.catholder.Controls.Add(Me.btnreset)
Me.catholder.Controls.Add(Me.btndeskdoubleplus)
Me.catholder.Controls.Add(Me.btnprograms)
Me.catholder.Controls.Add(Me.btnicons)
Me.catholder.Controls.Add(Me.btnwindows)
@ -543,7 +563,7 @@ Partial Class Shifter
Me.btnreset.Dock = System.Windows.Forms.DockStyle.Top
Me.btnreset.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnreset.Font = New System.Drawing.Font("Cambria", 12.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnreset.Location = New System.Drawing.Point(0, 116)
Me.btnreset.Location = New System.Drawing.Point(0, 145)
Me.btnreset.Name = "btnreset"
Me.btnreset.Size = New System.Drawing.Size(119, 29)
Me.btnreset.TabIndex = 8
@ -551,6 +571,20 @@ Partial Class Shifter
Me.btnreset.Text = "Reset"
Me.btnreset.UseVisualStyleBackColor = False
'
'btndeskdoubleplus
'
Me.btndeskdoubleplus.BackColor = System.Drawing.Color.White
Me.btndeskdoubleplus.Dock = System.Windows.Forms.DockStyle.Top
Me.btndeskdoubleplus.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btndeskdoubleplus.Font = New System.Drawing.Font("Cambria", 12.0!, CType((System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Italic), System.Drawing.FontStyle), System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btndeskdoubleplus.Location = New System.Drawing.Point(0, 116)
Me.btndeskdoubleplus.Name = "btndeskdoubleplus"
Me.btndeskdoubleplus.Size = New System.Drawing.Size(119, 29)
Me.btndeskdoubleplus.TabIndex = 9
Me.btndeskdoubleplus.TabStop = False
Me.btndeskdoubleplus.Text = "Desktop++"
Me.btndeskdoubleplus.UseVisualStyleBackColor = False
'
'btnprograms
'
Me.btnprograms.BackColor = System.Drawing.Color.White
@ -3430,6 +3464,7 @@ Partial Class Shifter
'pgcontents
'
Me.pgcontents.BackColor = System.Drawing.Color.White
Me.pgcontents.Controls.Add(Me.pnldeskdoubleplus)
Me.pgcontents.Controls.Add(Me.pnlreset)
Me.pgcontents.Controls.Add(Me.pnlwindowsoptions)
Me.pgcontents.Controls.Add(Me.pnldesktopoptions)
@ -3443,6 +3478,15 @@ Partial Class Shifter
Me.pgcontents.Size = New System.Drawing.Size(596, 307)
Me.pgcontents.TabIndex = 0
'
'pnldeskdoubleplus
'
Me.pnldeskdoubleplus.Controls.Add(Me.Panel2)
Me.pnldeskdoubleplus.Controls.Add(Me.pnldppoptions)
Me.pnldeskdoubleplus.Location = New System.Drawing.Point(134, 9)
Me.pnldeskdoubleplus.Name = "pnldeskdoubleplus"
Me.pnldeskdoubleplus.Size = New System.Drawing.Size(457, 292)
Me.pnldeskdoubleplus.TabIndex = 19
'
'tmrfix
'
Me.tmrfix.Interval = 5000
@ -3450,6 +3494,121 @@ Partial Class Shifter
'tmrdelay
'
'
'pnldppoptions
'
Me.pnldppoptions.Controls.Add(Me.pnldppicons)
Me.pnldppoptions.Controls.Add(Me.pnldppfunctions)
Me.pnldppoptions.Controls.Add(Me.btndppfunctions)
Me.pnldppoptions.Controls.Add(Me.btndppappearance)
Me.pnldppoptions.Controls.Add(Me.btndppfiles)
Me.pnldppoptions.Controls.Add(Me.btndppicons)
Me.pnldppoptions.Location = New System.Drawing.Point(5, 176)
Me.pnldppoptions.Name = "pnldppoptions"
Me.pnldppoptions.Size = New System.Drawing.Size(446, 110)
Me.pnldppoptions.TabIndex = 0
'
'Panel2
'
Me.Panel2.Controls.Add(Me.desktopiconspreview)
Me.Panel2.Location = New System.Drawing.Point(5, 8)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(448, 166)
Me.Panel2.TabIndex = 1
'
'desktopiconspreview
'
Me.desktopiconspreview.Dock = System.Windows.Forms.DockStyle.Fill
Me.desktopiconspreview.Location = New System.Drawing.Point(0, 0)
Me.desktopiconspreview.Name = "desktopiconspreview"
Me.desktopiconspreview.Size = New System.Drawing.Size(448, 166)
Me.desktopiconspreview.TabIndex = 0
Me.desktopiconspreview.UseCompatibleStateImageBehavior = False
'
'btndppicons
'
Me.btndppicons.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btndppicons.Location = New System.Drawing.Point(7, 35)
Me.btndppicons.Name = "btndppicons"
Me.btndppicons.Size = New System.Drawing.Size(75, 23)
Me.btndppicons.TabIndex = 0
Me.btndppicons.Text = "Icons"
Me.btndppicons.UseVisualStyleBackColor = True
'
'btndppfiles
'
Me.btndppfiles.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btndppfiles.Location = New System.Drawing.Point(7, 58)
Me.btndppfiles.Name = "btndppfiles"
Me.btndppfiles.Size = New System.Drawing.Size(75, 23)
Me.btndppfiles.TabIndex = 1
Me.btndppfiles.Text = "Files"
Me.btndppfiles.UseVisualStyleBackColor = True
'
'btndppappearance
'
Me.btndppappearance.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btndppappearance.Location = New System.Drawing.Point(7, 81)
Me.btndppappearance.Name = "btndppappearance"
Me.btndppappearance.Size = New System.Drawing.Size(75, 23)
Me.btndppappearance.TabIndex = 2
Me.btndppappearance.Text = "Appearance"
Me.btndppappearance.UseVisualStyleBackColor = True
'
'btndppfunctions
'
Me.btndppfunctions.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btndppfunctions.Location = New System.Drawing.Point(7, 12)
Me.btndppfunctions.Name = "btndppfunctions"
Me.btndppfunctions.Size = New System.Drawing.Size(75, 23)
Me.btndppfunctions.TabIndex = 3
Me.btndppfunctions.Text = "Functions"
Me.btndppfunctions.UseVisualStyleBackColor = True
'
'pnldppfunctions
'
Me.pnldppfunctions.Controls.Add(Me.CheckBox1)
Me.pnldppfunctions.Location = New System.Drawing.Point(89, 6)
Me.pnldppfunctions.Name = "pnldppfunctions"
Me.pnldppfunctions.Size = New System.Drawing.Size(352, 100)
Me.pnldppfunctions.TabIndex = 4
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Location = New System.Drawing.Point(7, 8)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(122, 17)
Me.CheckBox1.TabIndex = 0
Me.CheckBox1.Text = "Icons are Draggable"
Me.CheckBox1.UseVisualStyleBackColor = True
'
'pnldppicons
'
Me.pnldppicons.Controls.Add(Me.Button1)
Me.pnldppicons.Controls.Add(Me.Label117)
Me.pnldppicons.Location = New System.Drawing.Point(89, 6)
Me.pnldppicons.Name = "pnldppicons"
Me.pnldppicons.Size = New System.Drawing.Size(352, 100)
Me.pnldppicons.TabIndex = 5
'
'Label117
'
Me.Label117.AutoSize = True
Me.Label117.Location = New System.Drawing.Point(7, 12)
Me.Label117.Name = "Label117"
Me.Label117.Size = New System.Drawing.Size(82, 13)
Me.Label117.TabIndex = 0
Me.Label117.Text = "Icon Text Color:"
'
'Button1
'
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Location = New System.Drawing.Point(88, 6)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(29, 23)
Me.Button1.TabIndex = 1
Me.Button1.UseVisualStyleBackColor = True
'
'Shifter
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@ -3526,6 +3685,13 @@ Partial Class Shifter
Me.pnlreset.ResumeLayout(False)
Me.pgcontents.ResumeLayout(False)
Me.pgcontents.PerformLayout()
Me.pnldeskdoubleplus.ResumeLayout(False)
Me.pnldppoptions.ResumeLayout(False)
Me.Panel2.ResumeLayout(False)
Me.pnldppfunctions.ResumeLayout(False)
Me.pnldppfunctions.PerformLayout()
Me.pnldppicons.ResumeLayout(False)
Me.pnldppicons.PerformLayout()
Me.ResumeLayout(False)
End Sub
@ -3821,4 +3987,18 @@ Partial Class Shifter
Friend WithEvents Label115 As System.Windows.Forms.Label
Friend WithEvents launcheritemfont As System.Windows.Forms.ComboBox
Friend WithEvents Label114 As System.Windows.Forms.Label
Friend WithEvents btndeskdoubleplus As System.Windows.Forms.Button
Friend WithEvents pnldeskdoubleplus As System.Windows.Forms.Panel
Friend WithEvents Panel2 As System.Windows.Forms.Panel
Friend WithEvents desktopiconspreview As System.Windows.Forms.ListView
Friend WithEvents pnldppoptions As System.Windows.Forms.Panel
Friend WithEvents pnldppfunctions As System.Windows.Forms.Panel
Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox
Friend WithEvents btndppfunctions As System.Windows.Forms.Button
Friend WithEvents btndppappearance As System.Windows.Forms.Button
Friend WithEvents btndppfiles As System.Windows.Forms.Button
Friend WithEvents btndppicons As System.Windows.Forms.Button
Friend WithEvents pnldppicons As System.Windows.Forms.Panel
Friend WithEvents Button1 As System.Windows.Forms.Button
Friend WithEvents Label117 As System.Windows.Forms.Label
End Class

View file

@ -142,6 +142,9 @@ The basic process of modifying your ShiftOS interface is very simple. You first
<metadata name="predesktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>680, 17</value>
</metadata>
<metadata name="predesktopappmenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>680, 17</value>
</metadata>
<data name="Label69.Text" xml:space="preserve">
<value>Welcome to the desktop settings panel. Here you can modify the appearance of the controls that are displayed on your desktop. Just select a sub option to the left to get started!

View file

@ -83,6 +83,7 @@
Public minimizebuttonwidth As Integer
Public minimizebuttonside As Integer
Public minimizebuttontop As Integer
Public icontextcolor As Color
'skins
Public shifterskinimages(100) As String
@ -123,7 +124,7 @@
Public customizationsdone As Integer
Public customizationpointsearned As Integer
Dim bmp As Bitmap
#Region "Template Code"
Private Sub Template_Load(sender As Object, e As EventArgs) Handles MyBase.Load
justopened = True
Me.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
@ -517,8 +518,8 @@
Me.Hide()
ShiftOSDesktop.setuppanelbuttons()
End Sub
#End Region
'end of general setup
Private Sub initialsetup()
titlebarcolour = Skins.titlebarcolour
@ -598,6 +599,23 @@
txtlauncheritemtxtsize.Text = Skins.launcheritemsize
launcheritemtxtcolour.BackColor = Skins.launcheritemcolour
launcheritemfont.Text = Skins.launcheritemfont
icontextcolor = Skins.icontextcolor
'Uncomment when I (The Ultimate Hacker) have gotten the Shiftnet Download for
'Desktop++ Done:
'If ShiftOSDesktop.boughtdesktopicons = True Then
' btndeskdoubleplus.Visible = True
'End If
desktopiconspreview.BackColor = Skins.desktopbackgroundcolour
If Skins.desktopbackground Is Nothing Then desktopiconspreview.BackgroundImage = Nothing Else desktopiconspreview.BackgroundImage = Skins.desktopbackground
desktopiconspreview.BackgroundImageLayout = Skins.desktopbackgroundlayout
desktopiconspreview.ForeColor = Skins.icontextcolor
CheckBox1.Checked = Skins.enabledraggableicons
refreshIcons()
'skins
'Array.Copy(ShiftOSDesktop.skinimages, shifterskinimages, shifterskinimages.Length)
@ -1368,6 +1386,9 @@
Skins.enablebordercorners = cbindividualbordercolours.Checked
Skins.titleiconfromside = titlebariconside
Skins.titleiconfromtop = titlebaricontop
Skins.enabledraggableicons = CheckBox1.Checked
Skins.icontextcolor = icontextcolor
' APPLY
Skins.saveskinfiles(True)
'windows resize fix
@ -3005,4 +3026,79 @@
Private Sub launcheritemstyle_SelectedIndexChanged(sender As Object, e As EventArgs) Handles launcheritemstyle.SelectedIndexChanged
setuppreshifterstuff()
End Sub
Private Sub btndeskdoubleplus_Click(sender As Object, e As EventArgs) Handles btndeskdoubleplus.Click
pnldeskdoubleplus.BringToFront()
End Sub
Public Sub refreshIcons()
desktopiconspreview.Items.Clear()
If Skins.showicons = True Then
desktopiconspreview.LargeImageList = File_Skimmer.ImageList1
desktopiconspreview.SmallImageList = File_Skimmer.ImageList1
Dim dir As New IO.DirectoryInfo("C:\ShiftOS\Home\Desktop")
Dim files As IO.FileInfo() = dir.GetFiles()
Dim file As IO.FileInfo
Dim folders As IO.DirectoryInfo() = dir.GetDirectories()
Dim folder As IO.DirectoryInfo
Dim filetype As Integer
For Each folder In folders
Dim Str(3) As String
Str(0) = folder.Name
Str(1) = folder.LastAccessTime
Str(2) = "Directory"
Dim folderIcon As New ListViewItem
folderIcon.Text = Str(0)
folderIcon.Tag = folder.FullName
folderIcon.SubItems.Add(Str(1))
folderIcon.SubItems.Add(Str(2))
folderIcon.ImageIndex = 0
desktopiconspreview.Items.Add(folderIcon)
Next
For Each file In files
Dim filename As String = file.Name
Dim fileex As String = file.Extension
Dim program As String
Dim item As New ListViewItem
item.Text = filename
item.Tag = file.FullName
item.SubItems.Add(file.LastWriteTime)
filetype = File_Skimmer.getExType(fileex)(0)
program = File_Skimmer.getExType(fileex)(1)
item.SubItems.Add(program)
item.ImageIndex = filetype
desktopiconspreview.Items.Add(item)
Next
End If
End Sub
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckedChanged
End Sub
Private Sub btndppfunctions_Click(sender As Object, e As EventArgs) Handles btndppfunctions.Click
pnldppfunctions.BringToFront()
End Sub
Private Sub btndppicons_Click(sender As Object, e As EventArgs) Handles btndppicons.Click
pnldppicons.BringToFront()
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Colour_Picker.colourtochange = "Desktop Icon Text Color"
Colour_Picker.oldcolour = icontextcolor
Colour_Picker.Show()
Button1.BackColor = icontextcolor
desktopiconspreview.ForeColor = icontextcolor
End Sub
End Class

View file

@ -138,6 +138,14 @@ Module Skins
Public panelbutton As Image = Nothing
Public panelbuttonlayout As String = 3
'Below is all for the Desktop Icons patch.
Public enabledraggableicons As Boolean = True
Public icontextcolor As Color = Color.White
Public showicons As Boolean = True
Public iconview1 As View = View.LargeIcon
Public iconview2 As View = View.Tile
Private Function GetImage(ByVal fileName As String) As Bitmap
Dim ret As Bitmap
Using img As Image = Image.FromFile(fileName)
@ -369,7 +377,11 @@ Module Skins
If Not loaddata(109) = "" Then enablebordercorners = loaddata(109)
'for adding extra features, check:
'If loaddata(110) = "" Or loaddata(110) = "End of skin data" Then dostuff()
If loaddata(110) = "" Or loaddata(110) = "End of skin data" Then loaddata(110) = enabledraggableicons Else enabledraggableicons = loaddata(110)
If loaddata(111) = "" Or loaddata(111) = "End of skin data" Then loaddata(111) = icontextcolor.ToArgb Else icontextcolor = Color.FromArgb(loaddata(111))
If loaddata(112) = "" Or loaddata(112) = "End of skin data" Then loaddata(112) = showicons Else showicons = loaddata(112)
If loaddata(113) = "" Or loaddata(113) = "End of skin data" Then loaddata(113) = iconview1 Else iconview1 = loaddata(113)
If loaddata(114) = "" Or loaddata(114) = "End of skin data" Then loaddata(114) = iconview2 Else iconview2 = loaddata(114)
Else
setupdefaults()
End If
@ -542,7 +554,11 @@ Module Skins
savedata(107) = launcheritemsize
savedata(108) = launcheritemstyle
savedata(109) = enablebordercorners
savedata(110) = enabledraggableicons
savedata(111) = icontextcolor.ToArgb
savedata(112) = showicons
savedata(113) = iconview1
savedata(114) = iconview2
' End of skin data text was at line 110, if adding future items, check for "End of skin data" on line 110
savedata(200) = "End of skin data"
File.WriteAllLines(savepath + "Shiftum42\Skins\Loaded\data.dat", savedata)
@ -672,6 +688,7 @@ Module Skins
applauncherclick = Nothing
panelbutton = Nothing
panelbuttonlayout = 3
enabledraggableicons = True
End Sub
Private Sub saveimage(ByVal img As Image, ByVal name As String)
If Not IsNothing(img) Then