View Single Post
Unread 03-09-2005, 12:28 AM   #84
starbuck3733t
Cooling Savant
 
starbuck3733t's Avatar
 
Join Date: Nov 2002
Location: State College, PA
Posts: 338
Default



The software that drives the display was written in VB.NET (.NET framework v1.1), and the GIFs themselves were ganked from Pioneer's (the audio folks) website, reduced to 2 colors (they were 3) and resaved in animated gif format.

I've written the whole thing as an extensible architecture so I can easily add plugins down the way, with the low-level stuff of writing to the display and rotating the plugins handled by the main program. The plugin just has to produce a 128x64 bitmap when its polled for a frame. Here's the source for the 'clock' plugin. The "it is now" text is a variable that can be passed in upon plugin creation, so thats why you don't see it anywhere.

Code:
PluginTextTest.vb:
-----------------------
Namespace Plugins
    Public Class pluginTextTest
        Inherits Plugins.PluginBase

#Region "Globals"
        Dim _screen As Screen
        Dim _notepad As New Bitmap(128, 64)
        Dim _note As String
        Dim _g As Graphics = Graphics.FromImage(_notepad)
        Dim _font As New Font("Arial", 8, FontStyle.Bold)
#End Region

#Region "Subs"
        Public Sub New(ByVal Note As String)
            _note = Note
        End Sub
        Private Sub buildScreen()
            _g.Clear(Color.Black)
            _g.TextRenderingHint = System.Drawing.Text.TextRenderingHint.SingleBitPerPixelGridFit
            _g.DrawString(_note & Date.Now.ToString("hh:mm:ss"), _font, New SolidBrush(Color.White), 0, 27)
            _screen = New Screen(_notepad, False)
        End Sub
#End Region

#Region "Stuff to talk to the interface"
        Public Overrides Function GetRefreshedScreen() As Screen
            buildScreen()
            Return _screen
        End Function
        Public Overrides ReadOnly Property PollInterval() As Integer
            Get
                Return 1000
            End Get
        End Property
        Public Overrides ReadOnly Property RotateInterval() As Integer
            Get
                Return 5000
            End Get
        End Property
        Public Overrides ReadOnly Property Screen() As Screen
            Get
                Return _screen
            End Get
        End Property
        Public Overrides Function ToString() As String
            Return "Text Test: " & _note
        End Function
#End Region
    End Class
End Namespace
Pretty simple

(Did I mention the main program is multithreaded?!?!? )

The next one on the plugins list is the Speedfan and system stats screen, that should be a real monster
__________________
Goliath: 3.4E@3.91/Abit IC7, Maze4 (temporarily) + custom splitter to crazy 4-way watercooling parallel loop: X800XT @ 520/1280 + AC Twinplex, AC Twinplex Northbridge, Silenstar Dual HDD Cooler, Eheim1250, '85 econoline van HC + 2x120, 1x120 exhaust - polished aluminum frame panaflo L1As, 2x18GB 10K RPM U160 SCSI, 4GB PC4000.

I wanna be BladeRunner when I grow up!

Project Goliath - nearing completion.
starbuck3733t is offline   Reply With Quote