Skip to content

Commit

Permalink
added logos for Thalys, Eurostar, TGV, ICE
Browse files Browse the repository at this point in the history
added logos for Thalys, Eurostar, TGV, ICE
  • Loading branch information
Tom committed Dec 30, 2016
1 parent 9efe905 commit 68b3139
Show file tree
Hide file tree
Showing 20 changed files with 65 additions and 2 deletions.
Binary file added EUR.bmp
Binary file not shown.
Binary file added ICE.bmp
Binary file not shown.
2 changes: 1 addition & 1 deletion RailtimeScreenSaver/FrmOptions.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions RailtimeScreenSaver/My Project/Resources.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions RailtimeScreenSaver/My Project/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,16 @@
<data name="airplane" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\airplane.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="EUR" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\EUR.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="ICE" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\ICE.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="TGV" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\TGV.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="THA" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\THA.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
4 changes: 4 additions & 0 deletions RailtimeScreenSaver/RailtimeScreenSaver.vbproj
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@
</ItemGroup>
<ItemGroup>
<Content Include="AM96.ico" />
<None Include="Resources\EUR.bmp" />
<None Include="Resources\ICE.bmp" />
<None Include="Resources\TGV.bmp" />
<None Include="Resources\THA.bmp" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Expand Down
Binary file added RailtimeScreenSaver/Resources/EUR.bmp
Binary file not shown.
Binary file added RailtimeScreenSaver/Resources/ICE.bmp
Binary file not shown.
Binary file added RailtimeScreenSaver/Resources/TGV.bmp
Binary file not shown.
Binary file added RailtimeScreenSaver/Resources/THA.bmp
Binary file not shown.
21 changes: 20 additions & 1 deletion RailtimeScreenSaver/Templates.vb
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ Public Class SNCBTemplate
End If
PrintCentered(TrackText, TrackRect, Graphics, TrainFont, New SolidBrush(TrackColor))

Dim TrainType As String = UCase$(Train.Type)
'draw train type
If Train.IsSBahnTrain Then
Dim STrainType As String = Mid(Train.Type, 2)
Expand All @@ -213,7 +214,7 @@ Public Class SNCBTemplate

Graphics.FillEllipse(m_ForeColorBrush, STrainTypeCricle)
PrintCentered(STrainType, STrainTypeCricle, Graphics, STrainTypeFont, New SolidBrush(TrainRectColor))
ElseIf Train.IsAirportTrain AndAlso (Now().Second Mod 2) = 0 Then
ElseIf Train.IsAirportTrain AndAlso (Now.Second Mod 2) = 0 Then
Dim TrainTypeSize As SizeF = Graphics.MeasureString("XX", TrainFont)
Dim AirPlaneSize As Integer = TrainTypeSize.Width * 4 / 5
Dim AirplaneIcon As Bitmap = My.Resources.airplane
Expand All @@ -222,6 +223,24 @@ Public Class SNCBTemplate
Pallete.Entries(1) = Color.FromArgb(0, 0, 0, 0)
AirplaneIcon.Palette = Pallete
Graphics.DrawImage(AirplaneIcon, New RectangleF(TrackRect.X - BorderWidth - AirPlaneSize, TrackRect.Y, AirPlaneSize, AirPlaneSize))
ElseIf TrainType = "TGV" OrElse TrainType = "THA" OrElse TrainType = "ICE" OrElse TrainType = "TGV" OrElse TrainType = "EUR" Then
If (Now.Second Mod 2) = 0 OrElse Train.TrainNumber = "" Then
'Dim LogoSize As SizeF = Graphics.MeasureString("Ag", TrainFont)
' LogoSize.Height * 4 / 5
Dim Logo As Bitmap = My.Resources.ResourceManager.GetObject(TrainType)
Dim LogoWidth As Double = TrackRect.Height / Logo.Height * Logo.Width * 7 / 8
Dim Pallete As System.Drawing.Imaging.ColorPalette = Logo.Palette
Pallete.Entries(0) = m_ForeColor
Pallete.Entries(1) = Color.FromArgb(0, 0, 0, 0)
Logo.Palette = Pallete
Graphics.InterpolationMode = Drawing2D.InterpolationMode.HighQualityBilinear
Graphics.DrawImage(Logo, New RectangleF(TrackRect.X - BorderWidth - LogoWidth, TrackRect.Y, LogoWidth, TrackRect.Height))
Graphics.InterpolationMode = Drawing2D.InterpolationMode.Default
Graphics.DrawImage(Logo, New RectangleF(TrackRect.X - BorderWidth - LogoWidth, TrackRect.Y, LogoWidth, TrackRect.Height))
Else
Dim TrainTypeSize As SizeF = Graphics.MeasureString(Train.TrainNumber, TrainFont)
Graphics.DrawString(Train.TrainNumber, TrainFont, m_ForeColorBrush, TrackRect.X - BorderWidth - TrainTypeSize.Width, TrackRect.Y)
End If
Else
Dim TrainTypeSize As SizeF = Graphics.MeasureString(Train.Type, TrainFont)
Graphics.DrawString(Train.Type, TrainFont, m_ForeColorBrush, TrackRect.X - BorderWidth - TrainTypeSize.Width, TrackRect.Y)
Expand Down
Binary file added TGV.bmp
Binary file not shown.
Binary file added THA.bmp
Binary file not shown.
Binary file added eurostar-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified exe/RailtimeScreenSaver.exe
Binary file not shown.
Binary file modified exe/RailtimeScreenSaver.scr
Binary file not shown.
Binary file added ice-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added tgv-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added thalys-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 68b3139

Please sign in to comment.