Esempio n. 1
0
        public void updateData()
        {
            if ((mData == null) || (mNode == null))
            {
                return;
            }

            // Move control data to data (CONTROL DATA -> DATA)
            //
            visualModelComponentPoint afterChanges = new visualModelComponentPoint();

            afterChanges.pointType = (visualModelComponentPoint.ComponentPointType)typeComboBox.SelectedIndex;
            afterChanges.pointData = (visualModelComponentPoint.ComponentPointData)dataComboBox.SelectedIndex;
            afterChanges.bone      = (string)toBoneComboBox.SelectedItem;

            // Add/Execute undo action
            UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges);

            mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction);
        }
Esempio n. 2
0
        public void bindData(visualModelComponentPoint point, TreeNode treeNode)
        {
            mIsBindingData = true;

            mData = point;
            mNode = treeNode;


            // Move data to control data (DATA -> CONTROL DATA)
            //
            refreshComboBoxItems();

            typeComboBox.SelectedIndex = (int)mData.pointType;
            dataComboBox.SelectedIndex = (int)mData.pointData;

            bool found = false;

            for (int i = 0; i < toBoneComboBox.Items.Count; i++)
            {
                if (String.Compare(mData.bone, (string)toBoneComboBox.Items[i], true) == 0)
                {
                    toBoneComboBox.SelectedIndex = i;
                    found = true;
                    break;
                }
            }

            if (!found)
            {
                toBoneComboBox.SelectedIndex = -1;
                toBoneComboBox.SelectedItem  = null;
                toBoneComboBox.Text          = null;
            }

            mIsBindingData = false;
        }