public SymbolGroupViewModel(SymbolViewModelWrapper rootSymbol)
        {
            var rootSymbol1 = new SymbolTreeViewModel(rootSymbol);

            _firstGeneration = new ReadOnlyCollection<SymbolTreeViewModel>(
                new[]
                {
                    rootSymbol1
                });
        }
        public SymbolGroupViewModel(SymbolViewModelWrapper rootSymbol)
        {
            var rootSymbol1 = new SymbolTreeViewModel(rootSymbol);

            _firstGeneration = new ReadOnlyCollection <SymbolTreeViewModel>(
                new[]
            {
                rootSymbol1
            });
        }
        public static SymbolViewModelWrapper LoadSymbolWrapper()
        {
            // Create a new MilitarySymbolDictionary instance
            MilitarySymbolDictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525c);

            var swRoot = new SymbolViewModelWrapper();
            swRoot = swRoot.Load(@".\data\oob\oobexample.xml");

            return swRoot;
        }
        public static SymbolViewModelWrapper LoadSymbolWrapper()
        {
            // Create a new MilitarySymbolDictionary instance
            MilitarySymbolDictionary = new SymbolDictionary(SymbolDictionaryType.Mil2525c);

            var swRoot = new SymbolViewModelWrapper();

            swRoot = swRoot.Load(@".\data\oob\oobexample.xml");

            return(swRoot);
        }
        private void InitializeWrapper(SymbolViewModelWrapper temp)
        {
            if (temp.Children == null || temp.Children.Count <= 0)
            {
                return;
            }

            foreach (var w in temp.Children)
            {
                InitializeWrapper(w);

                w.SVM = SymbolLoader.Search(w.SIC);
            }

            temp.SVM = SymbolLoader.Search(temp.SIC);
        }
        private SymbolTreeViewModel(SymbolViewModelWrapper symbolWrapper, SymbolTreeViewModel parent)
        {
            if (String.IsNullOrWhiteSpace(symbolWrapper.Id))
            {
                _guid = Guid.NewGuid().ToString("D");
            }
            else
            {
                _guid = symbolWrapper.Id;
            }
            _symbolWrapper = symbolWrapper;
            _parent        = parent;

            _children = new ReadOnlyCollection <SymbolTreeViewModel>(
                (from child in _symbolWrapper.Children
                 select new SymbolTreeViewModel(child, this))
                .ToList <SymbolTreeViewModel>());
        }
 public SymbolTreeViewModel(SymbolViewModelWrapper symbolWrapper)
     : this(symbolWrapper, null)
 {
 }
        private void InitializeWrapper(SymbolViewModelWrapper temp)
        {
            if (temp.Children == null || temp.Children.Count <= 0)
            {
                return;
            }

            foreach (var w in temp.Children)
            {
                InitializeWrapper(w);

                w.SVM = SymbolLoader.Search(w.SIC);
            }

            temp.SVM = SymbolLoader.Search(temp.SIC);
        }
        private SymbolTreeViewModel(SymbolViewModelWrapper symbolWrapper, SymbolTreeViewModel parent)
        {
            if (String.IsNullOrWhiteSpace(symbolWrapper.Id))
            {
                _guid = Guid.NewGuid().ToString("D");
            }
            else
            {
                _guid = symbolWrapper.Id;
            }
            _symbolWrapper = symbolWrapper;
            _parent = parent;

            _children = new ReadOnlyCollection<SymbolTreeViewModel>(
                (from child in _symbolWrapper.Children
                 select new SymbolTreeViewModel(child, this))
                 .ToList<SymbolTreeViewModel>());
        }
 public SymbolTreeViewModel(SymbolViewModelWrapper symbolWrapper)
     : this(symbolWrapper, null)
 {
 }