private void Add_SeismicLoad_Click(object sender, RoutedEventArgs e)
        {
            if (MainWindow.seismicLoad.Count == 0)
            {
                try
                {
                    int    skipX, skipY, skipZ;
                    double scaleX, scaleY, scaleZ, deltaT;

                    skipX = int.Parse(txt_XDir_LineSkip.Text);
                    skipY = int.Parse(txt_YDir_LineSkip.Text);
                    skipZ = int.Parse(txt_ZDir_LineSkip.Text);

                    scaleX = double.Parse(txt_XDir_Scale.Text);
                    scaleY = double.Parse(txt_YDir_Scale.Text);
                    scaleZ = double.Parse(txt_ZDir_Scale.Text);
                    deltaT = double.Parse(txt_DeltaT.Text);

                    SeismicLoad sLoad = SeismicLoad.CreateSeismicLoadFromFiles(deltaT, stringXFile, stringYFile, stringZFile, skipX, skipY, skipZ, scaleX, scaleY, scaleZ);
                    MainWindow.seismicLoad.Add(sLoad);
                    UpdateListBox(sLoad);

                    Load.DeleteAllLoadsWithFlag(ref MainWindow.loadList, "increment");
                    for (int i = 0; i < MainWindow.nodeList.Count; i++)
                    {
                        Load l = new Load(MainWindow.loadList.Count + 1, MainWindow.nodeList[i].ID, "seismic");
                        if (xDir)
                        {
                            l.SetFx(1);
                        }
                        if (yDir)
                        {
                            l.SetFy(2);
                        }
                        if (zDir)
                        {
                            l.SetFz(3);
                        }
                        MainWindow.loadList.Add(l);
                    }
                }
                catch
                {
                    MessageBox.Show("An error has occurred and the seismic load could not be defined. Please check your inputs and try again.", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }
            else
            {
                MessageBox.Show("Only one seismic load can be defined per analysis. Please delete the current seismic load in order to define a new one.", "Attention", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
 private void Delete_SeismicLoad_Click(object sender, RoutedEventArgs e)
 {
     MainWindow.seismicLoad.Clear();
     loads_ListBox.Items.Clear();
     Load.DeleteAllLoadsWithFlag(ref MainWindow.loadList, "seismic");
 }