-
-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2a35e5
commit 3dc8a7a
Showing
2 changed files
with
19 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,30 @@ | ||
package mediathek.windows; | ||
package mediathek.windows | ||
|
||
import mediathek.mainwindow.MediathekGui; | ||
import mediathek.tool.notification.INotificationCenter; | ||
import mediathek.tool.notification.WinNotificationCenter; | ||
import mediathek.tool.threads.IndicatorThread; | ||
import org.apache.logging.log4j.LogManager; | ||
import org.apache.logging.log4j.Logger; | ||
import mediathek.mainwindow.MediathekGui | ||
import mediathek.tool.notification.INotificationCenter | ||
import mediathek.tool.notification.WinNotificationCenter | ||
import mediathek.tool.threads.IndicatorThread | ||
import org.apache.logging.log4j.LogManager | ||
import java.io.IOException | ||
|
||
import java.io.IOException; | ||
|
||
public class MediathekGuiWindows extends MediathekGui { | ||
private final Logger logger = LogManager.getLogger(MediathekGuiWindows.class); | ||
public MediathekGuiWindows() { | ||
super(); | ||
} | ||
|
||
@Override | ||
protected void shutdownComputer() { | ||
final String[] strShutdownCommand = {"shutdown.exe", "-s", "-t", "0"}; | ||
class MediathekGuiWindows : MediathekGui() { | ||
private val logger = LogManager.getLogger() | ||
|
||
override fun shutdownComputer() { | ||
val strShutdownCommand = arrayOf("shutdown.exe", "-s", "-t", "0") | ||
try { | ||
logger.info("Windows shutdown binary called."); | ||
Runtime.getRuntime().exec(strShutdownCommand); | ||
} catch (IOException ex) { | ||
logger.error(ex); | ||
logger.info("Windows shutdown binary called.") | ||
Runtime.getRuntime().exec(strShutdownCommand) | ||
} catch (ex: IOException) { | ||
logger.error(ex) | ||
} | ||
} | ||
|
||
@Override | ||
protected IndicatorThread createProgressIndicatorThread() { | ||
return new TaskbarIndicatorThread(this); | ||
override fun createProgressIndicatorThread(): IndicatorThread { | ||
return TaskbarIndicatorThread(this) | ||
} | ||
|
||
@Override | ||
protected INotificationCenter getNotificationCenter() { | ||
return new WinNotificationCenter(); | ||
override fun getNotificationCenter(): INotificationCenter { | ||
return WinNotificationCenter() | ||
} | ||
} |
File renamed without changes.