//event triggered when button pressed
        private void editMachine_Click(object sender, RoutedEventArgs e)
        {
            //the value from machineList.SelectedIndex is stored into variable machineIdx from the Machines page
            Machines.MachineIdx = machineList.SelectedIndex;

            AddMachine editMachine = new AddMachine();

            if (editMachine.ShowDialog() != true)
            {
                updateMachineList();
            }
        }
        private void addMachine_Click(object sender, RoutedEventArgs e)
        {
            //adds a value to variable
            Machines.MachineIdx = -1;
            //creates new instance of page AddMachine
            AddMachine addMachine = new AddMachine();

            if (addMachine.ShowDialog() != true)
            {
                updateMachineList();
            }
        }