summaryrefslogtreecommitdiff
path: root/shiftos_next/Desktop Environments/BWMDesktop.vb
blob: a3790b5187f921efe8b760fef99105093e2a068f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Namespace BasicWM
    Public Class Desktop

        Public openterminals As Integer = 0

        Private Sub btnnewterminal_Click(sender As Object, e As EventArgs) Handles btnnewterminal.Click
            If openterminals = 3 Then
                AddLine("The maximum ammount of Terminal windows are open.")
                AddLine(username + "@" + osname + " " & Terminal.currentdir.ToLower.Replace("c:\shiftos", "~") & "$> ")
            Else
                Dim term As New Terminal
                term.StartPosition = FormStartPosition.CenterParent
                term.TopMost = True
                term.Show()
                openterminals += 1
            End If
        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
            Terminal.Close()
            Me.WindowState = FormWindowState.Maximized
            Dim term As New Terminal
            term.StartPosition = FormStartPosition.CenterParent
            term.TopMost = True
            term.Show()
            openterminals += 1
            loadskindata()
        End Sub
    End Class
End Namespace