First ever VB mod... it isn't going well.

This commit is contained in:
Michael 2017-02-02 21:57:47 -05:00
parent 487deee243
commit e7731fb58a
27 changed files with 1910 additions and 0 deletions

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

View file

@ -0,0 +1,505 @@
Imports System.IO
Imports System.Drawing
Imports System.Windows.Forms
Module Skins
#Region "Declarations"
Dim firstrun As Boolean = True
'WINDOW SETTINGS/IMAGES
'images
Public titlebar As Image = Nothing
Public titlebarlayout As String = 3
Public borderleft As Image = Nothing
Public borderleftlayout As String = 3
Public borderright As Image = Nothing
Public borderrightlayout As String = 3
Public borderbottom As Image = Nothing
Public borderbottomlayout As String = 3
Public closebtn As Image = Nothing
Public closebtnlayout As String = 3
Public closebtnhover As Image = Nothing
Public closebtnclick As Image = Nothing
Public rollbtn As Image = Nothing
Public rollbtnlayout As String = 3
Public rollbtnhover As Image = Nothing
Public rollbtnclick As Image = Nothing
Public minbtn As Image = Nothing
Public minbtnlayout As String = 3
Public minbtnhover As Image = Nothing
Public minbtnclick As Image = Nothing
Public rightcorner As Image = Nothing
Public rightcornerlayout As String = 3
Public leftcorner As Image = Nothing
Public leftcornerlayout As String = 3
' Late entry: need to fix window code to include this
Public bottomleftcorner As Image = Nothing
Public bottomleftcornerlayout As String = 3
Public bottomrightcorner As Image = Nothing
Public bottomrightcornerlayout As String = 3
Public bottomleftcornercolour As Color = Color.Gray
Public bottomrightcornercolour As Color = Color.Gray
Public enablebordercorners As Boolean = False
' settings
Public closebtnsize As Size = New Size(22, 22)
Public rollbtnsize As Size = New Size(22, 22)
Public minbtnsize As Size = New Size(22, 22)
Public titlebarheight As Integer = 30
Public closebtnfromtop As Integer = 5
Public closebtnfromside As Integer = 2
Public rollbtnfromtop As Integer = 5
Public rollbtnfromside As Integer = 26
Public minbtnfromtop As Integer = 5
Public minbtnfromside As Integer = 52
Public borderwidth As Integer = 2
Public enablecorners As Boolean = False
Public titlebarcornerwidth As Integer = 5
Public titleiconfromside As Integer = 4
Public titleiconfromtop As Integer = 4
'colours
Public titlebarcolour As Color = Color.Gray
Public borderleftcolour As Color = Color.Gray
Public borderrightcolour As Color = Color.Gray
Public borderbottomcolour As Color = Color.Gray
Public closebtncolour As Color = Color.Black
Public closebtnhovercolour As Color = Color.Black
Public closebtnclickcolour As Color = Color.Black
Public rollbtncolour As Color = Color.Black
Public rollbtnhovercolour As Color = Color.Black
Public rollbtnclickcolour As Color = Color.Black
Public minbtncolour As Color = Color.Black
Public minbtnhovercolour As Color = Color.Black
Public minbtnclickcolour As Color = Color.Black
Public rightcornercolour As Color = Color.Gray
Public leftcornercolour As Color = Color.Gray
' Text
Public titletextfontfamily As String = "Microsoft Sans Serif"
Public titletextfontsize As Integer = 10
Public titletextfontstyle As String = FontStyle.Bold
Public titletextpos As String = "Left"
Public titletextfromtop As Integer = 3
Public titletextfromside As Integer = 24
Public titletextcolour As Color = Color.White
'DESKTOP
Public desktoppanelcolour As Color = Color.Gray
Public desktopbackgroundcolour As Color
Public desktoppanelheight As Integer = 24
Public desktoppanelposition As String = "Top"
Public clocktextcolour As Color = Color.Black
Public clockbackgroundcolor As Color = Color.Gray
Public panelclocktexttop As Integer = 3
Public panelclocktextsize As Integer = 10
Public panelclocktextfont As String = "Byington"
Public panelclocktextstyle As FontStyle = FontStyle.Bold
Public applauncherbuttoncolour As Color = Color.Gray
Public applauncherbuttonclickedcolour As Color = Color.Gray
Public applauncherbackgroundcolour As Color = Color.Gray
Public applaunchermouseovercolour As Color = Color.Gray
Public applicationsbuttontextcolour As Color = Color.Black
Public applicationbuttonheight As Integer = 24
Public applicationbuttontextsize As Integer = 10
Public applicationbuttontextfont As String = "Byington"
Public applicationbuttontextstyle As FontStyle = FontStyle.Bold
Public applicationlaunchername As String = "Applications"
Public titletextposition As String = "Left"
Public applaunchermenuholderwidth As Integer = 100
Public panelbuttonicontop As Integer = 3
Public panelbuttoniconside As Integer = 4
Public panelbuttoniconsize As Integer = 16
Public panelbuttonheight As Integer = 20
Public panelbuttonwidth As Integer = 185
Public panelbuttoncolour As Color = Color.Black
Public panelbuttontextcolour As Color = Color.White
Public panelbuttontextsize As Integer = 10
Public panelbuttontextfont As String = "Byington"
Public panelbuttontextstyle As FontStyle = FontStyle.Regular
Public panelbuttontextside As Integer = 16
Public panelbuttontexttop As Integer = 2
Public panelbuttongap As Integer = 4
Public panelbuttonfromtop As Integer = 2
Public panelbuttoninitialgap As Integer = 8
Public launcheritemsize As Integer = 10
Public launcheritemfont As String = "Byington"
Public launcheritemstyle As FontStyle = FontStyle.Regular
Public launcheritemcolour As Color = Color.Black
' Images
Public desktoppanel As Image = Nothing
Public desktoppanellayout As String = 3
Public desktopbackground As Image = Nothing
Public desktopbackgroundlayout As String = 3
Public panelclock As Image = Nothing
Public panelclocklayout As String = 3
Public applaunchermouseover As Image = Nothing
Public applauncher As Image = Nothing
Public applauncherlayout As String = 3
Public applauncherclick As Image = Nothing
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
'DevX's Advanced App Launcher (coded by The Ultimate Hacker)
Public topBarHeight As Integer = 50
Public bottomBarHeight As Integer = 50
Public placesSide As String = "Left"
Public startHeight As Integer = 526
Public startWidth As Integer = 320
Public shutdownstring As String = "Shut Down ShiftOS"
Public userNamePosition = "Middle, Right"
Public recentIconsHorizontal As Boolean = False
Public usernametextcolor As Color = Color.White
Public usernamefont As String = "Trebuchet MS"
Public usernamefontsize As Integer = 12
Public usernamefontstyle As FontStyle = FontStyle.Bold
Public userNamePanelBackgroundColor As Color = Color.Gray
Public userNamePanelBackground As Image
Public powerPanelBackgroundColor As Color = Color.Gray
Public powerPanelBackgroundImage As Image
Public shutdownTextColor As Color = Color.White
Public shutdownTextFont As String = "Trebuchet MS"
Public shutdownTextSize As Integer = 12
Public shutdownTextStyle As FontStyle = FontStyle.Italic
Public usrPanelBackgroundLayout As ImageLayout = ImageLayout.Stretch
Public pwrPanelBackgroundLayout As ImageLayout = ImageLayout.Stretch
Public useClassicAppLauncher As Boolean = True
'0.0.9 ALPHA 2
'Login Screen
Public autologin As Boolean = True
Public fullScreen As Boolean = False
Public inputfont As String = "Trebuchet MS"
Public inputfontsize As Integer = 12
Public inputfontstyle As FontStyle = FontStyle.Regular
Public inputforecolor As Color = Color.Gray
Public inputbackcolor As Color = Color.Black
Public buttonfont As String = "Trebuchet MS"
Public buttonfontsize As Integer = 12
Public buttonfontstyle As FontStyle = FontStyle.Italic
Public userimagesize As Integer = 128
Public userimagelocation As Point = New Point(36, 202)
Public userimage As Image
Public userimagelayout As ImageLayout = ImageLayout.Stretch
Public loginbg As Image
Public loginbgcolor As Color = Color.Black
Public loginbglayout As ImageLayout = ImageLayout.Stretch
'Locations...
Public userTextboxX As Integer = 171
Public userTextBoxY As Integer = 202
Public passTextBoxX As Integer = 171
Public passTextBoxY As Integer = 243
Public loginbtnX As Integer = 268
Public loginbtnY As Integer = 286
Public shutdownbtnX As Integer = 1755
Public shutdownbtnY As Integer = 979
Private Function GetImage(ByVal fileName As String) As Bitmap
Dim ret As Bitmap
Using img As Image = Image.FromFile(fileName)
ret = New Bitmap(img)
End Using
Return ret
End Function
#End Region
Const loadedskin As String = "temp_skn/"
' LOAD SKIN FROM SAVE FOLDER
Public Sub loadimages()
If File.Exists(loadedskin & "userpic") Then
userimage = GetImage(loadedskin & "userpic")
End If
If File.Exists(loadedskin & "loginbg") Then
loginbg = GetImage(loadedskin & "loginbg")
End If
If File.Exists(loadedskin & "userbar") Then
userNamePanelBackground = GetImage(loadedskin & "userbar")
End If
If File.Exists(loadedskin & "powerbar") Then
powerPanelBackgroundImage = GetImage(loadedskin & "powerbar")
End If
If File.Exists(loadedskin & "titlebar") Then
titlebar = GetImage(loadedskin & "titlebar")
Else : titlebar = Nothing
End If
If File.Exists(loadedskin & "borderleft") Then
borderleft = GetImage(loadedskin & "borderleft")
Else : borderleft = Nothing
End If
If File.Exists(loadedskin & "borderright") Then
borderright = GetImage(loadedskin & "borderright".Clone)
Else : borderright = Nothing
End If
If File.Exists(loadedskin & "borderbottom") Then
borderbottom = GetImage(loadedskin & "borderbottom".Clone)
Else : borderbottom = Nothing
End If
If File.Exists(loadedskin & "closebtn") Then
closebtn = GetImage(loadedskin & "closebtn".Clone)
Else : closebtn = Nothing
End If
If File.Exists(loadedskin & "closebtnhover") Then
closebtnhover = GetImage(loadedskin & "closebtnhover".Clone)
Else : closebtnhover = Nothing
End If
If File.Exists(loadedskin & "closebtnclick") Then
closebtnclick = GetImage(loadedskin & "closebtnclick".Clone)
Else : closebtnclick = Nothing
End If
If File.Exists(loadedskin & "rollbtn") Then
rollbtn = GetImage(loadedskin & "rollbtn".Clone)
Else : rollbtn = Nothing
End If
If File.Exists(loadedskin & "rollbtnhover") Then
rollbtnhover = GetImage(loadedskin & "rollbtnhover".Clone)
Else : rollbtnhover = Nothing
End If
If File.Exists(loadedskin & "rollbtnclick") Then
rollbtnclick = GetImage(loadedskin & "rollbtnclick".Clone)
Else : rollbtnclick = Nothing
End If
If File.Exists(loadedskin & "minbtn") Then
minbtn = GetImage(loadedskin & "minbtn".Clone)
Else : minbtn = Nothing
End If
If File.Exists(loadedskin & "minbtnhover") Then
minbtnhover = GetImage(loadedskin & "minbtnhover".Clone)
Else : minbtnhover = Nothing
End If
If File.Exists(loadedskin & "minbtnclick") Then
minbtnclick = GetImage(loadedskin & "minbtnclick".Clone)
Else : minbtnclick = Nothing
End If
If File.Exists(loadedskin & "rightcorner") Then
rightcorner = GetImage(loadedskin & "rightcorner".Clone)
Else : rightcorner = Nothing
End If
If File.Exists(loadedskin & "leftcorner") Then
leftcorner = GetImage(loadedskin & "leftcorner".Clone)
Else : leftcorner = Nothing
End If
If File.Exists(loadedskin & "desktoppanel") Then
desktoppanel = GetImage(loadedskin & "desktoppanel".Clone)
Else : desktoppanel = Nothing
End If
If File.Exists(loadedskin & "desktopbackground") Then
desktopbackground = GetImage(loadedskin & "desktopbackground".Clone)
Else : desktopbackground = Nothing
End If
If File.Exists(loadedskin & "panelbutton") Then
panelbutton = GetImage(loadedskin & "panelbutton".Clone)
Else : panelbutton = Nothing
End If
If File.Exists(loadedskin & "applaunchermouseover") Then
applaunchermouseover = GetImage(loadedskin & "applaunchermouseover".Clone)
Else : applaunchermouseover = Nothing
End If
If File.Exists(loadedskin & "applauncher") Then
applauncher = GetImage(loadedskin & "applauncher".Clone)
Else : applauncher = Nothing
End If
If File.Exists(loadedskin & "applauncherclick") Then
applauncherclick = GetImage(loadedskin & "applauncherclick".Clone)
Else : applauncherclick = Nothing
End If
If File.Exists(loadedskin & "panelclock") Then
panelclock = GetImage(loadedskin & "panelclock".Clone)
Else : panelclock = Nothing
End If
If File.Exists(loadedskin & "bottomleftcorner") Then
bottomleftcorner = GetImage(loadedskin & "bottomleftcorner".Clone)
Else : bottomleftcorner = Nothing
End If
If File.Exists(loadedskin & "bottomrightcorner") Then
bottomrightcorner = GetImage(loadedskin & "bottomrightcorner".Clone)
Else : bottomrightcorner = Nothing
End If
'load settings
Dim loaddata(200) As String
If File.Exists(loadedskin & "data.dat") Then
Dim sr As StreamReader = New StreamReader(loadedskin & "data.dat")
For i As Integer = 0 To 200 Step 1
loaddata(i) = sr.ReadLine
If i = 200 Then
sr.Close()
Exit For
End If
Next
' settings
closebtnsize = New Size(loaddata(1), loaddata(2))
rollbtnsize = New Size(loaddata(3), loaddata(4))
minbtnsize = New Size(loaddata(5), loaddata(6))
titlebarheight = loaddata(7)
closebtnfromtop = loaddata(8)
closebtnfromside = loaddata(9)
rollbtnfromtop = loaddata(10)
rollbtnfromside = loaddata(11)
minbtnfromtop = loaddata(12)
minbtnfromside = loaddata(13)
borderwidth = loaddata(14)
enablecorners = loaddata(15)
titlebarcornerwidth = loaddata(16)
titleiconfromside = loaddata(17)
titleiconfromtop = loaddata(18)
titlebarcolour = Color.FromArgb(loaddata(19))
borderleftcolour = Color.FromArgb(loaddata(20))
borderrightcolour = Color.FromArgb(loaddata(21))
borderbottomcolour = Color.FromArgb(loaddata(22))
closebtncolour = Color.FromArgb(loaddata(23))
closebtnhovercolour = Color.FromArgb(loaddata(24))
closebtnclickcolour = Color.FromArgb(loaddata(25))
rollbtncolour = Color.FromArgb(loaddata(26))
rollbtnhovercolour = Color.FromArgb(loaddata(27))
rollbtnclickcolour = Color.FromArgb(loaddata(28))
minbtncolour = Color.FromArgb(loaddata(29))
minbtnhovercolour = Color.FromArgb(loaddata(30))
minbtnclickcolour = Color.FromArgb(loaddata(31))
rightcornercolour = Color.FromArgb(loaddata(32))
leftcornercolour = Color.FromArgb(loaddata(33))
bottomrightcornercolour = Color.FromArgb(loaddata(34))
bottomleftcornercolour = Color.FromArgb(loaddata(35))
titletextfontfamily = loaddata(36)
titletextfontsize = loaddata(37)
titletextfontstyle = loaddata(38)
titletextpos = loaddata(39)
titletextfromtop = loaddata(40)
titletextfromside = loaddata(41)
titletextcolour = Color.FromArgb(loaddata(42))
desktoppanelcolour = Color.FromArgb(loaddata(43))
desktopbackgroundcolour = Color.FromArgb(loaddata(44))
desktoppanelheight = loaddata(45)
desktoppanelposition = loaddata(46)
clocktextcolour = Color.FromArgb(loaddata(47))
clockbackgroundcolor = Color.FromArgb(loaddata(48))
panelclocktexttop = loaddata(49)
panelclocktextsize = loaddata(50)
panelclocktextfont = loaddata(51)
panelclocktextstyle = loaddata(52)
applauncherbuttoncolour = Color.FromArgb(loaddata(53))
applauncherbuttonclickedcolour = Color.FromArgb(loaddata(54))
applauncherbackgroundcolour = Color.FromArgb(loaddata(55))
applaunchermouseovercolour = Color.FromArgb(loaddata(56))
applicationsbuttontextcolour = Color.FromArgb(loaddata(57))
applicationbuttonheight = loaddata(58)
applicationbuttontextsize = loaddata(59)
applicationbuttontextfont = loaddata(60)
applicationbuttontextstyle = loaddata(61)
applicationlaunchername = loaddata(62)
titletextposition = loaddata(63)
applaunchermenuholderwidth = loaddata(64)
panelbuttonicontop = loaddata(65)
panelbuttoniconside = loaddata(66)
panelbuttoniconsize = loaddata(67)
panelbuttonheight = loaddata(68)
panelbuttonwidth = loaddata(69)
panelbuttoncolour = Color.FromArgb(loaddata(70))
panelbuttontextcolour = Color.FromArgb(loaddata(71))
panelbuttontextsize = loaddata(72)
panelbuttontextfont = loaddata(73)
panelbuttontextstyle = loaddata(74)
panelbuttontextside = loaddata(75)
panelbuttontexttop = loaddata(76)
panelbuttongap = loaddata(77)
panelbuttonfromtop = loaddata(78)
panelbuttoninitialgap = loaddata(79)
'layout stuff
titlebarlayout = loaddata(89)
borderleftlayout = loaddata(90)
borderrightlayout = loaddata(91)
borderbottomlayout = loaddata(92)
closebtnlayout = loaddata(93)
rollbtnlayout = loaddata(94)
minbtnlayout = loaddata(95)
rightcornerlayout = loaddata(96)
leftcornerlayout = loaddata(97)
desktoppanellayout = loaddata(98)
desktopbackgroundlayout = loaddata(99)
panelclocklayout = loaddata(100)
applauncherlayout = loaddata(101)
panelbuttonlayout = loaddata(102)
bottomleftcornerlayout = loaddata(103)
bottomrightcornerlayout = loaddata(104)
' End of 0.0.8 beta 6 save file, check if exists for future features
If Not loaddata(105) = "" Then launcheritemcolour = Color.FromArgb(loaddata(105))
If Not loaddata(106) = "" Then launcheritemfont = loaddata(106)
If Not loaddata(107) = "" Then launcheritemsize = loaddata(107)
If Not loaddata(108) = "" Then launcheritemstyle = loaddata(108)
If Not loaddata(109) = "" Then enablebordercorners = loaddata(109)
'for adding extra features, check:
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)
Try
If loaddata(114) = "" Then topBarHeight = 50 Else topBarHeight = loaddata(114)
Catch ex As Exception
topBarHeight = 50
End Try
If loaddata(115) = "" Then bottomBarHeight = 50 Else bottomBarHeight = loaddata(115)
If loaddata(116) = "" Then placesSide = "Left" Else placesSide = loaddata(116)
If loaddata(117) = "" Then startHeight = 526 Else startHeight = loaddata(117)
If loaddata(118) = "" Then startWidth = 320 Else startWidth = loaddata(118)
If loaddata(119) = "" Then shutdownstring = "Shut Down ShiftOS" Else shutdownstring = loaddata(119)
If loaddata(120) = "" Then userNamePosition = "Middle, Right" Else userNamePosition = loaddata(120)
If loaddata(121) = "" Then recentIconsHorizontal = False Else recentIconsHorizontal = loaddata(121)
If loaddata(122) = "" Then usernametextcolor = Color.White Else usernametextcolor = Color.FromArgb(loaddata(122))
If loaddata(123) = "" Then usernamefont = "Trebuchet MS" Else usernamefont = loaddata(123)
If loaddata(124) = "" Then usernamefontsize = 12 Else usernamefontsize = loaddata(124)
If loaddata(125) = "" Then usernamefontstyle = FontStyle.Bold Else usernamefontstyle = loaddata(125)
If loaddata(126) = "" Then userNamePanelBackgroundColor = Color.Gray Else userNamePanelBackgroundColor = Color.FromArgb(loaddata(126))
If loaddata(127) = "" Then powerPanelBackgroundColor = Color.Gray Else powerPanelBackgroundColor = Color.FromArgb(loaddata(127))
If loaddata(128) = "" Then shutdownTextColor = Color.White Else shutdownTextColor = Color.FromArgb(loaddata(128))
If loaddata(129) = "" Then shutdownTextFont = "Trebuchet MS" Else shutdownTextFont = loaddata(129)
If loaddata(130) = "" Then shutdownTextSize = 12 Else shutdownTextSize = loaddata(130)
If loaddata(131) = "" Then shutdownTextStyle = FontStyle.Italic Else shutdownTextStyle = loaddata(132)
If loaddata(132) = "" Then usrPanelBackgroundLayout = ImageLayout.Stretch Else usrPanelBackgroundLayout = loaddata(132)
If loaddata(133) = "" Then pwrPanelBackgroundLayout = ImageLayout.Stretch Else pwrPanelBackgroundLayout = loaddata(133)
If loaddata(134) = "" Then useClassicAppLauncher = False Else useClassicAppLauncher = loaddata(134)
If loaddata(135) = "" Then autologin = True Else autologin = loaddata(135)
If loaddata(136) = "" Then fullScreen = False Else fullScreen = loaddata(136)
If loaddata(137) = "" Then inputfont = "Trebuchet MS" Else inputfont = loaddata(137)
If loaddata(138) = "" Then inputfontsize = 12 Else inputfontsize = loaddata(138)
If loaddata(139) = "" Then inputfontstyle = FontStyle.Regular Else inputfontstyle = loaddata(139)
If loaddata(140) = "" Then inputforecolor = Color.Gray Else inputforecolor = Color.FromArgb(loaddata(140))
If loaddata(141) = "" Then inputbackcolor = Color.Black Else inputbackcolor = Color.FromArgb(loaddata(141))
If loaddata(142) = "" Then buttonfont = "Trebuchet MS" Else buttonfont = loaddata(142)
If loaddata(143) = "" Then buttonfontsize = 12 Else buttonfontsize = loaddata(143)
If loaddata(144) = "" Then buttonfontstyle = FontStyle.Italic Else buttonfontstyle = loaddata(144)
If loaddata(145) = "" Then userimagesize = 128 Else userimagesize = loaddata(145)
If loaddata(146) = "" And loaddata(147) = "" Then userimagelocation = New Point(36, 202) Else userimagelocation = New Point(loaddata(146), loaddata(147))
If loaddata(148) = "" Then userimagelayout = ImageLayout.Stretch Else userimagelayout = loaddata(148)
If loaddata(149) = "" Then loginbgcolor = Color.Black Else loginbgcolor = Color.FromArgb(loaddata(149))
If loaddata(150) = "" Then loginbglayout = ImageLayout.Stretch Else loginbglayout = loaddata(150)
Else
End If
End Sub
End Module

