Skip to content

Commit

Permalink
Modify proyects, add images and update close event in wpf version
Browse files Browse the repository at this point in the history
  • Loading branch information
—ins— committed Oct 20, 2021
1 parent ebc5a73 commit 6ddf947
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 16 deletions.
2 changes: 1 addition & 1 deletion C++ splash/SplashScreenStarter.rc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ END

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
//IDI_SPLASHICON ICON "logo-ergolux.ico"
//IDI_SPLASHICON ICON "small.ico"


/////////////////////////////////////////////////////////////////////////////
Expand Down
32 changes: 24 additions & 8 deletions C++ splash/Splash_C++.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -143,17 +143,22 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<Optimization>MinSpace</Optimization>
<IntrinsicFunctions>false</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<LanguageStandard>Default</LanguageStandard>
<ExceptionHandling>Sync</ExceptionHandling>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<LanguageStandard>stdcpp17</LanguageStandard>
<ExceptionHandling>false</ExceptionHandling>
<EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
<OmitFramePointers>true</OmitFramePointers>
<WholeProgramOptimization>true</WholeProgramOptimization>
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
<LanguageStandard_C>Default</LanguageStandard_C>
</ClCompile>
<Link>
<AdditionalDependencies>shlwapi.lib;windowscodecs.lib;%(AdditionalDependencies)</AdditionalDependencies>
Expand All @@ -165,6 +170,7 @@
</IgnoreAllDefaultLibraries>
<ImageHasSafeExceptionHandlers>
</ImageHasSafeExceptionHandlers>
<LinkTimeCodeGeneration>UseFastLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
Expand All @@ -191,9 +197,19 @@
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<Image Include="small.ico" />
<Image Include="SplashScreenStarter.ico" />
<Image Include="startuppic.jpg" />
<Image Include="small.ico">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Image>
<Image Include="SplashScreenStarter.ico">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Image>
<CopyFileToFolders Include="Splash_image.png">
<TreatOutputAsContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</TreatOutputAsContent>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</ExcludedFromBuild>
</CopyFileToFolders>
<Image Include="startuppic.jpg">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</Image>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="SplashScreenStarter.rc" />
Expand Down
3 changes: 3 additions & 0 deletions C++ splash/Splash_C++.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,8 @@
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="settings.txt" />
<CopyFileToFolders Include="Splash_image.png">
<Filter>Resource Files</Filter>
</CopyFileToFolders>
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions MASM x64/Splash_x64.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
<ItemGroup>
<CopyFileToFolders Include="settings.txt">
<TreatOutputAsContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</TreatOutputAsContent>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="Splash_image.png">
<TreatOutputAsContent Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</TreatOutputAsContent>
</CopyFileToFolders>
</ItemGroup>
<PropertyGroup Label="Globals">
Expand Down
1 change: 1 addition & 0 deletions MASM x64/Splash_x64.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="settings.txt" />
<CopyFileToFolders Include="Splash_image.png" />
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions MASM x86/Splash_x86.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,11 @@
<TreatOutputAsContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</TreatOutputAsContent>
</CopyFileToFolders>
</ItemGroup>
<ItemGroup>
<CopyFileToFolders Include="Splash_image.png">
<TreatOutputAsContent Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</TreatOutputAsContent>
</CopyFileToFolders>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4164AA65-1EF9-4E69-899B-D1BED776070B}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
Expand Down
4 changes: 1 addition & 3 deletions Test - C# WPF/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@ protected override void OnStartup(StartupEventArgs e)
private void CloseSplashScreen()
{
// Signal the native process that launched us to close the splash screen
using var closeSplashEvent = new EventWaitHandle(false,
EventResetMode.ManualReset,
"CloseSplashScreenEventSplashScreenStarter")
using var closeSplashEvent = new EventWaitHandle(false, EventResetMode.ManualReset, "CloseSplashScreenEvent");
closeSplashEvent.Set();
}
}
Expand Down
6 changes: 3 additions & 3 deletions Test - C# WPF/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
mc:Ignorable="d"
Title="Main window" Height="450" Width="800" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize">
<Grid>
<Label x:Name="label" Content="Splash screen tester" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="20" Margin="0,10,0,0"/>
<Label x:Name="label2" Content="Code in App.xaml.cs" HorizontalAlignment="Center" Height="27" Margin="0,45,0,0" VerticalAlignment="Top" Width="122"/>
<TextBox x:Name="textbox" Text=" protected override void OnStartup(StartupEventArgs e)&#xD;&#xA; {&#xD;&#xA; Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Loaded,&#xD;&#xA; (DispatcherOperationCallback)delegate { CloseSplashScreen(); return null; },&#xD;&#xA; this);&#xD;&#xA; base.OnStartup(e);&#xD;&#xA; }&#xD;&#xA;&#xD;&#xA; private void CloseSplashScreen()&#xD;&#xA; {&#xD;&#xA; // Signal the native process that launched us to close the splash screen&#xD;&#xA; using var closeSplashEvent = new EventWaitHandle(false,&#xD;&#xA; EventResetMode.ManualReset,&#xD;&#xA; &quot;CloseSplashScreenEventSplashScreenStarter&quot;)&#xD;&#xA; closeSplashEvent.Set();&#xD;&#xA; }" HorizontalAlignment="Center" Height="354" Margin="0,70,0,0" VerticalAlignment="Top" Width="566" FontSize="14">
<Label x:Name="label" Content="Splash screen tester" HorizontalAlignment="Center" VerticalAlignment="Top" FontSize="22" Margin="0,10,0,0"/>
<Label x:Name="label2" Content="Code in App.xaml.cs" HorizontalAlignment="Center" Height="27" Margin="0,43,0,0" VerticalAlignment="Top" Width="136" FontSize="14"/>
<TextBox x:Name="textbox" Text="protected override void OnStartup(StartupEventArgs e)&#xA;{&#xA; Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Loaded,&#xA; (DispatcherOperationCallback)delegate { CloseSplashScreen(); return null; },&#xA; this);&#xA; base.OnStartup(e);&#xA;}&#xA;&#xA;private void CloseSplashScreen()&#xA;{&#xA; // Signal the native process that launched us to close the splash screen&#xA; using var closeSplashEvent = new EventWaitHandle(false,&#xA; EventResetMode.ManualReset, &quot;CloseSplashScreenEvent&quot;);&#xA; closeSplashEvent.Set();&#xA;}" HorizontalAlignment="Center" Height="330" Margin="0,79,0,0" VerticalAlignment="Top" Width="644" FontSize="16">
<TextBox.Style>
<Style TargetType="TextBox">
<Setter Property="IsReadOnly" Value="True" />
Expand Down
1 change: 1 addition & 0 deletions Test - C# WPF/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ public MainWindow()
{
InitializeComponent();
}

}
}
1 change: 0 additions & 1 deletion Test - C# WPF/Test - WPF.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
</PropertyGroup>

<ItemGroup>
<Compile Remove="App.xaml.cs" />
<Compile Remove="Properties\AssemblyInfo.cs" />
<Compile Remove="Window1.xaml.cs" />
</ItemGroup>
Expand Down

0 comments on commit 6ddf947

Please sign in to comment.