Ejemplo n.º 1
0
        public void GetShipperLines()
        {
            string error     = "";
            int    shipperID = Convert.ToInt32(shippingForm.cbxShippers.SelectedValue);

            var shipperLines = shipping.GetShipperLines(shipperID, out error);

            if (error != "")
            {
                alert.ShowError(alertLevel.High, error, "GetShipperLines() Error");
                return;
            }
            if (shipperLines == null)
            {
                alert.ShowError(alertLevel.High, "There are no active Shipper Lines.", "GetShipperLines() Error");
                return;
            }

            // Customize datagrid columns
            CustomDataGridColumnStyles(shipperLines);

            // Bind datagrid
            shippingForm.gridLines.DataSource = shipperLines;

            ScreenState = screenStates.shipperSelected;
        }
Ejemplo n.º 2
0
	void OnGUI (){
		if (currentScreen == screenStates.EnterName){
			//enter data screen
			GUI.Label (new Rect((Screen.width/2)-80, Screen.height/2, 200, 30), "Please Insert your name...");
			playerName = GUI.TextField (new Rect((Screen.width/2)-80, (Screen.height/2)+45, 120, 30), playerName);
			if (GUI.Button (new Rect((Screen.width/2)-80, (Screen.height/2)+90, 120, 30), " Save")){
				if (playerName != null && playerName != ""){
					PlayerPrefs.SetInt("playersNames", PlayerPrefs.GetInt("playersNames")+1);
					PlayerPrefs.SetString (("playerID"+ PlayerPrefs.GetInt("playersNames")), playerName);
					PlayerPrefs.SetInt (("playerScore"+ PlayerPrefs.GetInt("playersNames")), playerScore);
					//add to the list and then switch the UI view to it
					allResults += ("\n"+PlayerPrefs.GetString(("playerID"+ PlayerPrefs.GetInt("playersNames").ToString()).ToString()) + " ---------->> " + PlayerPrefs.GetInt(("playerScore"+ PlayerPrefs.GetInt("playersNames").ToString()).ToString()).ToString());
					currentScreen = screenStates.Results;
				}
			}
			if (GUI.Button (new Rect((Screen.width/2)-80, (Screen.height/2)+180, 120, 30), " Restart")){
				Application.LoadLevel("gameScene");
			}
		}else{
			GUILayout.Label (allResults);
			GUILayout.Space(30);
			if (GUILayout.Button("Clear Saved List")){
				//just in case the used want to reset the saved data
				PlayerPrefs.DeleteAll();
			}
			if (GUILayout.Button("Restart")){
				Application.LoadLevel("gameScene");
			}
		}
	}
Ejemplo n.º 3
0
	// Use this for initialization
	void Start () {
		currentScreen = screenStates.EnterName;
		allResults = "";

		playerScore = PlayerPrefs.GetInt("Score");

		// get all the saved keys
		for (int c=1; c<=PlayerPrefs.GetInt("playersNames"); c++){
			allResults += ("\n"+PlayerPrefs.GetString(("playerID"+ c).ToString()) + " ---------->> " + PlayerPrefs.GetInt(("playerScore"+ c).ToString()).ToString());
		}
		//show them to console
		Debug.Log(allResults);
	}
Ejemplo n.º 4
0
    // Use this for initialization
    void Start()
    {
        currentScreen = screenStates.EnterName;
        allResults    = "";

        playerScore = PlayerPrefs.GetInt("Score");

        // get all the saved keys
        for (int c = 1; c <= PlayerPrefs.GetInt("playersNames"); c++)
        {
            allResults += ("\n" + PlayerPrefs.GetString(("playerID" + c).ToString()) + " ---------->> " + PlayerPrefs.GetInt(("playerScore" + c).ToString()).ToString());
        }
        //show them to console
        Debug.Log(allResults);
    }
Ejemplo n.º 5
0
        void logOnOffControl1_LogOnOffChanged(bool state)
        {
            if (state) // A user successfully logged on
            {
                FXRFGlobals.MyRFGun.StartRead();

                // Enable controls
                ScreenState = screenStates.loggedIn;
            }
            else // A user logged off
            {
                FXRFGlobals.MyRFGun.StopRead();

                // Disable and clear controls until a user logs on again
                ScreenState = screenStates.pendingLogin;
            }
        }
