Beispiel #1
0
        public BotTemplatesForm(BotTemplateList BotTplList)
        {
            InitializeComponent();

            FBotTplList = BotTplList;
            FBotTplList.OnUpdate += OnTemplateListUpdate;
        }
Beispiel #2
0
        public static bool Initialize()
        {
            FBotEngine = new BotStudio.BotEngine.BotEngine();

            ThreadPool.SetMinThreads(4, 4);
            ThreadPool.SetMaxThreads(8, 8);

            BotTplList = new BotTemplateList();
            BotList = new BotList();
            return true;
        }
Beispiel #3
0
        private void UpdateNode(TreeNode TreeRoot, BotTemplateList.Node node)
        {
            if(node == null)
                return;

            TreeNode TreeNode = new TreeNode();
            TreeNode.Text = Path.GetFileNameWithoutExtension(node.Value);
            TreeNode.Tag = node;

            if (node.Type == BotTemplateList.Node.NodeType.type_file)
            {
                TreeNode.ImageIndex = 0;
                TreeNode.SelectedImageIndex = 0;
            }
            else
            {
                TreeNode.ImageIndex = 1;
                TreeNode.SelectedImageIndex = 1;
            }

            if (TreeRoot == null)
            {
                TemplateTree.Nodes.Add(TreeNode);
            }
            else
            {
                TreeRoot.Nodes.Add(TreeNode);
            }

            foreach (BotTemplateList.Node child in node.Children)
            {
                UpdateNode(TreeNode, child);
            }
        }