private void addAboveButton_Click(object sender, RoutedEventArgs e)
        {
            CommandTemplateWindow cmdTemplateWindow = new CommandTemplateWindow();

            cmdTemplateWindow.ShowDialog();

            if (!cmdTemplateWindow.changed)
            {
                return;
            }

            robotProgram.AddCommand(commandListView.SelectedIndex, cmdTemplateWindow.commandTemplateType);

            RefreshCommandDisplay();
        }
        private void fileListView_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (robotProgram.changed)
            {
                saveButton_Click(sender, e);
            }

            string fileName = fileListView.Items.GetItemAt(fileListView.SelectedIndex).ToString();

            robotProgram = new RobotProgram();

            robotProgram.LoadProgram(@"...\\Robot Programs\\" + fileName, fileName);

            if (robotProgram.commands == null || robotProgram.commands.Count == 0)
            {
                robotProgram.AddCommand(0, CommandType.Home);
            }

            fileLoaded = true;
            RefreshCommandDisplay();
        }