예제 #1
0
        internal static void SaveRepositorys ( )
        {
            System. IO. DirectoryInfo myDirectory = appDirectory ( );

            foreach ( CommandRepository file in repositorys )
            {
                CommandRepository repository = new CommandRepository ( );
                repository. Save ( );
                repositorys. Add ( repository );
            }
        }
예제 #2
0
        internal static void LoadRepositorys ( )
        {
            System. IO. DirectoryInfo myDirectory = appDirectory ( );

            List<System. IO. FileInfo> xmlFiles = myDirectory. GetFiles ( "*.xml", System. IO. SearchOption. TopDirectoryOnly ). ToList ( );

            xmlFiles. Sort ( ( x, y ) => string. Compare ( x. Name, y. Name ) );

            repositorys = new ObservableCollection<CommandRepository> ( );

            foreach ( System. IO. FileInfo file in xmlFiles )
            {
                CommandRepository repository = new CommandRepository ( );
                repository. Load ( file. FullName );
                repositorys. Add ( repository );
            }



        }