Skip to content

Commit

Permalink
0611 2019 - Hopefully the last code change. This is a partial rewrite…
Browse files Browse the repository at this point in the history
… of the splash screen. Need to use the about from Helios in the PE, not just the CC but ran out of time.
  • Loading branch information
BlueFinBima authored and BlueFinBima committed Jun 11, 2019
1 parent 4e4218b commit c902f02
Show file tree
Hide file tree
Showing 25 changed files with 435 additions and 306 deletions.
11 changes: 5 additions & 6 deletions Control Center/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,15 @@ public static void Main()
{
if (SingleInstance<App>.InitializeAsFirstInstance(InstanceUniqueName))
{
SplashScreen splashScreen = null;
//SplashScreen splashScreen = null;

splashScreen = new SplashScreen("splash_logo.png");
splashScreen.Show(false);
//splashScreen = new SplashScreen("splash_logo.png");
//splashScreen.Show(false);
GadrocsWorkshop.Helios.ControlCenter.App app = new GadrocsWorkshop.Helios.ControlCenter.App();
app.InitializeComponent();
Thread.Sleep(1000);
splashScreen.Close(TimeSpan.FromMilliseconds(500));
//Thread.Sleep(1000);
//splashScreen.Close(TimeSpan.FromMilliseconds(500));
app.Run();

SingleInstance<App>.Cleanup();
}
}
Expand Down
2 changes: 1 addition & 1 deletion Control Center/Control Center.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>611</ApplicationRevision>
<ApplicationRevision>0611</ApplicationRevision>
<ApplicationVersion>1.4.2019.0611</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
Expand Down
19 changes: 16 additions & 3 deletions Control Center/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ namespace GadrocsWorkshop.Helios.ControlCenter
using System.Windows.Input;
using System.Windows.Interop;
using System.Windows.Threading;
using GadrocsWorkshop.Helios.Splash;

/// <summary>
/// Interaction logic for MainWindow.xaml
Expand Down Expand Up @@ -52,6 +53,8 @@ public MainWindow()
InitializeComponent();

ConfigManager.LogManager.LogInfo("Initializing Main Window");

displaySplash(4000); // Display a dynamic splash panel with release and credits

MinimizeCheckBox.IsChecked = ConfigManager.SettingsManager.LoadSetting("ControlCenter", "StartMinimized", false);
if (MinimizeCheckBox.IsChecked == true)
Expand Down Expand Up @@ -120,6 +123,15 @@ public MainWindow()
SetProjectReleaseMessage();
}

private void displaySplash(Int32 splashDelay)
{
About aboutDialog = new About();
aboutDialog.InitializeComponent();
aboutDialog.Show();
System.Threading.Thread.Sleep(splashDelay);
aboutDialog.Close();
}

#region Properties

public HeliosProfile ActiveProfile
Expand Down Expand Up @@ -720,6 +732,7 @@ private void Window_Opened(object sender, EventArgs e)
}
}


