9-12-15UPDATE:The Coder who fell seriously ill a few months back is feeling well enough to do only the easiest coding work
so they decided they could at least make some simple apps and He recently posted them. If He feels a bit better
in the coming weeks and months He might tackle some of the more difficult apps and eventually be able to get the Æther OS on a device. One step at a time though. Just an hour meeting I recently had totally drained him and anyone who's been that ill knows what that is like.
Copy of his post below:
It’s been a while since there’s been some activity here and that’s because I’ve been dealing with some serious health issues. I’m finally doing a bit better now and am still committed to this project.
We still have the app bounties up for grabs and I decided to do the 2 easiest ones so long!
Clock: DONE!
Alarm Clock: DONE!
Code and files to follow…
---------- Post added at 10:18 AM ---------- Previous post was at 10:12 AM ----------
Here are the new apps which can be directly loaded into the emulator.
(Remember: The emulator looks for them in C:\Program Files (x86)\Æther\ )
For example: Create a sub folder called Clock (C:\Program Files (x86)\Æther\Clock\ ) and put Clock.dll into it. In the emulator, under ‘Load’, enter “Clock”.
[I tried posting the link, but the forum won't allow me to post links yet. I will ask HD2 Crosshair to post it.]
""The Dev asked me to post this link to his latest work on the apps.
Cheers!""
https://mega.nz/#!fNlB1BpJ!oXW3m4R6fd3kMiBJzH1FwPKQiwDC8JeYqxZTe1iqUio---------- Post added at 10:22 AM ---------- Previous post was at 10:18 AM ----------
CLOCK APP CODE
Option Strict On
Option Explicit On
Imports System
Imports Æther
Imports Æther.UI
Imports Æther.UI.UIobjects
Imports System.Threading
Public Class Program
Inherits ÆtherAppBase
Private Shared MainThread As Thread
Private Shared Running As Boolean
Shared Sub Main()
Running = True
MainThread = New Threading.Thread(AddressOf DoMainThread)
MainThread.Start()
End Sub
Private Shared B1 As AEtherButton
Private Shared TX As AEtherTextBox
Private Shared BackgroundColour As AEtherColour = New AEtherColour(24, 45, 228)
Private Shared Sub DoMainThread()
_PrimarySurface = New AEtherSurface
_PrimarySurface.BackgroundColour = BackgroundColour
Const X0 As Single = 0.27!
Const Y0 As Single = 0.35!
Const SX As Single = 0.48!
Const SY As Single = 0.35!
Dim C1 = New AEtherRectangle("Display Background",
New AEtherPoint(X0, Y0),
New AEtherSize(SX, SY),
New AEtherColour(255, 255, 0))
_PrimarySurface.AddControl(C1)
Dim T1 = New AEtherLabel("Time",
New AEtherPoint(C1.Position.X + SX / 2.0!,
C1.Position.Y + SY / 2.0!),
New AEtherColour(30, 144, 255),
"Segoe UI", 35.0!,
AEtherFontStyle.Bold,
AEtherTextAlignment.Centre)
T1.Text = "00:00:00"
_PrimarySurface.AddControl(T1)
Dim Pulse = New AutoResetEvent(False)
Dim S As Stopwatch = New Stopwatch
S.Start()
While Running
Dim CurrentTime As DateTime = DateTime.Now
Dim Seconds As Single = CSng(S.Elapsed.TotalSeconds) * 0.72!
Dim Seconds2 As Single = Seconds * 0.333!
T1.Text = String.Format("{0:HH:mm:ss}", CurrentTime)
C1.Position.X = X0 + CSng(Math.Sin(S.Elapsed.TotalSeconds)) * 0.12!
C1.Position.Y = Y0 - CSng(Math.Cos(S.Elapsed.TotalSeconds)) * 0.12!
C1.FillColour = New AEtherColour(CInt(Math.Abs(Math.Sin(Seconds2) * 255)),
CInt(Math.Abs(Math.Sin(Seconds2 + 0.7!) * 255)),
CInt(Math.Abs(Math.Sin(Seconds2 + 1.5!) * 255)))
T1.FillColour = New AEtherColour(CInt(Math.Abs(Math.Cos(Seconds * 1.5!) * 255)),
CInt(Math.Abs(Math.Cos(Seconds * 1.5! + 0.7!) * 255)),
CInt(Math.Abs(Math.Cos(Seconds * 1.5! + 1.5!) * 255)))
T1.Position = New AEtherPoint(C1.Position.X + SX / 2.0!,
C1.Position.Y + SY / 2.0!)
RaiseEvent_UpdateSurface()
Pulse.WaitOne(48)
End While
End Sub
Public Shared Shadows Sub EndApp()
Running = False
Debug.Print("End App!")
End Sub
Public Shared Shadows Sub PointerDown()
Debug.Print("Pointer Down!")
End Sub
Public Shared Shadows Sub PointerUp()
Debug.Print("Pointer Up!")
End Sub
End Class
---------- Post added at 10:27 AM ---------- Previous post was at 10:22 AM ----------
ALARM CLOCK APP CODE:
Option Strict On
Option Explicit On
Imports System
Imports System.Threading
Imports Æther
Imports Æther.UI
Imports Æther.UI.UIobjects
Public Class Program
Inherits ÆtherAppBase
Private Shared MainThread As Thread
Private Shared Running As Boolean
Shared Sub Main()
Running = True
MainThread = New Threading.Thread(AddressOf DoMainThread)
MainThread.Start()
End Sub
Private Shared B1 As AEtherButton
Private Shared TX As AEtherTextBox
Private Shared AlarmSet As Boolean = False
Private Shared AlarmTime As DateTime
Private Shared AlarmSetColour As AEtherColour = New AEtherColour(0, 192, 0)
Private Shared AlarmNotSetColour As AEtherColour = New AEtherColour(129, 129, 129)
Private Shared AlarmNotifyColour As AEtherColour = New AEtherColour(255, 0, 0)
Private Shared AlarmButtonSetColour As AEtherColour = New AEtherColour(255, 0, 0)
Private Shared AlarmButtonNotSetColour As AEtherColour = New AEtherColour(192, 48, 48)
Private Shared BackgroundColour As AEtherColour = New AEtherColour(24, 45, 228)
Private Shared BackgroundNotifyColour As AEtherColour = New AEtherColour(255, 0, 0)
Private Shared Sub DoMainThread()
_PrimarySurface = New AEtherSurface
_PrimarySurface.BackgroundColour = BackgroundColour
Const SX As Single = 0.48!
Const SY As Single = 0.35!
'Const SX2 As Single = 0.48!
'Const SY2 As Single = SY * 0.66!
Const X0 As Single = 0.27!
Dim C1 = New AEtherRectangle("Display Background",
New AEtherPoint(X0, 0.15),
New AEtherSize(SX, SY),
New AEtherColour(255, 255, 0))
_PrimarySurface.AddControl(C1)
Dim T1 = New AEtherLabel("Time 1",
New AEtherPoint(C1.Position.X + SX / 2.0!,
C1.Position.Y + SY / 2.0!),
New AEtherColour(30, 144, 255),
"Segoe UI", 35.0!,
AEtherFontStyle.Bold,
AEtherTextAlignment.Centre)
T1.Text = "00:00:00"
_PrimarySurface.AddControl(T1)
'C2 = New AEtherRectangle("Display Background 2",
' New AEtherPoint(X0, 0.75),
' New AEtherSize(SX2, SY2),
' AlarmNotSetColour)
'_PrimarySurface.AddControl(C2)
'Dim T2 = New AEtherLabel("Time 2",
' New AEtherPoint(C2.Position.X + SX2 / 2.0!,
' C2.Position.Y + SY2 / 2.0!),
' AlarmNotSetColour,
' "Segoe UI", 35.0!,
' AEtherFontStyle.Bold,
' AEtherTextAlignment.Centre)
'T2.Text = "00:00"
'_PrimarySurface.AddControl(T2)
'AddHandler T2.Focus, AddressOf HandleTextClick1
B1 = New AEtherButton("Button 1",
"Set Alarm",
New AEtherPoint(C1.Position.X + SX / 2.0! - 0.27! / 2.0!,
0.66!),
New AEtherSize(0.27!, 0.084),
AlarmButtonNotSetColour)
AddHandler B1.Focus, AddressOf HandleButton1Down
_PrimarySurface.AddControl(B1)
TX = New AEtherTextBox("TextBox 1",
New AEtherPoint(B1.Position.X - 0.012!,
B1.Position.Y + 0.15!),
New AEtherSize(0.12, 0.012),
AlarmNotSetColour,
"Segoe UI", 35.0!,
AEtherFontStyle.Bold,
AEtherTextAlignment.Left)
TX.Text = "00:00"
_PrimarySurface.AddControl(TX)
AddHandler TX.Focus, AddressOf HandleTextClick1
' AddHandler TX.ValueChanged, AddressOf HandleTextChanged1
Dim Pulse = New AutoResetEvent(False)
While Running
Dim CurrentTime As DateTime = DateTime.Now
T1.Text = String.Format("{0:HH:mm:ss}", CurrentTime)
If AlarmSet AndAlso CurrentTime.Hour = AlarmTime.Hour AndAlso CurrentTime.Minute = AlarmTime.Minute Then
AlarmActivated()
End If
HandleTextChanged1()
RaiseEvent_UpdateSurface()
Pulse.WaitOne(48)
End While
End Sub
Private Shared Sub HandleButton1Down()
ToggleAlarmSet()
End Sub
Private Shared Sub HandleTextClick1()
If Not AlarmSet Then
ToggleAlarmSet()
End If
End Sub
Private Shared Sub HandleTextChanged1()
Static TextChanged As String
If TX.Text <> TextChanged Then
If TX.Text.Length > 3 Then
DateTime.TryParse(TX.Text, AlarmTime)
End If
End If
TextChanged = TX.Text
End Sub
Private Shared Sub ToggleAlarmSet()
AlarmSet = Not AlarmSet
If AlarmSet Then
B1.Text = "Alarm Set"
B1.FillColour = AlarmButtonSetColour
TX.FillColour = AlarmSetColour
Else
B1.Text = "Set Alarm"
B1.FillColour = AlarmButtonNotSetColour
TX.FillColour = AlarmNotSetColour
End If
End Sub
Private Shared Sub AlarmActivated()
Static T As Stopwatch = New Stopwatch
If Not T.IsRunning Then
T.Start()
End If
If CInt(T.Elapsed.Seconds) Mod 2 = 0 Then
_PrimarySurface.BackgroundColour = BackgroundNotifyColour
Else
_PrimarySurface.BackgroundColour = BackgroundColour
End If
End Sub
Public Shared Shadows Sub EndApp()
Running = False
Debug.Print("End App!")
End Sub
Public Shared Shadows Sub PointerDown()
Debug.Print("Pointer Down!")
End Sub
Public Shared Shadows Sub PointerUp()
Debug.Print("Pointer Up!")
End Sub
End Class