public Directory(string trait) { SetTrait(trait); if (ConfigXml.GetField(trait + "Directory") != "") { SetPath(ConfigXml.GetField(trait + "Directory")); } }
public MainWindow() { InitializeComponent(); Directory.OnPathSet += Directory_PathSet; ConfigXml.LoadFromFile(); baseDir = new Directory("Base"); if (baseDir.GetName() != "") { targetFile = new TargetFile(baseDir.GetName()); if (targetFile.GetPath() != null) { UpdateTargetFilePathText(); } } this.folderBrowserDialog1 = new FolderBrowserDialog() { ShowNewFolderButton = true, RootFolder = Environment.SpecialFolder.MyComputer }; }
public void SetPath(string path) { this.path = path; ConfigXml.SaveToFieldInFile(GetTrait() + "Directory", this.path); OnPathSet?.Invoke(this, new DirectoryPathSetEventArgs(GetTrait(), this.path)); }