From 2bed5c22ff991077bdd1aadd20275c17c1218211 Mon Sep 17 00:00:00 2001 From: TheUltimateHacker Date: Fri, 29 May 2015 12:39:04 -0400 Subject: Skin Loader for BWM added Next skinning upgrade has been added, which is the Skin Loader that allows you to save and load skins. --- shiftos_next/BWM and CMD Apps/SkinLoader.vb | 39 +++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 shiftos_next/BWM and CMD Apps/SkinLoader.vb (limited to 'shiftos_next/BWM and CMD Apps/SkinLoader.vb') diff --git a/shiftos_next/BWM and CMD Apps/SkinLoader.vb b/shiftos_next/BWM and CMD Apps/SkinLoader.vb new file mode 100644 index 0000000..dd0003f --- /dev/null +++ b/shiftos_next/BWM and CMD Apps/SkinLoader.vb @@ -0,0 +1,39 @@ +Public Class SkinLoader + + Public skintoload As String + + Public Sub readfile(file As String) + Dim filinf As New IO.FileInfo(file) + If filinf.Extension = ".bsk" Then + Dim loadlines() As String = IO.File.ReadAllLines(file) + prev_titlebar.BackColor = Color.FromArgb(loadlines(0)) + prev_titlebar.ForeColor = Color.FromArgb(loadlines(1)) + prev_desktop.BackColor = Color.FromArgb(loadlines(2)) + prev_newterminal.BackColor = Color.FromArgb(loadlines(3)) + prev_newterminal.ForeColor = Color.FromArgb(loadlines(4)) + Else + basicwm_infobox.showinfo("Unsupported file", "The skin file provided cannot be read.") + End If + + End Sub + + Private Sub btnload_Click(sender As Object, e As EventArgs) Handles btnload.Click + file_skimmer.mode = "open" + file_skimmer.application = "skin_loader" + file_skimmer.Show() + End Sub + + Private Sub btnapply_Click(sender As Object, e As EventArgs) Handles btnapply.Click + If Not skintoload = "" Then + loadskin(skintoload) + Else + basicwm_infobox.showinfo("Can't apply skin!", "Cannot apply the skin, as there is currently no skin file loaded.") + End If + End Sub + + Private Sub btnsave_Click(sender As Object, e As EventArgs) Handles btnsave.Click + file_skimmer.mode = "save" + file_skimmer.application = "skin_loader" + file_skimmer.Show() + End Sub +End Class \ No newline at end of file -- cgit v1.2.3