summaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/MainForms/Shiftoriums.vb
blob: 5beb3710fd3663fa641a7bdb408e8288e431da82 (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
Module Shiftoriums
    Public Sub InstallFeature(IsCLI As Boolean, Feature As String, Codepoint As Integer)
        Dim TempCP As Integer = Convert.ToInt32(Strings.ComputerInfo(2))
        If TempCP >= Codepoint Then
            Dim success As Boolean = False
            Select Case Feature
                Case "man"
                    Strings.AvailableFeature(0) = "1"
                    success = True
                Case "clear"
                    Strings.AvailableFeature(1) = "1"
                    success = True
            End Select
            If success = False Then
                If IsCLI = True Then
                    Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Invalid command or feature already installed"
                End If
            Else
                TempCP = TempCP - Codepoint
                Strings.ComputerInfo(2) = Convert.ToString(TempCP)
                If IsCLI = True Then
                    Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Feature has been install succesfully"
                End If
            End If
        Else
            If IsCLI = True Then
                Terminal.TextBox1.Text = Terminal.TextBox1.Text & Environment.NewLine & "Shiftorium: Insufficent Codepoint"
            End If
        End If
    End Sub
End Module