using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; namespace DirectoryMakerApp { public partial class DirMakerForm : Form { public string ProjectName; public string ProjectNumber; public string ProjectClient; protected Dictionary ProjectInfo = new Dictionary { { "PROJNAME", ""}, { "PROJNO", ""}, { "CLIENT", ""}, }; protected Dictionary PLDict = new Dictionary { { "00", ""}, { "10", ""}, { "20", ""}, { "30", ""}, { "40", ""}, { "50", ""}, }; protected Dictionary SectionsDict = new Dictionary { { "00", true}, { "10", true}, { "20", true}, { "30", true}, { "40", true}, { "50", true}, }; // ------------------------------------------------------------------------------------------------------------------------------------------------------ public DirMakerForm() { InitializeComponent(); } // ------------------------------------------------------------------------------------------------------------------------------------------------------ private void ButtonCreate_Click( object sender, EventArgs e) { ProjectInfo["PROJNO"] = textBoxProjektNummer.Text; ProjectInfo["PROJNAME"] = textBoxProjektName.Text; ProjectInfo["CLIENT"] = textBoxClient.Text; PLDict["00"] = textBoxPL00.Text; PLDict["10"] = textBoxPL10.Text; PLDict["20"] = textBoxPL20.Text; PLDict["30"] = textBoxPL30.Text; PLDict["40"] = textBoxPL40.Text; PLDict["50"] = textBoxPL50.Text; labelOutput.Text = ProjectNumber + "-" + ProjectName; DoChecked(); var directoryMaker = new DirectoryMaker(); directoryMaker.MakeDirectoryStructure( ProjectInfo, SectionsDict, PLDict, UpdateLogText); } // ------------------------------------------------------------------------------------------------------------------------------------------------------ private void DoChecked() { SectionsDict["00"] = checkBox00.Checked; SectionsDict["10"] = checkBox10.Checked; SectionsDict["20"] = checkBox20.Checked; SectionsDict["30"] = checkBox30.Checked; SectionsDict["40"] = checkBox40.Checked; SectionsDict["50"] = checkBox50.Checked; } // ------------------------------------------------------------------------------------------------------------------------------------------------------ private void UpdateLogText(string inMsg) { label1.Text = inMsg; } // ------------------------------------------------------------------------------------------------------------------------------------------------------ private void DirMakerForm_Load(object sender, EventArgs e) { } // ------------------------------------------------------------------------------------------------------------------------------------------------------ private void label2_Click(object sender, EventArgs e) { } } }