BWM - Skinning!

Yay! ShiftOS Next can finally be Shifted! Yes, that's true. I've added
basic skinning to the Basic Window Manager. Currently, the only way to
get to it is by typing "open shifter" in the Terminal, and the Shifter
will open. Choose the settings you want and hit Apply!

This is also the Alpha 3 commit, so after this I'll make the next
release.
This commit is contained in:
TheUltimateHacker 2015-05-29 09:57:53 -04:00
parent 424931951b
commit ccdbbbed18
23 changed files with 507 additions and 59 deletions

Binary file not shown.

View file

@ -73,6 +73,8 @@
Public Sub OpenProgram(progtoopen As String) Public Sub OpenProgram(progtoopen As String)
Select Case progtoopen Select Case progtoopen
Case "shifter", "skin", "shift"
Shifter.Show()
Case "shiftorium", "packages", "pacman", "code shop" Case "shiftorium", "packages", "pacman", "code shop"
shiftorium_cmd.Show() shiftorium_cmd.Show()
Case "files", "fileskimmer", "file skimmer", "fs", "file browser" Case "files", "fileskimmer", "file skimmer", "fs", "file browser"
@ -108,7 +110,8 @@
Else Else
AddLine("close: Invalid program """ & progtoclose & """.") AddLine("close: Invalid program """ & progtoclose & """.")
End If End If
Case "shifter", "skin", "shift"
Shifter.Hide()
Case Else Case Else
AddLine("close: Invalid program """ & progtoclose & """.") AddLine("close: Invalid program """ & progtoclose & """.")
End Select End Select

View file

@ -0,0 +1,53 @@
Module Skins
'<summary>
' This module allows for skinning. Simply that.
'</summary>
#Region "Basic Window Manager"
Public titlebarcolor As Color = Color.Gray
Public titlebartextcolor As Color = Color.White
Public desktopbackcolor As Color = Color.Black
Public newterminalbuttonbackcolor As Color = Color.Black
Public newterminalbuttontextcolor As Color = Color.White
'Load Skin from Save File
Public Sub loadskindata()
Try
Dim loadlines() As String = IO.File.ReadAllLines(bwmskin + "data.bsk")
titlebarcolor = Color.FromArgb(loadlines(0))
titlebartextcolor = Color.FromArgb(loadlines(1))
desktopbackcolor = Color.FromArgb(loadlines(2))
newterminalbuttonbackcolor = Color.FromArgb(loadlines(3))
newterminalbuttontextcolor = Color.FromArgb(loadlines(4))
BasicWM.Desktop.Redraw()
Catch ex As Exception
saveskindata()
loadskindata()
End Try
End Sub
'Save to save data
Public Sub saveskindata()
Dim savelines(200) As String
savelines(0) = titlebarcolor.ToArgb
savelines(1) = titlebartextcolor.ToArgb
savelines(2) = desktopbackcolor.ToArgb
savelines(3) = newterminalbuttonbackcolor.ToArgb
savelines(4) = newterminalbuttontextcolor.ToArgb
Try
IO.File.WriteAllLines(bwmskin + "data.bsk", savelines)
Catch ex As Exception
IO.Directory.CreateDirectory(bwmskin)
IO.File.WriteAllLines(bwmskin + "data.bsk", savelines)
End Try
BasicWM.Desktop.Redraw()
End Sub
#End Region
End Module

View file

@ -12,6 +12,9 @@
Public systemdir As String = root + "\Shiftum42\" Public systemdir As String = root + "\Shiftum42\"
Public drivers As String = systemdir + "Drivers\" Public drivers As String = systemdir + "Drivers\"
Public skindir As String = systemdir + "Skins\"
Public bwmskin As String = skindir + "BWM\"
Public save As String = drivers + "HDD.dri" Public save As String = drivers + "HDD.dri"

View file

@ -1,5 +1,7 @@
Public Class Titlebar Public Class Titlebar
Friend WithEvents tmrcheckskin As New Timer
Public Property AppName As String Public Property AppName As String
Set(value As String) Set(value As String)
lbtitle.Text = value lbtitle.Text = value
@ -13,7 +15,9 @@
Private Sub Titlebar_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub Titlebar_Load(sender As Object, e As EventArgs) Handles Me.Load
Me.Dock = DockStyle.Top Me.Dock = DockStyle.Top
Me.BringToFront() Me.SendToBack()
tmrcheckskin.Interval = 200
tmrcheckskin.Start()
End Sub End Sub
Private Sub titlebar_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown, lbtitle.MouseDown Private Sub titlebar_MouseDown(sender As Object, e As MouseEventArgs) Handles Me.MouseDown, lbtitle.MouseDown
@ -46,4 +50,21 @@
End If End If
End Sub End Sub
Public Sub shiftorium_special()
If boughtbasicwm = True Then
lbtitle.TextAlign = ContentAlignment.MiddleLeft
lbtitle.BackColor = Color.Gray
ParentForm.TopMost = True
ParentForm.WindowState = FormWindowState.Normal
Else
lbtitle.TextAlign = ContentAlignment.MiddleCenter
lbtitle.BackColor = Color.Black
ParentForm.WindowState = FormWindowState.Maximized
End If
End Sub
Private Sub tmrcheckskin_Tick(sender As Object, e As EventArgs) Handles tmrcheckskin.Tick
lbtitle.BackColor = titlebarcolor
lbtitle.ForeColor = titlebartextcolor
End Sub
End Class End Class

View file

@ -0,0 +1,201 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class Shifter
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()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Shifter))
Me.titlebar = New shiftos_next.Titlebar()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.btntitletext = New System.Windows.Forms.Button()
Me.btndeskbackcolor = New System.Windows.Forms.Button()
Me.btntitlebackcolor = New System.Windows.Forms.Button()
Me.btnnttext = New System.Windows.Forms.Button()
Me.btnntback = New System.Windows.Forms.Button()
Me.btnapply = New System.Windows.Forms.Button()
Me.SuspendLayout()
'
'titlebar
'
Me.titlebar.AppName = "Shifter - v1.0"
Me.titlebar.Dock = System.Windows.Forms.DockStyle.Top
Me.titlebar.Font = New System.Drawing.Font("Courier New", 8.25!)
Me.titlebar.ForeColor = System.Drawing.Color.White
Me.titlebar.Location = New System.Drawing.Point(0, 0)
Me.titlebar.Name = "titlebar"
Me.titlebar.Size = New System.Drawing.Size(420, 34)
Me.titlebar.TabIndex = 0
'
'Label1
'
Me.Label1.Location = New System.Drawing.Point(13, 51)
Me.Label1.Name = "Label1"
Me.Label1.Size = New System.Drawing.Size(395, 91)
Me.Label1.TabIndex = 1
Me.Label1.Text = resources.GetString("Label1.Text")
'
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Location = New System.Drawing.Point(13, 167)
Me.Label2.Name = "Label2"
Me.Label2.Size = New System.Drawing.Size(147, 14)
Me.Label2.TabIndex = 2
Me.Label2.Text = "Titlebar Text Color:"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Location = New System.Drawing.Point(13, 196)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(189, 14)
Me.Label3.TabIndex = 3
Me.Label3.Text = "Titlebar Background Color:"
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Location = New System.Drawing.Point(211, 167)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(105, 14)
Me.Label4.TabIndex = 4
Me.Label4.Text = "Desktop Color:"
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Location = New System.Drawing.Point(13, 229)
Me.Label5.Name = "Label5"
Me.Label5.Size = New System.Drawing.Size(238, 14)
Me.Label5.TabIndex = 5
Me.Label5.Text = """New Terminal"" button text color:"
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Location = New System.Drawing.Point(13, 261)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(280, 14)
Me.Label6.TabIndex = 6
Me.Label6.Text = """New Terminal"" button background color:"
'
'btntitletext
'
Me.btntitletext.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btntitletext.Location = New System.Drawing.Point(166, 163)
Me.btntitletext.Name = "btntitletext"
Me.btntitletext.Size = New System.Drawing.Size(25, 23)
Me.btntitletext.TabIndex = 7
Me.btntitletext.UseVisualStyleBackColor = True
'
'btndeskbackcolor
'
Me.btndeskbackcolor.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btndeskbackcolor.Location = New System.Drawing.Point(322, 163)
Me.btndeskbackcolor.Name = "btndeskbackcolor"
Me.btndeskbackcolor.Size = New System.Drawing.Size(25, 23)
Me.btndeskbackcolor.TabIndex = 8
Me.btndeskbackcolor.UseVisualStyleBackColor = True
'
'btntitlebackcolor
'
Me.btntitlebackcolor.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btntitlebackcolor.Location = New System.Drawing.Point(208, 192)
Me.btntitlebackcolor.Name = "btntitlebackcolor"
Me.btntitlebackcolor.Size = New System.Drawing.Size(25, 23)
Me.btntitlebackcolor.TabIndex = 9
Me.btntitlebackcolor.UseVisualStyleBackColor = True
'
'btnnttext
'
Me.btnnttext.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnnttext.Location = New System.Drawing.Point(257, 225)
Me.btnnttext.Name = "btnnttext"
Me.btnnttext.Size = New System.Drawing.Size(25, 23)
Me.btnnttext.TabIndex = 10
Me.btnnttext.UseVisualStyleBackColor = True
'
'btnntback
'
Me.btnntback.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnntback.Location = New System.Drawing.Point(299, 257)
Me.btnntback.Name = "btnntback"
Me.btnntback.Size = New System.Drawing.Size(25, 23)
Me.btnntback.TabIndex = 11
Me.btnntback.UseVisualStyleBackColor = True
'
'btnapply
'
Me.btnapply.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnapply.Location = New System.Drawing.Point(333, 312)
Me.btnapply.Name = "btnapply"
Me.btnapply.Size = New System.Drawing.Size(75, 23)
Me.btnapply.TabIndex = 12
Me.btnapply.Text = "Apply"
Me.btnapply.UseVisualStyleBackColor = True
'
'Shifter
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 14.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.Black
Me.ClientSize = New System.Drawing.Size(420, 347)
Me.Controls.Add(Me.btnapply)
Me.Controls.Add(Me.btnntback)
Me.Controls.Add(Me.btnnttext)
Me.Controls.Add(Me.btntitlebackcolor)
Me.Controls.Add(Me.btndeskbackcolor)
Me.Controls.Add(Me.btntitletext)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.titlebar)
Me.Font = New System.Drawing.Font("Courier New", 8.25!)
Me.ForeColor = System.Drawing.Color.White
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "Shifter"
Me.Text = "Shifter"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents titlebar As shiftos_next.Titlebar
Friend WithEvents Label1 As System.Windows.Forms.Label
Friend WithEvents Label2 As System.Windows.Forms.Label
Friend WithEvents Label3 As System.Windows.Forms.Label
Friend WithEvents Label4 As System.Windows.Forms.Label
Friend WithEvents Label5 As System.Windows.Forms.Label
Friend WithEvents Label6 As System.Windows.Forms.Label
Friend WithEvents btntitletext As System.Windows.Forms.Button
Friend WithEvents btndeskbackcolor As System.Windows.Forms.Button
Friend WithEvents btntitlebackcolor As System.Windows.Forms.Button
Friend WithEvents btnnttext As System.Windows.Forms.Button
Friend WithEvents btnntback As System.Windows.Forms.Button
Friend WithEvents btnapply As System.Windows.Forms.Button
End Class

View file

@ -0,0 +1,125 @@
<?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>
<data name="Label1.Text" xml:space="preserve">
<value>Shifter
The Shifter allows you to customize the desktop environment by setting different colors and layout options. The Shifter's ability depends on what the desktop environment allows the Shifter to customize.</value>
</data>
</root>

View file

@ -0,0 +1,42 @@
Public Class Shifter
Dim cp As Integer
Private Sub btntitletext_Click(sender As Object, e As EventArgs) Handles btntitletext.Click, btntitlebackcolor.Click, btndeskbackcolor.Click, btnntback.Click, btnnttext.Click
BasicWM.ColorPicker.oldcolor = sender.BackColor
BasicWM.ColorPicker.ShowDialog()
sender.BackColor = BasicWM.ColorPicker.Color
Dim random As New Random()
Dim cptoadd As Integer = random.Next(1, 5)
cp += cptoadd
End Sub
Public Sub loadsettings()
btntitletext.BackColor = titlebartextcolor
btntitlebackcolor.BackColor = titlebarcolor
btndeskbackcolor.BackColor = desktopbackcolor
btnntback.BackColor = newterminalbuttonbackcolor
btnnttext.BackColor = newterminalbuttontextcolor
End Sub
Private Sub btnapply_Click(sender As Object, e As EventArgs) Handles btnapply.Click
'Store data in Skinning Engine
titlebartextcolor = btntitletext.BackColor
titlebarcolor = btntitlebackcolor.BackColor
desktopbackcolor = btndeskbackcolor.BackColor
newterminalbuttonbackcolor = btnntback.BackColor
newterminalbuttontextcolor = btnnttext.BackColor
'Save to save file
saveskindata()
'By now, the skin has been applied, so we'll tell the user how many codepoints they've earned.
AddCP(cp)
basicwm_infobox.showinfo("Shifter - Skin applied", "The skin has been applied to the desktop environment. You have earned " & cp & " Codepoints.")
End Sub
Private Sub Shifter_Load(sender As Object, e As EventArgs) Handles Me.Load
loadsettings()
Me.TopMost = True
Me.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
Me.Top = (Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2
End Sub
End Class

View file

@ -22,34 +22,12 @@ Partial Class basicwm_infobox
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.lbtitle = New System.Windows.Forms.Label()
Me.btnok = New System.Windows.Forms.Button() Me.btnok = New System.Windows.Forms.Button()
Me.lbmessage = New System.Windows.Forms.Label() Me.lbmessage = New System.Windows.Forms.Label()
Me.txtuserinput = New System.Windows.Forms.TextBox() Me.txtuserinput = New System.Windows.Forms.TextBox()
Me.Panel1.SuspendLayout() Me.Titlebar = New shiftos_next.Titlebar()
Me.SuspendLayout() Me.SuspendLayout()
' '
'Panel1
'
Me.Panel1.BackColor = System.Drawing.Color.Gray
Me.Panel1.Controls.Add(Me.lbtitle)
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(433, 30)
Me.Panel1.TabIndex = 0
'
'lbtitle
'
Me.lbtitle.Dock = System.Windows.Forms.DockStyle.Fill
Me.lbtitle.Location = New System.Drawing.Point(0, 0)
Me.lbtitle.Name = "lbtitle"
Me.lbtitle.Size = New System.Drawing.Size(433, 30)
Me.lbtitle.TabIndex = 0
Me.lbtitle.Text = "I am a hacker."
Me.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'btnok 'btnok
' '
Me.btnok.Dock = System.Windows.Forms.DockStyle.Bottom Me.btnok.Dock = System.Windows.Forms.DockStyle.Bottom
@ -65,9 +43,9 @@ Partial Class basicwm_infobox
'lbmessage 'lbmessage
' '
Me.lbmessage.Dock = System.Windows.Forms.DockStyle.Fill Me.lbmessage.Dock = System.Windows.Forms.DockStyle.Fill
Me.lbmessage.Location = New System.Drawing.Point(0, 30) Me.lbmessage.Location = New System.Drawing.Point(0, 0)
Me.lbmessage.Name = "lbmessage" Me.lbmessage.Name = "lbmessage"
Me.lbmessage.Size = New System.Drawing.Size(433, 183) Me.lbmessage.Size = New System.Drawing.Size(433, 213)
Me.lbmessage.TabIndex = 1 Me.lbmessage.TabIndex = 1
Me.lbmessage.Text = "I am already viewing my computer logs of that interview. Soon, I'll know everythi" & _ Me.lbmessage.Text = "I am already viewing my computer logs of that interview. Soon, I'll know everythi" & _
"ng there is to know about that banana making factory." "ng there is to know about that banana making factory."
@ -86,6 +64,17 @@ Partial Class basicwm_infobox
Me.txtuserinput.TextAlign = System.Windows.Forms.HorizontalAlignment.Center Me.txtuserinput.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
Me.txtuserinput.WordWrap = False Me.txtuserinput.WordWrap = False
' '
'Titlebar
'
Me.Titlebar.AppName = "Infobox"
Me.Titlebar.Dock = System.Windows.Forms.DockStyle.Top
Me.Titlebar.Font = New System.Drawing.Font("Courier New", 8.25!)
Me.Titlebar.ForeColor = System.Drawing.Color.White
Me.Titlebar.Location = New System.Drawing.Point(0, 0)
Me.Titlebar.Name = "Titlebar"
Me.Titlebar.Size = New System.Drawing.Size(433, 32)
Me.Titlebar.TabIndex = 3
'
'basicwm_infobox 'basicwm_infobox
' '
Me.AcceptButton = Me.btnok Me.AcceptButton = Me.btnok
@ -93,23 +82,21 @@ Partial Class basicwm_infobox
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.Black Me.BackColor = System.Drawing.Color.Black
Me.ClientSize = New System.Drawing.Size(433, 257) Me.ClientSize = New System.Drawing.Size(433, 257)
Me.Controls.Add(Me.Titlebar)
Me.Controls.Add(Me.txtuserinput) Me.Controls.Add(Me.txtuserinput)
Me.Controls.Add(Me.lbmessage) Me.Controls.Add(Me.lbmessage)
Me.Controls.Add(Me.btnok) Me.Controls.Add(Me.btnok)
Me.Controls.Add(Me.Panel1)
Me.Font = New System.Drawing.Font("Courier New", 8.25!) Me.Font = New System.Drawing.Font("Courier New", 8.25!)
Me.ForeColor = System.Drawing.Color.White Me.ForeColor = System.Drawing.Color.White
Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
Me.Name = "basicwm_infobox" Me.Name = "basicwm_infobox"
Me.Text = "basicwm_infobox" Me.Text = "basicwm_infobox"
Me.Panel1.ResumeLayout(False)
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
End Sub End Sub
Friend WithEvents Panel1 As System.Windows.Forms.Panel
Friend WithEvents lbtitle As System.Windows.Forms.Label
Friend WithEvents btnok As System.Windows.Forms.Button Friend WithEvents btnok As System.Windows.Forms.Button
Friend WithEvents lbmessage As System.Windows.Forms.Label Friend WithEvents lbmessage As System.Windows.Forms.Label
Friend WithEvents txtuserinput As System.Windows.Forms.TextBox Friend WithEvents txtuserinput As System.Windows.Forms.TextBox
Friend WithEvents Titlebar As shiftos_next.Titlebar
End Class End Class

View file

@ -3,7 +3,8 @@
Public userinput As String Public userinput As String
Public Sub showinfo(title As String, message As String, Optional showtextbox As Boolean = False) Public Sub showinfo(title As String, message As String, Optional showtextbox As Boolean = False)
lbtitle.Text = title Titlebar.AppName = title
Titlebar.shiftorium_special()
lbmessage.Text = message lbmessage.Text = message
btnok.Text = "> OK <" btnok.Text = "> OK <"
txtuserinput.Visible = showtextbox txtuserinput.Visible = showtextbox

View file

@ -22,8 +22,8 @@ Partial Class shiftorium_cmd
'Do not modify it using the code editor. 'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.pnltop = New System.Windows.Forms.Panel() Me.pnltop = New System.Windows.Forms.Panel()
Me.lbtitle = New System.Windows.Forms.Label()
Me.pnlbottom = New System.Windows.Forms.Panel() Me.pnlbottom = New System.Windows.Forms.Panel()
Me.lbcodepoints = New System.Windows.Forms.Label() Me.lbcodepoints = New System.Windows.Forms.Label()
Me.lbcontrols = New System.Windows.Forms.Label() Me.lbcontrols = New System.Windows.Forms.Label()
@ -34,6 +34,8 @@ Partial Class shiftorium_cmd
Me.lbdescription = New System.Windows.Forms.Label() Me.lbdescription = New System.Windows.Forms.Label()
Me.lbitemname = New System.Windows.Forms.Label() Me.lbitemname = New System.Windows.Forms.Label()
Me.lbitems = New System.Windows.Forms.ListBox() Me.lbitems = New System.Windows.Forms.ListBox()
Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
Me.Titlebar1 = New shiftos_next.Titlebar()
Me.pnltop.SuspendLayout() Me.pnltop.SuspendLayout()
Me.pnlbottom.SuspendLayout() Me.pnlbottom.SuspendLayout()
Me.pnldetails.SuspendLayout() Me.pnldetails.SuspendLayout()
@ -42,23 +44,13 @@ Partial Class shiftorium_cmd
' '
'pnltop 'pnltop
' '
Me.pnltop.Controls.Add(Me.lbtitle) Me.pnltop.Controls.Add(Me.Titlebar1)
Me.pnltop.Dock = System.Windows.Forms.DockStyle.Top Me.pnltop.Dock = System.Windows.Forms.DockStyle.Top
Me.pnltop.Location = New System.Drawing.Point(0, 0) Me.pnltop.Location = New System.Drawing.Point(0, 0)
Me.pnltop.Name = "pnltop" Me.pnltop.Name = "pnltop"
Me.pnltop.Size = New System.Drawing.Size(1007, 30) Me.pnltop.Size = New System.Drawing.Size(1007, 30)
Me.pnltop.TabIndex = 0 Me.pnltop.TabIndex = 0
' '
'lbtitle
'
Me.lbtitle.Dock = System.Windows.Forms.DockStyle.Fill
Me.lbtitle.Location = New System.Drawing.Point(0, 0)
Me.lbtitle.Name = "lbtitle"
Me.lbtitle.Size = New System.Drawing.Size(1007, 30)
Me.lbtitle.TabIndex = 0
Me.lbtitle.Text = "SHIFTORIUM"
Me.lbtitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
'
'pnlbottom 'pnlbottom
' '
Me.pnlbottom.Controls.Add(Me.lbcodepoints) Me.pnlbottom.Controls.Add(Me.lbcodepoints)
@ -167,6 +159,17 @@ Partial Class shiftorium_cmd
Me.lbitems.Size = New System.Drawing.Size(1007, 335) Me.lbitems.Size = New System.Drawing.Size(1007, 335)
Me.lbitems.TabIndex = 3 Me.lbitems.TabIndex = 3
' '
'Titlebar1
'
Me.Titlebar1.AppName = "Shiftorium"
Me.Titlebar1.Dock = System.Windows.Forms.DockStyle.Top
Me.Titlebar1.Font = New System.Drawing.Font("Courier New", 8.25!)
Me.Titlebar1.ForeColor = System.Drawing.Color.White
Me.Titlebar1.Location = New System.Drawing.Point(0, 0)
Me.Titlebar1.Name = "Titlebar1"
Me.Titlebar1.Size = New System.Drawing.Size(1007, 32)
Me.Titlebar1.TabIndex = 0
'
'shiftorium_cmd 'shiftorium_cmd
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 14.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 14.0!)
@ -191,7 +194,6 @@ Partial Class shiftorium_cmd
End Sub End Sub
Friend WithEvents pnltop As System.Windows.Forms.Panel Friend WithEvents pnltop As System.Windows.Forms.Panel
Friend WithEvents lbtitle As System.Windows.Forms.Label
Friend WithEvents pnlbottom As System.Windows.Forms.Panel Friend WithEvents pnlbottom As System.Windows.Forms.Panel
Friend WithEvents lbcodepoints As System.Windows.Forms.Label Friend WithEvents lbcodepoints As System.Windows.Forms.Label
Friend WithEvents lbcontrols As System.Windows.Forms.Label Friend WithEvents lbcontrols As System.Windows.Forms.Label
@ -202,4 +204,6 @@ Partial Class shiftorium_cmd
Friend WithEvents lbprice As System.Windows.Forms.Label Friend WithEvents lbprice As System.Windows.Forms.Label
Friend WithEvents lbdescription As System.Windows.Forms.Label Friend WithEvents lbdescription As System.Windows.Forms.Label
Friend WithEvents lbitemname As System.Windows.Forms.Label Friend WithEvents lbitemname As System.Windows.Forms.Label
Friend WithEvents Titlebar1 As shiftos_next.Titlebar
Friend WithEvents Timer1 As System.Windows.Forms.Timer
End Class End Class

View file

@ -117,4 +117,7 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root> </root>

View file

@ -8,20 +8,7 @@
lbprice.Hide() lbprice.Hide()
btnbuy.Hide() btnbuy.Hide()
lbcodepoints.Text = "Codepoints: " & codepoints lbcodepoints.Text = "Codepoints: " & codepoints
If boughtbasicwm = True Then Titlebar1.shiftorium_special()
lbtitle.TextAlign = ContentAlignment.MiddleLeft
lbtitle.Text = "Shiftorium" 'To make it sentence-case, rather than UPPERCASE.
lbtitle.BackColor = Color.Gray
Me.WindowState = FormWindowState.Normal
Me.Left = (Screen.PrimaryScreen.Bounds.Width - Me.Width) / 2
Me.Top = (Screen.PrimaryScreen.Bounds.Height - Me.Height) / 2
Me.TopMost = True
Else
lbtitle.TextAlign = ContentAlignment.MiddleCenter
lbtitle.Text = "SHIFTORIUM"
lbtitle.BackColor = Color.Black
Me.WindowState = FormWindowState.Maximized
End If
End Sub End Sub
Public Sub determineitems() Public Sub determineitems()

View file

@ -16,6 +16,12 @@
End If End If
End Sub End Sub
Public Sub Redraw()
btnnewterminal.ForeColor = newterminalbuttontextcolor
btnnewterminal.BackColor = newterminalbuttonbackcolor
Me.BackColor = desktopbackcolor
End Sub
Private Sub Desktop_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub Desktop_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Terminal.Close() Terminal.Close()
Me.WindowState = FormWindowState.Maximized Me.WindowState = FormWindowState.Maximized
@ -24,6 +30,7 @@
term.TopMost = True term.TopMost = True
term.Show() term.Show()
openterminals += 1 openterminals += 1
loadskindata()
End Sub End Sub
End Class End Class
End Namespace End Namespace

Binary file not shown.

View file

@ -44,3 +44,4 @@ C:\Users\Michael\Documents\GitHub\shiftos-next\shiftos_next\bin\Debug\shiftos_ne
C:\Users\Michael\Documents\GitHub\shiftos-next\shiftos_next\bin\Debug\shiftos_next.pdb C:\Users\Michael\Documents\GitHub\shiftos-next\shiftos_next\bin\Debug\shiftos_next.pdb
C:\Users\Michael\Documents\GitHub\shiftos-next\shiftos_next\bin\Debug\shiftos_next.xml C:\Users\Michael\Documents\GitHub\shiftos-next\shiftos_next\bin\Debug\shiftos_next.xml
C:\Users\Michael\Documents\GitHub\shiftos-next\shiftos_next\obj\Debug\shiftos_next.Titlebar.resources C:\Users\Michael\Documents\GitHub\shiftos-next\shiftos_next\obj\Debug\shiftos_next.Titlebar.resources
C:\Users\Michael\Documents\GitHub\shiftos-next\shiftos_next\obj\Debug\shiftos_next.Shifter.resources

View file

@ -71,6 +71,13 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="APIs\API.vb" /> <Compile Include="APIs\API.vb" />
<Compile Include="APIs\Skins.vb" />
<Compile Include="BWM and CMD Apps\Shifter.Designer.vb">
<DependentUpon>Shifter.vb</DependentUpon>
</Compile>
<Compile Include="BWM and CMD Apps\Shifter.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Menu Renderers\BasicWM_ColorTable.vb" /> <Compile Include="Menu Renderers\BasicWM_ColorTable.vb" />
<Compile Include="BWM and CMD Apps\basicwm_infobox.Designer.vb"> <Compile Include="BWM and CMD Apps\basicwm_infobox.Designer.vb">
<DependentUpon>basicwm_infobox.vb</DependentUpon> <DependentUpon>basicwm_infobox.vb</DependentUpon>
@ -151,6 +158,9 @@
<EmbeddedResource Include="BWM and CMD Apps\basicwm_infobox.resx"> <EmbeddedResource Include="BWM and CMD Apps\basicwm_infobox.resx">
<DependentUpon>basicwm_infobox.vb</DependentUpon> <DependentUpon>basicwm_infobox.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="BWM and CMD Apps\Shifter.resx">
<DependentUpon>Shifter.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="BWM User Controls\Titlebar.resx"> <EmbeddedResource Include="BWM User Controls\Titlebar.resx">
<DependentUpon>Titlebar.vb</DependentUpon> <DependentUpon>Titlebar.vb</DependentUpon>
</EmbeddedResource> </EmbeddedResource>