Ejemplo n.º 6
0
        public Controller()
        {
            // Instantiate declared class objects
            shippingForm      = new formShipping(this);
            location          = new DataLayer.DataAccess.Location();
            shipping          = new DataLayer.DataAccess.Shipping();
            alert             = new ErrorAlert();
            messageController = new MessageController(shippingForm.messageBoxControl1.ucMessageBox, Resources.loginInstructions);
            ScreenState       = screenStates.pendingLogin;

            // Wire control events
            shippingForm.logOnOffControl1.LogOnOffChanged     += new LogOnOffControl.LogOnOffChangedEventHandler(logOnOffControl1_LogOnOffChanged);
            shippingForm.logOnOffControl1.OperatorCodeChanged += new LogOnOffControl.OperatorCodeChangedEventHandler(logOnOffControl1_OperatorCodeChanged);
            shippingForm.messageBoxControl1.MessageBoxControl_ShowPrevMessage += new EventHandler <EventArgs>(messageBoxControl1_MessageBoxControl_ShowPrevMessage);
            shippingForm.messageBoxControl1.MessageBoxControl_ShowNextMessage += new EventHandler <EventArgs>(messageBoxControl1_MessageBoxControl_ShowNextMessage);

            Application.Run(shippingForm);
        }
Ejemplo n.º 7
0
 void OnGUI()
 {
     if (currentScreen == screenStates.EnterName)
     {
         //enter data screen
         GUI.Label(new Rect((Screen.width / 2) - 80, Screen.height / 2, 200, 30), "Please Insert your name...");
         playerName = GUI.TextField(new Rect((Screen.width / 2) - 80, (Screen.height / 2) + 45, 120, 30), playerName);
         if (GUI.Button(new Rect((Screen.width / 2) - 80, (Screen.height / 2) + 90, 120, 30), " Save"))
         {
             if (playerName != null && playerName != "")
             {
                 PlayerPrefs.SetInt("playersNames", PlayerPrefs.GetInt("playersNames") + 1);
                 PlayerPrefs.SetString(("playerID" + PlayerPrefs.GetInt("playersNames")), playerName);
                 PlayerPrefs.SetInt(("playerScore" + PlayerPrefs.GetInt("playersNames")), playerScore);
                 //add to the list and then switch the UI view to it
                 allResults   += ("\n" + PlayerPrefs.GetString(("playerID" + PlayerPrefs.GetInt("playersNames").ToString()).ToString()) + " ---------->> " + PlayerPrefs.GetInt(("playerScore" + PlayerPrefs.GetInt("playersNames").ToString()).ToString()).ToString());
                 currentScreen = screenStates.Results;
             }
         }
         if (GUI.Button(new Rect((Screen.width / 2) - 80, (Screen.height / 2) + 180, 120, 30), " Restart"))
         {
             Application.LoadLevel("gameScene");
         }
     }
     else
     {
         GUILayout.Label(allResults);
         GUILayout.Space(30);
         if (GUILayout.Button("Clear Saved List"))
         {
             //just in case the used want to reset the saved data
             PlayerPrefs.DeleteAll();
         }
         if (GUILayout.Button("Restart"))
         {
             Application.LoadLevel("gameScene");
         }
     }
 }
Ejemplo n.º 8
0
        public Controller()
        {
            // Instantiate declared class objects
            cycleCountForm    = new formCycleCount(this);
            location          = new DataLayer.DataAccess.Location();
            cycle             = new DataLayer.DataAccess.CycleCount();
            alert             = new ErrorAlert();
            messageController = new MessageController(cycleCountForm.messageBoxControl1.ucMessageBox, Resources.loginInstructions);
            ScreenState       = screenStates.pendingLogin;

            // Wire control events
            cycleCountForm.logOnOffControl1.LogOnOffChanged     += new LogOnOffControl.LogOnOffChangedEventHandler(logOnOffControl1_LogOnOffChanged);
            cycleCountForm.logOnOffControl1.OperatorCodeChanged += new LogOnOffControl.OperatorCodeChangedEventHandler(logOnOffControl1_OperatorCodeChanged);
            cycleCountForm.messageBoxControl1.MessageBoxControl_ShowPrevMessage += new EventHandler <EventArgs>(messageBoxControl1_MessageBoxControl_ShowPrevMessage);
            cycleCountForm.messageBoxControl1.MessageBoxControl_ShowNextMessage += new EventHandler <EventArgs>(messageBoxControl1_MessageBoxControl_ShowNextMessage);

            // Hide form fields
            cycleCountForm.ckbxFlagBox.Visible =
                cycleCountForm.tbxNote.Visible = cycleCountForm.lblNote.Visible = false;


            Application.Run(cycleCountForm);
        }
Ejemplo n.º 9
0
 public void RefreshScreen()
 {
     ScreenState = screenStates.refreshScreen;
 }