Exemplo n.º 1
0
        //角色文件夹列表部分==================================================================================================
        //(角色文件夹列表)加入新单元
        public void addActorFolderElement()
        {
            String name = "文件夹" + actorsManager.Count();
            SmallDialog_WordEdit txtDialog = new SmallDialog_WordEdit("新建文件夹", name);

            txtDialog.ShowDialog();
            name = txtDialog.getValue();
            form_MA.historyManager.ReadyHistory(HistoryType.Actor);
            MActorFolder element = new MActorFolder(actorsManager);

            element.name = name;
            actorsManager.Add(element);
            updateTreeView_Animation();
            setCurrentActorFolder(element.GetID(), true, 0);
            form_MA.historyManager.AddHistory(HistoryType.Actor);
        }
Exemplo n.º 2
0
        //(动作列表)复制单元
        public void cloneActionElement()
        {
            if (currentActorFolder == null || currentActorElement == null || currentActionElement == null)
            {
                return;
            }
            form_MA.historyManager.ReadyHistory(HistoryType.Actor);
            MAction action = (MAction)currentActionElement.Clone();
            String  name   = action.name;
            SmallDialog_WordEdit txtDialog = new SmallDialog_WordEdit("复制单元", name);

            txtDialog.ShowDialog();
            name        = txtDialog.getValue();
            action.name = name;
            currentActorElement.Add(action);
            updateTreeNode_Actor();
            setCurrentAction(currentActorElement.Count() - 1);
            form_MA.historyManager.AddHistory(HistoryType.Actor);
        }
Exemplo n.º 3
0
        //角色列表部分==================================================================================================
        //(角色列表)加入新单元
        public void addActorElement()
        {
            if (currentActorFolder == null)
            {
                return;
            }
            String name = "角色" + currentActorFolder.Count();
            SmallDialog_WordEdit txtDialog = new SmallDialog_WordEdit("新建角色", name);

            txtDialog.ShowDialog();
            name = txtDialog.getValue();
            form_MA.historyManager.ReadyHistory(HistoryType.Actor);
            MActor element = new MActor(currentActorFolder);

            element.name = name;
            currentActorFolder.Add(element);
            updateTreeNode_ActorFolder();
            setCurrentActor(currentActorFolder.GetSonID(element), true, 1);
            form_MA.historyManager.AddHistory(HistoryType.Actor);
        }
Exemplo n.º 4
0
        //(文件夹列表)重命名单元
        public void renameActorFolder()
        {
            if (currentActorFolder == null)
            {
                return;
            }
            String name = currentActorFolder.name;
            SmallDialog_WordEdit txtDialog = new SmallDialog_WordEdit("重命名", name);

            txtDialog.ShowDialog();
            String nameNew = txtDialog.getValue();

            if (!nameNew.Equals(name))
            {
                form_MA.historyManager.ReadyHistory(HistoryType.Actor);
                currentActorFolder.name = nameNew;
                treeView_Animation.Nodes[currentActorFolder.GetID()].Text = nameNew;
                form_MA.historyManager.AddHistory(HistoryType.Actor);
            }
        }
Exemplo n.º 5
0
        //(动作列表)重命名单元
        public void renameActionElement()
        {
            if (currentActorFolder == null || currentActorElement == null || currentActionElement == null)
            {
                return;
            }
            MAction action = currentActionElement;
            String  name   = action.name;
            SmallDialog_WordEdit txtDialog = new SmallDialog_WordEdit("重命名", name);

            txtDialog.ShowDialog();
            String newName = txtDialog.getValue();

            if (!name.Equals(newName))
            {
                form_MA.historyManager.ReadyHistory(HistoryType.Actor);
                action.name = newName;
                treeView_Animation.Nodes[currentActorFolder.GetID()].Nodes[currentActorFolder.GetSonID(currentActorElement)].Nodes[currentActionElement.GetID()].Text = newName;
                form_MA.historyManager.AddHistory(HistoryType.Actor);
            }
        }
Exemplo n.º 6
0
        //动作列表部分=====================================================================================================
        //(动作列表)加入新单元
        public void addActionElement()
        {
            if (currentActorFolder == null || currentActorElement == null)
            {
                return;
            }
            String name = "动作" + currentActorElement.Count();
            SmallDialog_WordEdit txtDialog = new SmallDialog_WordEdit("新建动作", name);

            txtDialog.ShowDialog();
            name = txtDialog.getValue();
            form_MA.historyManager.ReadyHistory(HistoryType.Actor);
            MAction element = new MAction(currentActorElement);

            element.name = name;
            currentActorElement.Add(element);
            currentActionElement = element;
            updateTreeNode_Actor();
            TreeNode actionTreeNode = treeView_Animation.Nodes[currentActorFolder.GetID()].Nodes[currentActorElement.GetID()].Nodes[currentActionElement.GetID()];

            treeView_Animation.SelectedNode = actionTreeNode;
            form_MA.historyManager.AddHistory(HistoryType.Actor);
        }