Пример #1
0
 public Directory(string trait)
 {
     SetTrait(trait);
     if (ConfigXml.GetField(trait + "Directory") != "")
     {
         SetPath(ConfigXml.GetField(trait + "Directory"));
     }
 }
Пример #2
0
        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
            };
        }
Пример #3
0
 public void SetPath(string path)
 {
     this.path = path;
     ConfigXml.SaveToFieldInFile(GetTrait() + "Directory", this.path);
     OnPathSet?.Invoke(this, new DirectoryPathSetEventArgs(GetTrait(), this.path));
 }