Skip to content

Commit

Permalink
Fixed writings, final fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
flobaader committed Jul 30, 2016
1 parent b05d2ae commit 7f4fbcd
Show file tree
Hide file tree
Showing 10 changed files with 224 additions and 196 deletions.
Binary file added SourceCode/StandBye/Installer/Thumbs.db
Binary file not shown.
11 changes: 7 additions & 4 deletions SourceCode/StandBye/StandBye/LanguageResources.de.resx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ And all the persons, who have supported us during the development: our families,
<value>Erweiterte Einstellungen</value>
</data>
<data name="application_upToDate" xml:space="preserve">
<value>Stand-Bye! ist aktuell!</value>
<value>Sie haben die aktuelle Version von Stand-Bye!</value>
</data>
<data name="ask_presMode" xml:space="preserve">
<value>Soll der Präsentationsmodus aktiviert werden?
Expand Down Expand Up @@ -245,7 +245,7 @@ And all the persons, who have supported us during the development: our families,
<value>Verhindert Standby während Musik / Filmen</value>
</data>
<data name="expl_StandbyAt" xml:space="preserve">
<value>Ignoriert Grenzwerte nach der festgelegten Zeit</value>
<value>Ignoriert Grenzwerte zur festgelegten Uhrzeit</value>
</data>
<data name="feature" xml:space="preserve">
<value>Extra Features</value>
Expand All @@ -269,10 +269,10 @@ And all the persons, who have supported us during the development: our families,
<value>Wenn einer der festgelegten Prozesse läuft, wird das System nicht in den Standby versetzt!</value>
</data>
<data name="info_general" xml:space="preserve">
<value>Stand-Bye überprüft nachdem die Wartezeit vorbei ist, ob das System gerade genutzt wird oder nicht. Wenn es nicht genutzt wird, wird der normale Standby gestartet. Durch das Festlegen aller Einstellungen wird garantiert, dass der Standby nur dann aktiviert wird, wenn er nicht stört.</value>
<value>Stand-Bye überprüft nach der Wartezeit, ob das System gerade genutzt wird. Wenn nicht, wird der Standby gestartet. Durch die Einstellungen kann festgelegt werden, wann der Standby verhindert wird.</value>
</data>
<data name="info_thresholds" xml:space="preserve">
<value>Stand-Bye überprüft, ob das System mehr ausgelastet ist, als die eingestellten Werte. Wenn dies der Fall ist, wird der Standby-Modus nicht aktiviert.</value>
<value>Stand-Bye überprüft, ob die Systemauslastungen größer sind als die eingestellten Werte. Wenn dies der Fall ist, wird der Standby-Modus nicht aktiviert.</value>
</data>
<data name="language" xml:space="preserve">
<value>Sprache</value>
Expand Down Expand Up @@ -379,4 +379,7 @@ And all the persons, who have supported us during the development: our families,
<data name="msg_waitTimeMinWarning" xml:space="preserve">
<value>Die Wartezeit darf nicht kleiner als 15 Sekunden sein!</value>
</data>
<data name="msg_processAlreadyAdded" xml:space="preserve">
<value>Dieser Prozess wurde schon hinzugefügt!</value>
</data>
</root>
5 changes: 4 additions & 1 deletion SourceCode/StandBye/StandBye/LanguageResources.en.resx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ And all the persons, who have supported us during the development: our families,
<value>e.g. Copying processes, Backups</value>
</data>
<data name="expl_NET" xml:space="preserve">
<value>e.g. Dowloads, Streams</value>
<value>e.g. Downloads, Streams</value>
</data>
<data name="expl_RAM" xml:space="preserve">
<value>e.g. Large Videoprojects</value>
Expand Down Expand Up @@ -421,4 +421,7 @@ And all the persons, who have supported us during the development: our families,
<data name="msg_waitTimeMinWarning" xml:space="preserve">
<value>The Wait-Time can't be less than 15 seconds!</value>
</data>
<data name="msg_processAlreadyAdded" xml:space="preserve">
<value>The process has already been added!</value>
</data>
</root>
23 changes: 15 additions & 8 deletions SourceCode/StandBye/StandBye/MetroSettingsForm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,17 @@ String^ StandBye::MetroSettingsForm::FormatDigits(double value) {
return String::Format("{0:" + formatter + "}", value);
}

void MetroSettingsForm::changeLabelBackgroundColor(MetroFramework::Controls::MetroLabel^ label, double SettingsValue, double readValue) {
if (SettingsValue > readValue) {
void MetroSettingsForm::changeLabelBackgroundColor(MetroFramework::Controls::MetroLabel^ label, double setValue, double realTimeValue, bool isActive) {
if (setValue > realTimeValue && isActive) {
label->BackColor = lightGreen;
}
else {
else if(isActive){
label->BackColor = lightRed;
}
else {
label->BackColor = Color::LightGray;
}

}
System::Void MetroSettingsForm::timerUIRefresh_Tick(System::Object^, System::EventArgs^) {
float curCPU, curRAM, curHDD, curNET;
Expand All @@ -185,10 +189,10 @@ System::Void MetroSettingsForm::timerUIRefresh_Tick(System::Object^, System::Eve
curNET = system_watcher->GetSystemMetric(SystemAccess::SystemMetric::NETWORK);

//changes Background Color of the currentUsage Labels
changeLabelBackgroundColor(metroLabelCurCPU, metroTrackBarCPU->Value, curCPU);
changeLabelBackgroundColor(metroLabelCurRAM, metroTrackBarRAM->Value, curRAM);
changeLabelBackgroundColor(metroLabelCurHDD, metroTrackBarHDD->Value, curHDD / 100);
changeLabelBackgroundColor(metroLabelCurNET, metroTrackBarNET->Value, curNET / 100);
changeLabelBackgroundColor(metroLabelCurCPU, metroTrackBarCPU->Value, curCPU, metroToggleCPU->Checked);
changeLabelBackgroundColor(metroLabelCurRAM, metroTrackBarRAM->Value, curRAM, metroToggleRAM->Checked);
changeLabelBackgroundColor(metroLabelCurHDD, metroTrackBarHDD->Value, curHDD / 100, metroToggleHDD->Checked);
changeLabelBackgroundColor(metroLabelCurNET, metroTrackBarNET->Value, curNET / 100, metroToggleNET->Checked);

//Formats Text on the currentUsage Labels
metroLabelCurCPU->Text = String::Format("{0:00.00} %", curCPU);
Expand Down Expand Up @@ -245,7 +249,10 @@ System::Void MetroSettingsForm::metroButtonAddFromFile_Click(System::Object^, Sy
listViewProc->Items->Add(gcnew ProcessItem(BasicFunc::StringToString(ofd->FileName), listViewProc));
}
else {
MessageBoxA(NULL, "Process has already been added!", "Error!", MB_OK);
//The process has already been added
String^ msg = res_man->GetString("msg_processAlreadyAdded", CultureInfo::DefaultThreadCurrentCulture);
MessageWindow^ msgWin = gcnew MessageWindow(msg, Windows::Forms::MessageBoxButtons::OK);
msgWin->ShowDialog();
}
}
}
Expand Down
Loading

0 comments on commit 7f4fbcd

Please sign in to comment.