// Path: src/com/minhasKamal/ultimateCalculator/utils/fileIO/FileIO.java
// public class FileIO {
// 	/**
// 	 * Takes a file path & returns whole content of the file. Used for reading external
// 	 * files.
// 	 * @param filePath input file path
// 	 * @return full information of the file
// 	 * @throws Exception 
// 	 */
// 	public static String readWholeFile(String filePath) throws Exception{
// 		
// 		byte[] bytes = java.nio.file.Files.readAllBytes(java.nio.file.Paths.get(new File(filePath).toURI()));
// 		String Information = new String(bytes);	//contains the full file
// 			
// 		return Information; 
// 	}
// 	
// 	/**
// 	 * Takes a input stream & returns whole content of the file. Mainly used for reading
// 	 * files inside jar.
// 	 * @param filePath input file path
// 	 * @return full information of the file
// 	 * @throws Exception 
// 	 */
// 	public static String readWholeFile(InputStream inputStream) throws Exception{
// 		String string = "";	//for temporary data store
// 		String Information = "";	//#contains the full file 
// 		
// 		BufferedReader mainBR = new BufferedReader(new InputStreamReader(inputStream));
// 		
// 		string = mainBR.readLine();
// 		while(string!=null){	//reading step by step
// 			Information += string + "\n"; 
// 			
// 			string = mainBR.readLine();
// 		}
// 		
// 		mainBR.close();
// 		
// 		return Information; 
// 	}
// 	
// 	/**
// 	 * Takes file path and information to be written as string and writes the whole string to the file at once.
// 	 * If file name already exists over-writes it, else creates new file. 
// 	 * @param FileName full file path
// 	 * @param Information information to be written
// 	 * @throws Exception 
// 	 */
// 	public static void writeWholeFile(String FileName, String Information) throws Exception{
// 		
// 		BufferedWriter mainBW = new BufferedWriter(new FileWriter(FileName));
// 		mainBW.write(Information);
// 		mainBW.close();
// 			
// 		return ;
// 	}
// }


import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.UIManager;
import com.minhasKamal.ultimateCalculator.utils.fileIO.FileIO;

/****************************************************************************************************************
* Developer: Minhas Kamal(BSSE-0509, IIT, DU)																	*
* Date: 17-Dec-2013																								*
* Modified: 25-Dec-2013																							*
* Modified: 13-May-2014																							*
* Modified: 31-Dec-2014																							*
****************************************************************************************************************/

package com.minhasKamal.ultimateCalculator.help.developer;




/**
 * Shows developer's profile.
 * 
 * @author Minhas Kamal
 */
public class Profile implements Runnable{
	// GUI Declaration
	private ProfileGui gui;
	
	//**
	// Variable Declaration 																	#*******D*******#
	//**
	private JButton jButtonPhoto;
	private JLabel jLabelDate;
    private JLabel jLabelPhoto[];
    private JTextArea jTextAreaInformation;
    
    //other variables
    private String date;			//Change it accordingly
    private int numberOfPhotos;		//number of profile photos
    private int position;			//position determiner 
    private boolean isStanding;		//picture show is standing or not
    private String developerInfo;
    
    //thread
    private Thread thread;			//main thread
	// End of Variable Declaration 																#_______D_______#

	/***##Constructor##***/
	public Profile() {
		date="17-Jan-2014";
    	isStanding=false;
    	position=0;
    	
		initialComponent();
		
		//*Thread*//
        thread = new Thread(this);
        thread.start();
	}
	
