Esempio n. 1
0
        // 创建初始知识
        public void CreateInitialKnowledgeVM()
        {
            InitialKnowledge_VM initialKnowledgeVM = new InitialKnowledge_VM();

            NetworkItemVMs.Add(initialKnowledgeVM);
            ResourceManager.mainWindowVM.Tips = "创建了新的InitialKnowledge:" + initialKnowledgeVM.InitialKnowledge.Name;
        }
Esempio n. 2
0
        // 创建信息安全性质
        public void CreateSecurityPropertyVM()
        {
            SecurityProperty_VM securityPropertyVM = new SecurityProperty_VM();

            NetworkItemVMs.Add(securityPropertyVM);
            ResourceManager.mainWindowVM.Tips = "创建了新的SecurityProperty:" + securityPropertyVM.SecurityProperty.Name;
        }
Esempio n. 3
0
        // 创建公理
        public void CreateAxiomVM()
        {
            Axiom_VM axiomVM = new Axiom_VM();

            NetworkItemVMs.Add(axiomVM);
            ResourceManager.mainWindowVM.Tips = "创建了新的公理:" + axiomVM.Axiom.Name;
        }
Esempio n. 4
0
        // 创建自定义类型
        public void CreateUserTypeVM()
        {
            UserType_VM userTypeVM = new UserType_VM();

            NetworkItemVMs.Add(userTypeVM);
            ResourceManager.mainWindowVM.Tips = "创建了新的自定义类型:" + userTypeVM.Type.Name;
        }
Esempio n. 5
0
 // 这里改成给外部主动调用
 public void init_data()
 {
     NetworkItemVMs.Add(
         new UserType_VM(Type.TYPE_INT)
     {
         X = 1000,
         Y = 20
     });
     NetworkItemVMs.Add(
         new UserType_VM(Type.TYPE_BOOL)
     {
         X = 990,
         Y = 50
     });
     NetworkItemVMs.Add(
         new UserType_VM(Type.TYPE_NUM)
     {
         X = 980,
         Y = 80
     });
     // 这里额外添加一个Timer类,但它不是内置类型
     NetworkItemVMs.Add(
         new UserType_VM(Type.TYPE_TIMER)
     {
         X = 970,
         Y = 110
     });
 }
Esempio n. 6
0
        // 创建通信信道
        public void CreateCommChannelVM()
        {
            CommChannel_VM commChannelVM = new CommChannel_VM();

            NetworkItemVMs.Add(commChannelVM);
            ResourceManager.mainWindowVM.Tips = "创建了新的CommChannel:" + commChannelVM.CommChannel.Name;
        }
Esempio n. 7
0
        // 创建进程模板
        public void CreateProcessVM()
        {
            Process_VM processVM = new Process_VM();

            // 创建相应的状态机,并集成到当前Process_VM里
            processVM.StateMachine_P_VM = ResourceManager.mainWindowVM.AddStateMachine(processVM.Process);

            NetworkItemVMs.Add(processVM);
            ResourceManager.mainWindowVM.Tips = "创建了新的进程模板:" + processVM.Process.Name;
        }