View file

@ -0,0 +1,107 @@
Imports ShiftOS.Engine
Imports ShiftOS.Objects
Imports ShiftOS.Objects.ShiftFS
Imports System.IO
Imports System.IO.Compression
Imports System.Collections.Generic
Imports System.Drawing
Module Module1
Sub Main()
ShiftOS.WinForms.Program.Main()
End Sub
End Module
<ShiftOS.Engine.Namespace("skinning")>
Public Class SkinConverterCommands
<Command("convert", description:="Converts a specified legacy Skin File to a modern one usable in Skin Loader.")>
<RequiresArgument("in")>
<RequiresArgument("out")>
<RequiresUpgrade("skinning")>
Public Shared Function Convert(args As Dictionary(Of String, Object))
Dim input = args("in").ToString()
Dim output = args("out").ToString()
Dim bytes As Byte() = Utils.ReadAllBytes(input)
System.IO.File.WriteAllBytes("temp.skn", bytes)
If System.IO.Directory.Exists("temp_skn") Then
System.IO.Directory.Delete("temp_skn", True)
End If
Console.WriteLine("Cleaning environment...")
System.IO.Directory.CreateDirectory("temp_skn")
ZipFile.ExtractToDirectory("temp.skn", "temp_skn")
Console.WriteLine("Extracted skin... loading it now.")
loadimages()
Dim skn = New Skin()
'Get images.
Console.Write("Processing images...")
skn.DesktopBackgroundImage = SaveImageToBinary(desktopbackground)
skn.DesktopPanelBackground = SaveImageToBinary(desktoppanel)
skn.CloseButtonImage = SaveImageToBinary(closebtn)
skn.MaximizeButtonImage = SaveImageToBinary(rollbtn)
skn.MinimizeButtonImage = SaveImageToBinary(minbtn)
skn.PanelButtonBG = SaveImageToBinary(panelbutton)
skn.AppLauncherImage = SaveImageToBinary(applauncher)
skn.TitleBarBackground = SaveImageToBinary(titlebar)
skn.TitleLeftCornerWidth = titlebarcornerwidth
skn.TitleRightCornerWidth = titlebarcornerwidth
skn.ShowTitleCorners = True 'I don't know what the legacy version of this is.
skn.TitleLeftBG = SaveImageToBinary(leftcorner)
skn.TitleRightBG = SaveImageToBinary(rightcorner)
skn.LeftBorderBG = SaveImageToBinary(borderleft)
skn.RightBorderBG = SaveImageToBinary(borderright)
skn.BottomBorderBG = SaveImageToBinary(borderbottom)
skn.BottomLBorderBG = SaveImageToBinary(bottomleftcorner)
skn.BottomRBorderBG = SaveImageToBinary(bottomrightcorner)
Console.WriteLine(" ...done.")
Console.Write("Converting desktop settings...")
skn.AppLauncherText = Skins.applicationlaunchername
skn.AppLauncherHolderSize = New Size(applaunchermenuholderwidth, desktoppanelheight)
skn.AppLauncherFromLeft = New Point(0, 0)
skn.DesktopPanelHeight = desktoppanelheight
Select Case desktoppanelposition
Case "Top"
skn.DesktopPanelPosition = 0
Case "Bottom"
skn.DesktopPanelPosition = 1
End Select
skn.DesktopPanelColor = desktoppanelcolour
skn.DesktopPanelClockBackgroundColor = clockbackgroundcolor
skn.DesktopPanelClockColor = clocktextcolour
skn.DesktopPanelClockFont = New Font(panelclocktextfont, panelclocktextsize, panelclocktextstyle)
skn.PanelButtonColor = panelbuttoncolour
skn.PanelButtonTextColor = panelbuttontextcolour
skn.PanelButtonFont = New Font(panelbuttontextfont, panelbuttontextsize, panelbuttontextstyle)
skn.PanelButtonHolderFromLeft = panelbuttoninitialgap
skn.PanelButtonSize = New Size(panelbuttonwidth, panelbuttonheight)
skn.PanelButtonFromLeft = New Point(panelbuttongap, panelbuttonfromtop)
skn.DesktopPanelClockFromRight = New Point(0, 0)
Console.WriteLine(" ...done")
Utils.WriteAllText(output, skn.ToString())
Infobox.Show("Skin converted!", "We have successfully converted your skin and saved it to " + output + ". Go ahead and load it!")
Return True
End Function
Private Shared Function SaveImageToBinary(img As Image) As Byte()
If img Is Nothing Then Return Nothing
Using mStream As New MemoryStream
img.Save(mStream, Imaging.ImageFormat.Png)
Return mStream.ToArray()
End Using
End Function
End Class