	public Profile(String date) {
    	this.date=date;
    	isStanding=false;
    	position=0;

    	initialComponent();
    	
    	//*Thread*//
        thread = new Thread(this);
        thread.start();
    }

	
	/**
	 * Method for Initializing all the GUI variables and placing them all to specific space on 
	 * the frame. It also specifies criteria of the main frame.
	 */
	private void initialComponent() {
		// GUI Initialization
		gui = new ProfileGui();
		gui.setVisible(true);
		
		//**
		// Assignation 																			#*******A*******#
		//**
    	jButtonPhoto = gui.jButtonPhoto;
        jLabelDate = gui.jLabelDate;
        jLabelPhoto = gui.jLabelPhoto;
        jTextAreaInformation = gui.jTextAreaInformation;
        
        numberOfPhotos = gui.numberOfPhotos;
        
        try {

// Path: src/com/minhasKamal/ultimateCalculator/utils/fileIO/FileIO.java
// public class FileIO {
// 	/**
// 	 * Takes a file path & returns whole content of the file. Used for reading external
// 	 * files.
// 	 * @param filePath input file path
// 	 * @return full information of the file
// 	 * @throws Exception 
// 	 */
// 	public static String readWholeFile(String filePath) throws Exception{
// 		
// 		byte[] bytes = java.nio.file.Files.readAllBytes(java.nio.file.Paths.get(new File(filePath).toURI()));
// 		String Information = new String(bytes);	//contains the full file
// 			
// 		return Information; 
// 	}
// 	
// 	/**
// 	 * Takes a input stream & returns whole content of the file. Mainly used for reading
// 	 * files inside jar.
// 	 * @param filePath input file path
// 	 * @return full information of the file
// 	 * @throws Exception 
// 	 */
// 	public static String readWholeFile(InputStream inputStream) throws Exception{
// 		String string = "";	//for temporary data store
// 		String Information = "";	//#contains the full file 
// 		
// 		BufferedReader mainBR = new BufferedReader(new InputStreamReader(inputStream));
// 		
// 		string = mainBR.readLine();
// 		while(string!=null){	//reading step by step
// 			Information += string + "\n"; 
// 			
// 			string = mainBR.readLine();
// 		}
// 		
// 		mainBR.close();
// 		
// 		return Information; 
// 	}
// 	
// 	/**
// 	 * Takes file path and information to be written as string and writes the whole string to the file at once.
// 	 * If file name already exists over-writes it, else creates new file. 
// 	 * @param FileName full file path
// 	 * @param Information information to be written
// 	 * @throws Exception 
// 	 */
// 	public static void writeWholeFile(String FileName, String Information) throws Exception{
// 		
// 		BufferedWriter mainBW = new BufferedWriter(new FileWriter(FileName));
// 		mainBW.write(Information);
// 		mainBW.close();
// 			
// 		return ;
// 	}
// }


// Path: src/com/minhasKamal/ultimateCalculator/help/developer/Profile.java
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JTextArea;
import javax.swing.UIManager;
import com.minhasKamal.ultimateCalculator.utils.fileIO.FileIO;

/****************************************************************************************************************
* Developer: Minhas Kamal(BSSE-0509, IIT, DU)																	*
* Date: 17-Dec-2013																								*
* Modified: 25-Dec-2013																							*
* Modified: 13-May-2014																							*
* Modified: 31-Dec-2014																							*
****************************************************************************************************************/

package com.minhasKamal.ultimateCalculator.help.developer;




/**
 * Shows developer's profile.
 * 
 * @author Minhas Kamal
 */
public class Profile implements Runnable{
	// GUI Declaration
	private ProfileGui gui;
	
	//**
	// Variable Declaration 																	#*******D*******#
	//**
	private JButton jButtonPhoto;
	private JLabel jLabelDate;
    private JLabel jLabelPhoto[];
    private JTextArea jTextAreaInformation;
    
    //other variables
    private String date;			//Change it accordingly
    private int numberOfPhotos;		//number of profile photos
    private int position;			//position determiner 
    private boolean isStanding;		//picture show is standing or not
    private String developerInfo;
    
    //thread
    private Thread thread;			//main thread
	// End of Variable Declaration 																#_______D_______#

	/***##Constructor##***/
	public Profile() {
		date="17-Jan-2014";
    	isStanding=false;
    	position=0;
    	
		initialComponent();
		
		//*Thread*//
        thread = new Thread(this);
        thread.start();
	}
	
	public Profile(String date) {
    	this.date=date;
    	isStanding=false;
    	position=0;

    	initialComponent();
    	
    	//*Thread*//
        thread = new Thread(this);
        thread.start();
    }

	
	/**
	 * Method for Initializing all the GUI variables and placing them all to specific space on 
	 * the frame. It also specifies criteria of the main frame.
	 */
	private void initialComponent() {
		// GUI Initialization
		gui = new ProfileGui();
		gui.setVisible(true);
		
		//**
		// Assignation 																			#*******A*******#
		//**
    	jButtonPhoto = gui.jButtonPhoto;
        jLabelDate = gui.jLabelDate;
        jLabelPhoto = gui.jLabelPhoto;
        jTextAreaInformation = gui.jTextAreaInformation;
        
        numberOfPhotos = gui.numberOfPhotos;
        
        try {

        	developerInfo = FileIO.readWholeFile(getClass().getResourceAsStream("/res/txts/Developer.txt"));
