Skip to content

Commit

Permalink
phase 3;
Browse files Browse the repository at this point in the history
no,
i am the one who knocks!
  • Loading branch information
moamdavoodi committed Jul 24, 2020
1 parent 33e5b11 commit 65d75c3
Show file tree
Hide file tree
Showing 24 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/main/java/client/graphicView/bankAPI/BankAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static void display() throws IOException {
window = new Stage();
window.initModality(Modality.APPLICATION_MODAL);
window.setTitle("Hello World");
Scene root = new Scene(FXMLLoader.load(BuyLog.class.getResource("/client/graphicView/bankAPI/BankAPI.fxml")));
Scene root = new Scene(FXMLLoader.load(BankAPI.class.getResource("/client/graphicView/bankAPI/BankAPI.fxml")));
window.setScene(root);
window.setMaximized(true);
window.show();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ private void goPreviousScene() {
}

private void playButtonSound() {
MediaPlayer mediaPlayer = new MediaPlayer(new Media(new File("src/server.main/resources/media/sound/Mouse-Click-00-c-FesliyanStudios.com.mp3").toURI().toString()));
MediaPlayer mediaPlayer = new MediaPlayer(new Media(new File("src/main/resources/media/sound/Mouse-Click-00-c-FesliyanStudios.com.mp3").toURI().toString()));
mediaPlayer.play();
}

Expand Down
15 changes: 13 additions & 2 deletions src/main/java/client/graphicView/productMenu/ProductsMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import javafx.beans.property.StringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.Event;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.*;
Expand All @@ -20,9 +20,20 @@

import java.io.*;
import java.net.Socket;
import java.net.URL;
import java.util.ArrayList;
import java.util.ResourceBundle;

public class ProductsMenu implements Initializable {
@Override
public void initialize(URL url, ResourceBundle resourceBundle) {
try {
process();
} catch (IOException e) {
e.printStackTrace();
}
}

public class ProductsMenu {
public Menu id;
public Pane root;
private TableView<CategoryProperty> tableView;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@
opens client.graphicView.userRegion.userAccount.sellerAccount to javafx.fxml;
opens client.graphicView.userRegion.userAccount.purchaserAccount to javafx.fxml;
// opens server to javafx.graphics;
exports client to javafx.graphics;
}
16 changes: 4 additions & 12 deletions src/main/java/server/main/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import server.model.product.Auction;
import server.model.product.Product;
import server.viewServer.mainMenu.MainMenuServer;
import server.viewServer.productMenu.productsMenuServer;
import server.viewServer.userRegion.loginPanel.LoginPanelServer;

import java.io.IOException;
Expand All @@ -33,18 +34,9 @@ public static void setAccountRegionStage(Stage accountRegionStage) {

public static void main(String[] args) throws IOException {
reload();
// new MainMenuServer();
new Thread(new Runnable() {
@Override
public void run() {
try {
new LoginPanelServer();
} catch (IOException e) {
e.printStackTrace();
}

}
}).start();
new MainMenuServer();
new LoginPanelServer();
new productsMenuServer();
}

private static void setCategoryParent(ArrayList<Category> all) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void run() {
} else if (input.startsWith("get_category_name ")) {
processGetCategoryName(Integer.parseInt(input.substring(18)));
} else if (input.startsWith("sub_category_size_from_parent ")) {
processSubCategorySizeFromParent(Integer.parseInt(input.substring(18)));
processSubCategorySizeFromParent(Integer.parseInt(input.substring(30)));
} else if (input.startsWith("get_sub_category_name_From_Parent ")) {
processGetSubCategoryNameFromParent(input.substring(34));
} else if (input.startsWith("sub_menu_ ")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
import server.controller.LoginPageController;
import server.main.BankAPI;
import server.model.ShopBankAccount;
import server.model.account.Account;
import server.model.account.Purchaser;
import server.model.account.Seller;
import server.model.product.Product;
import server.viewServer.userRegion.LoginPanel.LoginPanelServer;
import server.viewServer.userRegion.userAccount.purchaserAccount.PurchaserWalletServer;
import server.viewServer.userRegion.loginPanel.LoginPanelServer;

import java.io.*;
import java.net.ServerSocket;
Expand Down Expand Up @@ -126,7 +124,7 @@ public String processGetToken(String path) throws IOException {
}

public void processGetSize(String token) throws IOException {
Purchaser purchaser = Purchaser.getPurchaserByUsername(LoginPanelServer.tokenToUser.get(token));
Purchaser purchaser = Purchaser.getPurchaserByUsername(LoginPanelServer.getTokenToUser().get(token));
dataOutputStream.writeUTF(String.valueOf(purchaser.getSellerSelectedForEachProduct().keySet().size()));
dataOutputStream.flush();
}
Expand Down
2 changes: 1 addition & 1 deletion target/classes/Categories/ta.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"ta","subCategories":[],"allSubProducts":[{"productID":"Product_18838727","status":"IN_CREATION_PROGRESS","categoryAttributes":{},"name":"apple","companyName":"digikala","price":2000.0,"allSellers":[],"isAvailable":false,"allComments":[],"explanationText":"","allRating":[],"generatedDate":"Jul 24, 2020, 6:11:40 PM","viewTimes":0,"imageName":""},{"productID":"Product_6150347","status":"IN_CREATION_PROGRESS","categoryAttributes":{},"name":"orange","companyName":"amazon","price":3000.0,"allSellers":[],"isAvailable":false,"allComments":[],"explanationText":"","allRating":[],"generatedDate":"Jul 24, 2020, 6:11:40 PM","viewTimes":0,"imageName":""},{"productID":"Product_48074900","status":"IN_CREATION_PROGRESS","categoryAttributes":{},"name":"pineapple","companyName":"gajmarket","price":4000.0,"allSellers":[],"isAvailable":false,"allComments":[],"explanationText":"","allRating":[],"generatedDate":"Jul 24, 2020, 6:11:40 PM","viewTimes":0,"imageName":""}],"attributes":[]}
{"name":"ta","subCategories":[],"allSubProducts":[{"productID":"Product_94134781","status":"IN_CREATION_PROGRESS","categoryAttributes":{},"name":"apple","companyName":"digikala","price":2000.0,"allSellers":[],"isAvailable":false,"allComments":[],"explanationText":"","allRating":[],"generatedDate":"Jul 24, 2020, 6:12:50 PM","viewTimes":0,"imageName":""},{"productID":"Product_68354243","status":"IN_CREATION_PROGRESS","categoryAttributes":{},"name":"orange","companyName":"amazon","price":3000.0,"allSellers":[],"isAvailable":false,"allComments":[],"explanationText":"","allRating":[],"generatedDate":"Jul 24, 2020, 6:12:50 PM","viewTimes":0,"imageName":""},{"productID":"Product_6568388","status":"IN_CREATION_PROGRESS","categoryAttributes":{},"name":"pineapple","companyName":"gajmarket","price":4000.0,"allSellers":[],"isAvailable":false,"allComments":[],"explanationText":"","allRating":[],"generatedDate":"Jul 24, 2020, 6:12:50 PM","viewTimes":0,"imageName":""}],"attributes":[]}
Binary file removed target/classes/META-INF/New.kotlin_module
Binary file not shown.
2 changes: 1 addition & 1 deletion target/classes/Products/apple.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"productID":"Product_18838727","status":"IN_CREATION_PROGRESS","categoryAttributes":{},"name":"apple","companyName":"digikala","price":2000.0,"allSellers":[],"isAvailable":false,"allComments":[],"explanationText":"","allRating":[],"generatedDate":"Jul 24, 2020, 6:11:40 PM","viewTimes":0,"imageName":""}
{"productID":"Product_94134781","status":"IN_CREATION_PROGRESS","categoryAttributes":{},"name":"apple","companyName":"digikala","price":2000.0,"allSellers":[],"isAvailable":false,"allComments":[],"explanationText":"","allRating":[],"generatedDate":"Jul 24, 2020, 6:12:50 PM","viewTimes":0,"imageName":""}
Binary file modified target/classes/client/graphicView/bankAPI/BankAPI.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified target/classes/client/graphicView/productMenu/ProductsMenu.class
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion target/classes/graphicView/buyLogPage/buyLogPage.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.BorderPane?>

<AnchorPane prefHeight="477.0" prefWidth="270.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="graphicView.buyLogPage.BuyLogPageController">
<AnchorPane prefHeight="477.0" prefWidth="270.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="client.graphicView.buyLogPage.BuyLogPageController">
<children>
<TableView fx:id="buyLogIdsTableView" layoutX="155.0" layoutY="324.0" prefHeight="404.0" prefWidth="270.0" AnchorPane.bottomAnchor="73.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columns>
Expand Down
Binary file modified target/classes/module-info.class
Binary file not shown.
Binary file removed target/classes/server/main/Main$1.class
Binary file not shown.
Binary file modified target/classes/server/main/Main.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 65d75c3

Please sign in to comment.