private void ButtonAddItem_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(TextboxName.Text) && !string.IsNullOrEmpty(TextboxFinalName.Text) && !string.IsNullOrEmpty(TextboxDirectory.Text)) { var project = new Project() { Directory = TextboxDirectory.Text, FinalName = TextboxFinalName.Text, Name = TextboxName.Text, GUID = Guid.NewGuid().ToString(), GUIDTwo = Guid.NewGuid().ToString(), FolderName = TextboxFolderName.Text }; SettingsManager.AddProject(projectTypeString, project); DialogResult = DialogResult.OK; Close(); } }