mirror of
https://github.com/TheUltimateHacker/shiftos-next.git
synced 2025-01-23 00:42:14 +00:00
38 lines
1.4 KiB
VB.net
38 lines
1.4 KiB
VB.net
|
Namespace BasicWM
|
|||
|
Public Class ColorPicker
|
|||
|
|
|||
|
Public Color As Color
|
|||
|
Public oldcolor As Color
|
|||
|
|
|||
|
Private Sub btnwhite_Click(sender As Object, e As EventArgs) Handles btnwhite.Click, btnblack.Click, btngray.Click, btnred.Click, btngreen.Click, btnblue.Click, btnyellow.Click, btnorange.Click, btnpink.Click, btnpurple.Click, btnbrown.Click
|
|||
|
Color = sender.backcolor
|
|||
|
lbselectedcolor.Text = "Selected color: " & Color.ToKnownColor.ToString
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub btnok_Click(sender As Object, e As EventArgs) Handles btnok.Click
|
|||
|
Me.Close()
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub btncancel_Click(sender As Object, e As EventArgs) Handles btncancel.Click
|
|||
|
Color = oldcolor
|
|||
|
Me.Close()
|
|||
|
End Sub
|
|||
|
|
|||
|
Private Sub ColorPicker_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|||
|
loadcolors()
|
|||
|
End Sub
|
|||
|
|
|||
|
|
|||
|
Public Sub loadcolors()
|
|||
|
If boughtgray Then btngray.Show()
|
|||
|
If boughtred Then btnred.Show()
|
|||
|
If boughtgreen Then btngreen.Show()
|
|||
|
If boughtblue Then btnblue.Show()
|
|||
|
If boughtyellow Then btnyellow.Show()
|
|||
|
If boughtorange Then btnorange.Show()
|
|||
|
If boughtpink Then btnpink.Show()
|
|||
|
If boughtpurple Then btnpurple.Show()
|
|||
|
If boughtbrown Then btnbrown.Show()
|
|||
|
End Sub
|
|||
|
End Class
|
|||
|
End Namespace
|