private void ButtonAccept_Click(object sender, EventArgs e)
        {
            bool   everythingAlright = true;
            string name          = textBoxName.Text;
            string culture       = textBoxCulture.Text;
            int    cultureWorth  = 0;
            string selectionMode = ArtifactTemplate.SELECTIONMODE_INORDER;

            #region Fehlerbehandlung
            try
            {
                cultureWorth = Convert.ToInt32(textBoxCultureWorth.Text);
            }
            catch (Exception exception)
            {
                MessageBox.Show("Kulturwert muss eine Zahl sein. \n" + exception.Message);
                everythingAlright = false;
            }

            if (richTextBoxBaseDescription.Text == "")
            {
                MessageBox.Show("Beschreibung darf nicht leer sein.");
                everythingAlright = false;
            }

            if (name == "")
            {
                MessageBox.Show("Name darf nicht leer sein.");
                everythingAlright = false;
            }
            else if (ArtifactTemplate.GetArtifactTemplates().Contains(name))
            {
                MessageBox.Show("Name muss einzigartig sein.");
                everythingAlright = false;
            }

            if (culture == "")
            {
                MessageBox.Show("Kultur darf nicht leer sein.");
                everythingAlright = false;
            }

            if (cultureWorth < 0)
            {
                MessageBox.Show("Kulturwert darf nicht kleiner null sein.");
                everythingAlright = false;
            }

            if (comboBoxStageSelection.SelectedItem != null)
            {
                selectionMode = comboBoxStageSelection.SelectedItem.ToString();
            }
            #endregion

            #region Erstellung des Artefakts
            if (everythingAlright)
            {
                Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + GlobalConfiguration.Documents + "//Artifacts//" + name);

                List <string> RTFs = new List <string>();
                List <int>    Work = new List <int>();

                foreach (string stage in listBoxStages.Items)
                {
                    RTFs.Add(GlobalConfiguration.Documents + "//Artifacts//" + name + "//" + stage + ".rtf");
                    Work.Add(WorkPerStage[stage]);
                    File.Move(tmprtf + stage + ".rtf", AppDomain.CurrentDomain.BaseDirectory + GlobalConfiguration.Documents + "//Artifacts//" + name + "//" + stage + ".rtf");
                }
                ArtifactTemplate artifact = new ArtifactTemplate()
                {
                    Name = name,
                    BaseDescriptionRTF = GlobalConfiguration.Documents + "//Artifacts//" + name + ".rtf",
                    RTF                    = RTFs,
                    Tags                   = listBoxTags.Items.Cast <string>().ToList(),
                    StageNames             = listBoxStages.Items.Cast <string>().ToList(),
                    WorkNeededForNextStage = Work,
                    Culture                = culture,
                    CultureWorth           = cultureWorth
                };
                ArtifactTemplate.SaveArtifactTemplate(artifact);
                Close();
            }
            #endregion
        }
 private void UpdateArtifactTab()
 {
     listBoxArtifacts.ClearSelected();
     listBoxArtifacts.Items.Clear();
     listBoxArtifacts.Items.AddRange(ArtifactTemplate.GetArtifactTemplates().ToArray());
 }