View file

@ -0,0 +1,13 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>false</MySubMain>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>2</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View file

@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("ShiftOS.Modding.VB.LegacySkinConverter")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("ShiftOS.Modding.VB.LegacySkinConverter")>
<Assembly: AssemblyCopyright("Copyright © 2017")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("d7cfadf3-50fe-406a-bb3b-73027d3bfeb4")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View file

@ -0,0 +1,62 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ShiftOS.Modding.VB.LegacySkinConverter.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set(ByVal value As Global.System.Globalization.CultureInfo)
resourceCulture = value
End Set
End Property
End Module
End Namespace

View file

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.ShiftOS.Modding.VB.LegacySkinConverter.My.MySettings
Get
Return Global.ShiftOS.Modding.VB.LegacySkinConverter.My.MySettings.Default
End Get
End Property
End Module
End Namespace

View file

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View file

@ -0,0 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{A8CBA038-C147-4A8D-B170-DE6D9ECE8364}</ProjectGuid>
<OutputType>Exe</OutputType>
<StartupObject>ShiftOS.Modding.VB.LegacySkinConverter.Module1</StartupObject>
<RootNamespace>ShiftOS.Modding.VB.LegacySkinConverter</RootNamespace>
<AssemblyName>ShiftOS.Modding.VB.LegacySkinConverter</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Console</MyType>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>ShiftOS.Modding.VB.LegacySkinConverter.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>ShiftOS.Modding.VB.LegacySkinConverter.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Diagnostics" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="LegacySkinEngine.vb" />
<Compile Include="Module1.vb" />
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
<Compile Include="SkinConverter.Designer.vb">
<DependentUpon>SkinConverter.vb</DependentUpon>
</Compile>
<Compile Include="SkinConverter.vb">
<SubType>UserControl</SubType>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="SkinConverter.resx">
<DependentUpon>SkinConverter.vb</DependentUpon>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ShiftOS.Objects\ShiftOS.Objects.csproj">
<Project>{a069089a-8962-4607-b2b2-4cf4a371066e}</Project>
<Name>ShiftOS.Objects</Name>
</ProjectReference>
<ProjectReference Include="..\ShiftOS.WinForms\ShiftOS.WinForms.csproj">
<Project>{2295d2e2-3a00-4e02-b66f-b961ac329fe6}</Project>
<Name>ShiftOS.WinForms</Name>
</ProjectReference>
<ProjectReference Include="..\ShiftOS_TheReturn\ShiftOS.Engine.csproj">
<Project>{7c979b07-0585-4033-a110-e5555b9d6651}</Project>
<Name>ShiftOS.Engine</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -0,0 +1,143 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class SkinConverter
Inherits System.Windows.Forms.UserControl
'UserControl overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.txtin = New System.Windows.Forms.TextBox()
Me.txtout = New System.Windows.Forms.TextBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.btnin = New System.Windows.Forms.Button()
Me.btnout = New System.Windows.Forms.Button()
Me.btnconvert = New System.Windows.Forms.Button()
Me.Panel1.SuspendLayout()
Me.SuspendLayout()
'
'Panel1
'
Me.Panel1.Controls.Add(Me.btnconvert)
Me.Panel1.Controls.Add(Me.btnout)
Me.Panel1.Controls.Add(Me.btnin)
Me.Panel1.Controls.Add(Me.Label2)
Me.Panel1.Controls.Add(Me.Label1)
Me.Panel1.Controls.Add(Me.txtout)
Me.Panel1.Controls.Add(Me.txtin)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(397, 116)
Me.Panel1.TabIndex = 0
'
'txtin
'
Me.txtin.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtin.Location = New System.Drawing.Point(81, 21)
Me.txtin.Name = "txtin"
Me.txtin.ReadOnly = True
Me.txtin.Size = New System.Drawing.Size(221, 20)
Me.txtin.TabIndex = 0
'
'txtout
'
Me.txtout.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtout.Location = New System.Drawing.Point(81, 58)
Me.txtout.Name = "txtout"
Me.txtout.ReadOnly = True
Me.txtout.Size = New System.Drawing.Size(221, 20)
Me.txtout.TabIndex = 1
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Location = New System.Drawing.Point(14, 24)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(50, 13)
Me.Label1.TabIndex = 2
Me.Label1.Text = "Input file:"
'
'Label2
'
Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(14, 61)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(58, 13)
Me.Label2.TabIndex = 3
Me.Label2.Text = "Output file:"
'
'btnin
'
Me.btnin.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnin.Location = New System.Drawing.Point(308, 19)
Me.btnin.Name = "btnin"
Me.btnin.Size = New System.Drawing.Size(75, 23)
Me.btnin.TabIndex = 4
Me.btnin.Text = "Browse"
Me.btnin.UseVisualStyleBackColor = True
'
'btnout
'
Me.btnout.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnout.Location = New System.Drawing.Point(308, 55)
Me.btnout.Name = "btnout"
Me.btnout.Size = New System.Drawing.Size(75, 23)
Me.btnout.TabIndex = 5
Me.btnout.Text = "Browse"
Me.btnout.UseVisualStyleBackColor = True
'
'btnconvert
'
Me.btnconvert.Anchor = System.Windows.Forms.AnchorStyles.Bottom
Me.btnconvert.AutoSize = True
Me.btnconvert.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink
Me.btnconvert.Location = New System.Drawing.Point(168, 84)
Me.btnconvert.Name = "btnconvert"
Me.btnconvert.Size = New System.Drawing.Size(54, 23)
Me.btnconvert.TabIndex = 6
Me.btnconvert.Text = "Convert"
Me.btnconvert.UseVisualStyleBackColor = True
'
'SkinConverter
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Controls.Add(Me.Panel1)
Me.Name = "SkinConverter"
Me.Size = New System.Drawing.Size(397, 116)
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
Me.ResumeLayout(False)
End Sub
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents btnconvert As System.Windows.Forms.Button
Friend WithEvents btnout As System.Windows.Forms.Button
Friend WithEvents btnin As System.Windows.Forms.Button
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents txtout As System.Windows.Forms.TextBox
Friend WithEvents txtin As System.Windows.Forms.TextBox
End Class

