-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
9 changed files
with
123 additions
and
26 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
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
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
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
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
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
18 changes: 18 additions & 0 deletions
18
src/main/java/net/sagebits/weatherlink/gui/WeatherLauncher.java
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,11 +1,29 @@ | ||
package net.sagebits.weatherlink.gui; | ||
|
||
import java.util.regex.Pattern; | ||
import org.apache.logging.log4j.LogManager; | ||
import javafx.application.Application; | ||
|
||
public class WeatherLauncher | ||
{ | ||
public static void main(String[] args) | ||
{ | ||
if (args != null && args.length > 0) | ||
{ | ||
Pattern p = Pattern.compile("^([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | ||
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | ||
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])\\." + | ||
"([01]?\\d\\d?|2[0-4]\\d|25[0-5])$"); | ||
if (p.matcher(args[0]).matches()) | ||
{ | ||
WeatherLinkLiveGUIController.ip = args[0]; | ||
LogManager.getLogger(WeatherLauncher.class).debug("Read IP '{}' from command line arg", args[0]); | ||
} | ||
else | ||
{ | ||
LogManager.getLogger(WeatherLauncher.class).debug("Passed in param '{}' not an ip, ignoring.", args[0]); | ||
} | ||
} | ||
Application.launch(WeatherLinkLiveGUI.class); | ||
} | ||
} |
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
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