aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS/coherencemode.vb
diff options
context:
space:
mode:
authorFloppyDiskDrive <[email protected]>2017-09-21 17:16:49 -0500
committerFloppyDiskDrive <[email protected]>2017-09-21 17:16:49 -0500
commitcf1bf85e01c8d99f052c09b72d2fb2bbbc0b99b0 (patch)
treefe0d16447fab2a74b6161b4c981c036a93ed8239 /ShiftOS/coherencemode.vb
parent30b6a49d5b0e720eee131e970761ece7c6ed7ef0 (diff)
downloadshiftos-rewind-cf1bf85e01c8d99f052c09b72d2fb2bbbc0b99b0.tar.gz
shiftos-rewind-cf1bf85e01c8d99f052c09b72d2fb2bbbc0b99b0.tar.bz2
shiftos-rewind-cf1bf85e01c8d99f052c09b72d2fb2bbbc0b99b0.zip
Added the SOS code (VB and C#)
Very, very incomplete (C# isn't *remotely* complete.)
Diffstat (limited to 'ShiftOS/coherencemode.vb')
-rw-r--r--ShiftOS/coherencemode.vb39
1 files changed, 39 insertions, 0 deletions
diff --git a/ShiftOS/coherencemode.vb b/ShiftOS/coherencemode.vb
new file mode 100644
index 0000000..42352fb
--- /dev/null
+++ b/ShiftOS/coherencemode.vb
@@ -0,0 +1,39 @@
+Module coherencemode
+ Private CoherenceModeProgramForm As New coherencemodeform
+ Public AnyOtherProgram As Boolean = False
+
+ Public Sub setupwindows(ByVal programname As String)
+ If AnyOtherProgram = False Then
+ Try
+ Dim NewProgramName As String = programname.ToLower
+ Dim win As Window = Window.Find(NewProgramName)
+ Dim PreviouwWindowSize As System.Drawing.Size = win.Size
+ CoherenceModeProgramForm.programnametokeep = win
+ win.Style(Window.Styles.Border) = False
+ win.Style(Window.Styles.Sizable) = False
+ win.Invalidate()
+ 'win.Size = New Size(0, 0)
+ 'win.Size = PreviouwWindowSize
+
+ CoherenceModeProgramForm.Show()
+ win.Location = New Point(CoherenceModeProgramForm.Location.X, CoherenceModeProgramForm.Location.Y + ShiftOSDesktop.titlebarheight)
+ win.TopMost = True
+ CoherenceModeProgramForm.TopMost = True
+ CoherenceModeProgramForm.Focus()
+ CoherenceModeProgramForm.Size = PreviouwWindowSize
+ win.Text = CoherenceModeProgramForm.lbtitletext.Text
+ CoherenceModeProgramForm.resettitlebar()
+ CoherenceModeProgramForm.setuptitlebar()
+ CoherenceModeProgramForm.setupborders()
+ CoherenceModeProgramForm.pgcontents.BackColor = Color.FromArgb(1, 0, 1)
+
+ AnyOtherProgram = True
+ Catch ex As Exception
+ infobox.showinfo("Critical Error - Coherence Mode", "A Critical error occured whilst attempting to join the program")
+ End Try
+ Else
+ infobox.showinfo("Information - Coherence Mode", "You can only have one program within coherence mode at any given time, this includes only one mod open for the moment, this is soon to change")
+ End If
+ End Sub
+
+End Module