View file

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,49 @@
Imports ShiftOS.Engine
<Launcher("Legacy Skin Converter", True, "al_skin_loader", "Customization")>
<RequiresUpgrade("skinning")>
Public Class SkinConverter
Implements IShiftOSWindow
Private Sub btnin_Click(sender As Object, e As EventArgs) Handles btnin.Click
FileSkimmerBackend.GetFile(New String() {".skn"}, FileOpenerStyle.Open, New Action(Of String)(Sub(path As String)
txtin.Text = path
End Sub))
End Sub
Private Sub btnout_Click(sender As Object, e As EventArgs) Handles btnout.Click
FileSkimmerBackend.GetFile(New String() {".skn"}, FileOpenerStyle.Save, New Action(Of String)(Sub(path As String)
txtout.Text = path
End Sub))
End Sub
Private Sub btnconvert_Click(sender As Object, e As EventArgs) Handles btnconvert.Click
If String.IsNullOrWhiteSpace(txtin.Text) Then
Infobox.Show("No input", "Please select a legacy skin file as your input.")
Return
End If
If String.IsNullOrWhiteSpace(txtout.Text) Then
Infobox.Show("No output", "Please select an output file path to place the converted skin.")
Return
End If
TerminalBackend.InvokeCommand("skinning.convert{in:""" + txtin.Text + """,out:""" + txtout.Text + """}")
End Sub
Public Sub OnLoad() Implements IShiftOSWindow.OnLoad
End Sub
Public Sub OnSkinLoad() Implements IShiftOSWindow.OnSkinLoad
End Sub
Public Function OnUnload() As Boolean Implements IShiftOSWindow.OnUnload
Return True
End Function
Public Sub OnUpgrade() Implements IShiftOSWindow.OnUpgrade
End Sub
End Class

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
</configuration>

View file

@ -0,0 +1,30 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Form1
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
components = New System.ComponentModel.Container()
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Text = "Form1"
End Sub
End Class

View file

@ -0,0 +1,3 @@
Public Class Form1
End Class

View file

@ -0,0 +1,38 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.ShiftOS.Modding.VisualBasic.LegacySkinConverter.Form1
End Sub
End Class
End Namespace

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySubMain>true</MySubMain>
<MainForm>Form1</MainForm>
<SingleInstance>false</SingleInstance>
<ShutdownMode>0</ShutdownMode>
<EnableVisualStyles>true</EnableVisualStyles>
<AuthenticationMode>0</AuthenticationMode>
<ApplicationType>0</ApplicationType>
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
</MyApplicationData>

View file

@ -0,0 +1,35 @@
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
' General Information about an assembly is controlled through the following
' set of attributes. Change these attribute values to modify the information
' associated with an assembly.
' Review the values of the assembly attributes
<Assembly: AssemblyTitle("ShiftOS.Modding.VisualBasic.LegacySkinConverter")>
<Assembly: AssemblyDescription("")>
<Assembly: AssemblyCompany("")>
<Assembly: AssemblyProduct("ShiftOS.Modding.VisualBasic.LegacySkinConverter")>
<Assembly: AssemblyCopyright("Copyright © 2017")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
'The following GUID is for the ID of the typelib if this project is exposed to COM
<Assembly: Guid("a3f1f0ed-9353-40b5-b6c0-a51c6f18ca8e")>
' Version information for an assembly consists of the following four values:
'
' Major Version
' Minor Version
' Build Number
' Revision
'
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.0.0.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View file

@ -0,0 +1,62 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My.Resources
'This class was auto-generated by the StronglyTypedResourceBuilder
'class via a tool like ResGen or Visual Studio.
'To add or remove a member, edit your .ResX file then rerun ResGen
'with the /str option, or rebuild your VS project.
'''<summary>
''' A strongly-typed resource class, for looking up localized strings, etc.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
Friend Module Resources
Private resourceMan As Global.System.Resources.ResourceManager
Private resourceCulture As Global.System.Globalization.CultureInfo
'''<summary>
''' Returns the cached ResourceManager instance used by this class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
Get
If Object.ReferenceEquals(resourceMan, Nothing) Then
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("ShiftOS.Modding.VisualBasic.LegacySkinConverter.Resources", GetType(Resources).Assembly)
resourceMan = temp
End If
Return resourceMan
End Get
End Property
'''<summary>
''' Overrides the current thread's CurrentUICulture property for all
''' resource lookups using this strongly typed resource class.
'''</summary>
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Friend Property Culture() As Global.System.Globalization.CultureInfo
Get
Return resourceCulture
End Get
Set(ByVal value As Global.System.Globalization.CultureInfo)
resourceCulture = value
End Set
End Property
End Module
End Namespace

View file

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View file

@ -0,0 +1,73 @@
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.42000
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings)
#Region "My.Settings Auto-Save Functionality"
#If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean
Private Shared addedHandlerLockObject As New Object
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs)
If My.Application.SaveMySettingsOnExit Then
My.Settings.Save()
End If
End Sub
#End If
#End Region
Public Shared ReadOnly Property [Default]() As MySettings
Get
#If _MyType = "WindowsForms" Then
If Not addedHandler Then
SyncLock addedHandlerLockObject
If Not addedHandler Then
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
addedHandler = True
End If
End SyncLock
End If
#End If
Return defaultInstance
End Get
End Property
End Class
End Namespace
Namespace My
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
Friend Module MySettingsProperty
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
Friend ReadOnly Property Settings() As Global.ShiftOS.Modding.VisualBasic.LegacySkinConverter.My.MySettings
Get
Return Global.ShiftOS.Modding.VisualBasic.LegacySkinConverter.My.MySettings.Default
End Get
End Property
End Module
End Namespace

View file

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View file

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{EFC07D36-BE53-4F98-A0D8-E72554136A9A}</ProjectGuid>
<OutputType>WinExe</OutputType>
<StartupObject>ShiftOS.Modding.VisualBasic.LegacySkinConverter.My.MyApplication</StartupObject>
<RootNamespace>ShiftOS.Modding.VisualBasic.LegacySkinConverter</RootNamespace>
<AssemblyName>ShiftOS.Modding.VisualBasic.LegacySkinConverter</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>WindowsForms</MyType>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<DefineDebug>true</DefineDebug>
<DefineTrace>true</DefineTrace>
<OutputPath>bin\Debug\</OutputPath>
<DocumentationFile>ShiftOS.Modding.VisualBasic.LegacySkinConverter.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<DefineDebug>false</DefineDebug>
<DefineTrace>true</DefineTrace>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DocumentationFile>ShiftOS.Modding.VisualBasic.LegacySkinConverter.xml</DocumentationFile>
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
</PropertyGroup>
<PropertyGroup>
<OptionExplicit>On</OptionExplicit>
</PropertyGroup>
<PropertyGroup>
<OptionCompare>Binary</OptionCompare>
</PropertyGroup>
<PropertyGroup>
<OptionStrict>Off</OptionStrict>
</PropertyGroup>
<PropertyGroup>
<OptionInfer>On</OptionInfer>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Net.Http" />
</ItemGroup>
<ItemGroup>
<Import Include="Microsoft.VisualBasic" />
<Import Include="System" />
<Import Include="System.Collections" />
<Import Include="System.Collections.Generic" />
<Import Include="System.Data" />
<Import Include="System.Drawing" />
<Import Include="System.Diagnostics" />
<Import Include="System.Windows.Forms" />
<Import Include="System.Linq" />
<Import Include="System.Xml.Linq" />
<Import Include="System.Threading.Tasks" />
</ItemGroup>
<ItemGroup>
<Compile Include="Form1.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Form1.Designer.vb">
<DependentUpon>Form1.vb</DependentUpon>
<SubType>Form</SubType>
</Compile>
<Compile Include="My Project\AssemblyInfo.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="My Project\Settings.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\Resources.resx">
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>
</None>
<None Include="My Project\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<CustomToolNamespace>My</CustomToolNamespace>
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
</None>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View file

@ -15,6 +15,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShiftOS.MFSProfiler", "Shif
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShiftOS.Modding.VirtualMachine", "ShiftOS.Modding.VirtualMachine\ShiftOS.Modding.VirtualMachine.csproj", "{FF0B1831-AC9F-4093-9747-DDAE4467516A}"
EndProject
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ShiftOS.Modding.VB.LegacySkinConverter", "ShiftOS.Modding.VB.LegacySkinConverter\ShiftOS.Modding.VB.LegacySkinConverter.vbproj", "{A8CBA038-C147-4A8D-B170-DE6D9ECE8364}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -45,6 +47,10 @@ Global
{FF0B1831-AC9F-4093-9747-DDAE4467516A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FF0B1831-AC9F-4093-9747-DDAE4467516A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FF0B1831-AC9F-4093-9747-DDAE4467516A}.Release|Any CPU.Build.0 = Release|Any CPU
{A8CBA038-C147-4A8D-B170-DE6D9ECE8364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A8CBA038-C147-4A8D-B170-DE6D9ECE8364}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A8CBA038-C147-4A8D-B170-DE6D9ECE8364}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A8CBA038-C147-4A8D-B170-DE6D9ECE8364}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View file

@ -132,6 +132,11 @@ namespace ShiftOS.Engine {
//Todo: When making Shifter GUI we need to label all these with proper Shifter attributes to get 'em displaying in the right places.
public override string ToString()
{
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
[ShifterMeta("Windows")]
[ShifterCategory("Titlebar")]
[RequiresUpgrade("shift_title_text")]