Пример #1
0
        public MainPathSetDto SetMainPath(string inPath, BackgroundWorker inSender = null)
        {
            MainPathSetDto ret = new MainPathSetDto();

            ret.FileTree  = initTree(inPath, inSender);
            ret.SpawnPath = inPath;
            AliasInformationDto tmpEventualAliasI =
                checkForAliasesInSpawnDir(inPath);

            ret.AliasEncodingFound = tmpEventualAliasI.Initialized;
            if (tmpEventualAliasI.Initialized)
            {
                ret.EventualAliasDir      = tmpEventualAliasI.AliasesDirAndFile;
                ret.EventualAliasEncoding = tmpEventualAliasI.AliasesList;
            }
            ret.Initialized = true;
            return(ret);
        }
        private void loadingTreeSetMainPath_DoWork(
            object sender, DoWorkEventArgs e)
        {
            StatusSettingSpawn = "Loading";
            MainPathSetDto mainPathSetInformation = _markingsManagerInstance.SetMainPath((string)e.Argument, _loadTreeWorker);

            if (mainPathSetInformation.Initialized)
            {
                StatusSettingSpawn = "Loading Done";
                if (mainPathSetInformation.AliasEncodingFound)
                {
                    AliasEncodingFileName = mainPathSetInformation.EventualAliasDir;
                    _aliasEncoding        = mainPathSetInformation.EventualAliasEncoding;
                }
                Environment_TreeView_ItemsSource = mainPathSetInformation.FileTree;
                SpawnPath = mainPathSetInformation.SpawnPath;
            }
            else
            {
                StatusSettingSpawn = "Loading Failed";
            }
        }