App app = Application.Current as App;
if (app != null && app.StartupProfile != null && File.Exists(app.StartupProfile))
{
Expand Down Expand Up @@ -856,9 +869,9 @@ private void SetLicenseMessage()

private void SetProjectReleaseMessage()
{
Message = Assembly.GetEntryAssembly().GetName().Version.ToString() +
"\nProject Fork: BlueFinBima\n" +
"Contributors: Gadroc BlueFinBima CaptZeen derammo KiwiLostInMelb damien022 Will Hartsell Cylution Rachmaninoff yzfanimal";
Version _runningVersion = Assembly.GetEntryAssembly().GetName().Version;
Message = _runningVersion.Major.ToString() + "." + _runningVersion.Minor.ToString() + "." + _runningVersion.Build.ToString() + "." + _runningVersion.Revision.ToString("0000") +
"\nProject Fork: BlueFinBima\n";
}
#endregion

Expand Down
15 changes: 15 additions & 0 deletions Helios/About.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Window x:Class="GadrocsWorkshop.Helios.Splash.About"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="About" Height="165" Width="527" WindowStyle="None" ShowInTaskbar="False" WindowStartupLocation="Manual">
<Canvas Width="512" Margin="3.5,3.5,3.5,3.5">
<Image Source="about.png" Canvas.Left="0" Canvas.Top="0"/>
<Image Name="AccentImage" Source="Icon.png" Canvas.Top="50"/>
<TextBlock Canvas.Left="368" Canvas.Top="12" Height="23" Name="VersionBlock" Text="0.0.0.0" Width="132" />
<TextBlock FontWeight="Bold" Canvas.Left="293" Canvas.Top="35" Height="23" Name="ProjectLabel" Text="Project Fork:" Width="74" />
<TextBlock Canvas.Left="368" Canvas.Top="35" Height="23" Name="ProjectBlock" Text="BlueFinBima" Width="132" />
<TextBlock FontWeight="Bold" Canvas.Left="327" Canvas.Top="58" Height="23" Name="StatusLabel" Text="Status:" Width="40" />
<TextBlock Canvas.Left="368" Canvas.Top="58" Height="23" Name="StatusBlock" Text="In Development" Width="132" />
<TextBlock Foreground="DarkBlue" FontSize="14" FontWeight="SemiBold" Canvas.Left="8" Canvas.Top="84" Height="18" Name="ContributionTitle" Text="Contributors:" Width="85" />
<TextBlock Foreground="DarkBlue" FontSize="14" FontWeight="SemiBold" TextWrapping="Wrap" Canvas.Left="96" Canvas.Top="84" Height="66" Name="ContributionBlock" Text="" Width="416" /> </Canvas>
</Window>
55 changes: 55 additions & 0 deletions Helios/About.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// Copyright 2014 Craig Courtney
//
// Helios is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Helios is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.

namespace GadrocsWorkshop.Helios.Splash
{
using System;
using System.Reflection;
using System.Windows;
using System.Windows.Input;

/// <summary>
/// Interaction logic for About.xaml
/// </summary>
public partial class About : Window
{
public About()
{
InitializeComponent();
}

protected override void OnActivated(EventArgs e)
{
Version _runningVersion = Assembly.GetEntryAssembly().GetName().Version;
VersionBlock.Text = _runningVersion.Major.ToString() + "." + _runningVersion.Minor.ToString() + "." + _runningVersion.Build.ToString() + "." + _runningVersion.Revision.ToString("0000");
ContributionBlock.Text = "Gadroc; BlueFinBima; ";
ContributionBlock.Text = ContributionBlock.Text + "CaptZeen; derammo; KiwiLostInMelb; damien022; Will Hartsell; Cylution; Rachmaninoff; yzfanimal ";
StatusBlock.Text = "Released";
base.OnActivated(e);
}

protected override void OnKeyDown(KeyEventArgs e)
{
Close();
base.OnKeyDown(e);
}

protected override void OnMouseDown(MouseButtonEventArgs e)
{
Close();
base.OnMouseDown(e);
}
}
}
9 changes: 9 additions & 0 deletions Helios/Helios.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
<Compile Include="About.xaml.cs">
<DependentUpon>About.xaml</DependentUpon>
</Compile>
<Compile Include="BaseDeserializer.cs" />
<Compile Include="BindingValue.cs" />
<Compile Include="BindingValueSources.cs" />
Expand Down Expand Up @@ -815,6 +818,8 @@
<Resource Include="Interfaces\DCS\M2000CSimple\ExportFunctions.lua" />
<Resource Include="Interfaces\DCS\Mi8Simple\ExportFunctions.lua" />
<None Include="Fonts\Helios font registration.reg" />
<Resource Include="about.png" />
<Resource Include="Icon.png" />
<Content Include="Fonts\Hornet IFEI.ttf">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -1290,6 +1295,10 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Page Include="About.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Controls\CustomGaugeAppearanceEditor.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down
Binary file added Helios/Icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions Helios/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.2019.0317")]
[assembly: AssemblyFileVersion("1.4.2019.0317")]
[assembly: AssemblyVersion("1.4.2019.0611")]
[assembly: AssemblyFileVersion("1.4.2019.0611")]
1 change: 1 addition & 0 deletions Helios/VersionChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ private static void GetRunningVersion()
try
{
_runningVersion = Assembly.GetEntryAssembly().GetName().Version;
string _strRevision = _runningVersion.Major.ToString() + "." + _runningVersion.Minor.ToString() + "." + _runningVersion.Build.ToString() + "." + _runningVersion.Revision.ToString("0000");
}
catch (Exception e)
{
Expand Down
Binary file added Helios/about.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit c902f02

Please sign in to comment.