Skip to content

Commit

Permalink
+ add an error message in case the selected option for player is not …
Browse files Browse the repository at this point in the history
…one of the recognized one.
  • Loading branch information
plebreton committed Jun 21, 2016
1 parent cfc32d0 commit 9e6114b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions AVRate/SliderTest/SettingsReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ using namespace System::Collections::Generic;
using namespace System::Xml;
using namespace System;
using namespace SliderTest;
using namespace System::Windows::Forms;


SettingsReader::SettingsReader(String^ file) {
Expand Down Expand Up @@ -326,6 +327,8 @@ SliderTest::GeneralSettings^ SettingsReader::ReadGeneralSettings() {
generalSettings->localPlayer = LocalPlayer::COMMAND_LINE;
else
{
System::Resources::ResourceManager ^resman = gcnew System::Resources::ResourceManager("SliderTest.UImsg",System::Reflection::Assembly::GetExecutingAssembly());
MessageBox::Show( resman->GetString("ERR_unknownPlayer",generalSettings->systemculture) + kv->value->ToLower(), resman->GetString("PlayerErrorHeader",generalSettings->systemculture),MessageBoxButtons::OK, MessageBoxIcon::Error);
bitSet = bitSet & ~SettingTypes::LocalPlayer;
}
}
Expand Down
8 changes: 8 additions & 0 deletions AVRate/SliderTest/UImsg.resx
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@
<value>Server entries must have 4 values or multiples of 4</value>
<comment>Playlist file contains bad formatted server entries (Several Rating)</comment>
</data>
<data name="ERR_unknownPlayer" xml:space="preserve">
<value>An unknown player was specified in the settings file: </value>
<comment>The player should strictly be one of the option described in the manual.</comment>
</data>
<data name="FillTextbox" xml:space="preserve">
<value>Please fill out the text box</value>
<comment>Main window : settings or playlist file not specified</comment>
Expand Down Expand Up @@ -236,6 +240,10 @@ Reason : WaitFrameVS</value>
<value>Playlist file could not be found</value>
<comment>Playlist file can not be found</comment>
</data>
<data name="PlayerErrorHeader" xml:space="preserve">
<value>Player Error</value>
<comment>The selected player is not recognized as one of the pre-defined players.</comment>
</data>
<data name="QuitQuestionHeader" xml:space="preserve">
<value>Exit Application</value>
<comment>Window title when 'exit' was typed in</comment>
Expand Down
2 changes: 1 addition & 1 deletion AVRate/SliderTest/settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ The script "PlaybackEnd.vbs" will be called after then end of the video.


<localplayer>vlc10</localplayer>
<playerpath>C:\Programme\VideoLAN\VLC</playerpath>
<playerpath>C:\Programme\VideoLAN\VLC\vlc.exe</playerpath>


<!--
Expand Down

0 comments on commit 9e6114b

Please sign in to comment.