예제 #1
0
        //(角色列表)重命名单元
        public void renameActorElement()
        {
            if (currentActorElement == null || currentActorFolder == null)
            {
                return;
            }
            MActor actor = currentActorElement;
            String name  = actor.name;
            SmallDialog_WordEdit txtDialog = new SmallDialog_WordEdit("重命名", name);

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

            if (!nameNew.Equals(name))
            {
                form_MA.historyManager.ReadyHistory(HistoryType.Actor);
                actor.name = nameNew;
                treeView_Animation.Nodes[currentActorFolder.GetID()].Nodes[currentActorElement.GetID()].Text = nameNew;
                form_MA.historyManager.AddHistory(HistoryType.Actor);
            }
        }
예제 #2
0
        //(角色列表)向上移动单元
        public void moveUpActorElement()
        {
            if (currentActorElement == null || currentActorFolder == null)
            {
                return;
            }
            form_MA.historyManager.ReadyHistory(HistoryType.Actor);
            MActor       actor       = currentActorElement;
            MActorFolder actorFolder = currentActorFolder;
            int          index       = actor.GetID();

            if (!actorFolder.MoveUpElement(index))
            {
                return;
            }
            updateTreeNode_ActorFolder();
            index--;
            if (index < 0)
            {
                index = 0;
            }
            setCurrentActor(index, true, 1);
            form_MA.historyManager.AddHistory(HistoryType.Actor);
        }