示例#1
0
 public ViewModelTechNode(
     string testTitle,
     int hierarchyLevel,
     ViewModelTechTreeControl viewModelTechTree,
     bool isUnlocked,
     bool canUnlock)
 {
     this.viewModelTechTree = viewModelTechTree;
     this.testTitle         = testTitle;
     this.HierarchyLevel    = hierarchyLevel;
     this.isUnlocked        = isUnlocked;
     this.canUnlock         = !isUnlocked && canUnlock;
 }
        public ViewModelTechNode(
            TechNode techNode,
            ViewModelTechTreeControl viewModelTechTree,
            BaseCommand commandOnNodeSelect)
        {
            this.viewModelTechTree   = viewModelTechTree;
            this.CommandOnNodeSelect = commandOnNodeSelect;
            this.TechNode            = techNode;

            this.HierarchyLevel = techNode.HierarchyLevel;
            ClientComponentTechnologiesWatcher.TechNodesChanged      += this.TechNodesOrLearningPointsChanged;
            ClientComponentTechnologiesWatcher.LearningPointsChanged += this.TechNodesOrLearningPointsChanged;

            this.RefreshIsUnlocked();
        }