Skip to content

Commit

Permalink
instance variables...
Browse files Browse the repository at this point in the history
  • Loading branch information
dep11007 committed Apr 28, 2015
1 parent ae4b431 commit a7c1a94
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Binary file modified bin/thermostat/ThermostatDevice.class
Binary file not shown.
1 change: 1 addition & 0 deletions src/InputOutput/UserLogin.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class UserLogin implements Initializable {
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
_server = server.getInstance();
System.out.println(_server);
this.loginButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
//checks user name and pass word when login button pressed. If not true nothing happens.
Expand Down
6 changes: 4 additions & 2 deletions src/server/server.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

public class server extends ServerNetworking implements Thermostatable, Serializable {
private static server instance = null;

public static server getInstance() {
if (instance == null){
try {
Expand Down Expand Up @@ -42,9 +42,10 @@ public server() throws Exception {
String ip = "127.0.0.1";
String email = "admin@uconn.edu";
String serialNumber = "1.1";
Database dataStorage = new Database(this);
dataStorage = new Database(this);
dataStorage.createUser(email, adminPassword, ip, serialNumber);
this.startServerListenerThreadCurrentTemp();
dataStorage.printStruct();
instance = this;
}

Expand All @@ -64,6 +65,7 @@ public boolean createThermostat(String serialnumber, String name, String ip, Str
}

public Hashtable<String, String> getUserFromEmail(String email) {
dataStorage.printStruct();
return dataStorage.getObjectFromTableAndKey("UserTable", email);
}

Expand Down

0 comments on commit a7c1a94

Please sign in to comment.