1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

Splash screen added to OpenTX Speaker

This commit is contained in:
Kjell Kernen 2014-03-15 22:26:39 +01:00
parent 0071a04efa
commit 75c42afbbc
5 changed files with 15 additions and 7 deletions

View file

@ -3,6 +3,7 @@ using System.IO;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Windows; using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Data; using System.Windows.Data;
@ -28,7 +29,12 @@ namespace OpenTXspeak
public MainWindow() public MainWindow()
{ {
SplashScreen splash = new SplashScreen("speaker_logo.png");
splash.Show(true);
Thread.Sleep(1500);
InitializeComponent(); InitializeComponent();
lvSentences.ItemsSource = sentences; lvSentences.ItemsSource = sentences;
cbLanguages.ItemsSource = languages; cbLanguages.ItemsSource = languages;
@ -189,14 +195,14 @@ namespace OpenTXspeak
public Sentence(string rawString) public Sentence(string rawString)
{ {
string[] words = rawString.Split(';'); string[] words = rawString.Split(';');
fileName = words[0]; fileName = words[0].TrimStart(' ', '\"');
description = words[1]; description = words[1];
voiceString = words[2]; voiceString = words[2].TrimEnd('\"', ',', ' ');
} }
public string toRaw() public string toRaw()
{ {
return fileName + ";" + description + ";" + voiceString; return "\"" +fileName + ";" + description + ";" + voiceString + "\",";
} }
} }
@ -204,7 +210,6 @@ namespace OpenTXspeak
{ {
public void Add(string rawString) public void Add(string rawString)
{ {
string[] words = rawString.Split(';');
this.Add(new Sentence(rawString)); this.Add(new Sentence(rawString));
} }
} }

View file

@ -116,6 +116,9 @@
<ItemGroup> <ItemGroup>
<Resource Include="eSpeak.png" /> <Resource Include="eSpeak.png" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Resource Include="speaker_logo.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.

View file

@ -1,7 +1,7 @@
<Window x:Class="OpenTXspeak.AboutWindow" <Window x:Class="OpenTXspeak.AboutWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="OpenTX About Window" Height="273" Width="335" Icon="/OpenTXspeak;component/icon.ico" Background="Black"> Title="OpenTX About Window" Height="241" Width="330" Icon="/OpenTXspeak;component/icon.ico" Background="Gray">
<Grid> <Grid>
<StackPanel> <StackPanel>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
@ -19,8 +19,8 @@
</StackPanel> </StackPanel>
<Label Content="Copyright" Name="lblCopyright" Foreground="White"/> <Label Content="Copyright" Name="lblCopyright" Foreground="White"/>
<StackPanel Orientation="Horizontal"> <StackPanel Orientation="Horizontal">
<TextBlock Text="TextBlock" Name="description" Height="106" Margin="5,5,5,0" TextWrapping="Wrap" Width="175" Foreground="White"/> <TextBlock Text="TextBlock" Name="description" Height="88" Margin="5,5,10,0" TextWrapping="Wrap" Width="200" Foreground="White"/>
<Image Source="/OpenTXspeak;component/icon.ico" Stretch="Uniform" /> <Image Source="/OpenTXspeak;component/icon.ico" Stretch="Uniform" Height="90" Width="90" />
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</Grid> </Grid>

BIN
speaker/speaker_logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
speaker/speaker_logo.xcf Normal file

Binary file not shown.