public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualLogic afterChanges = new visualLogic(); afterChanges.selectedItem = comboBox1.SelectedIndex; // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void bindData(visualLogic logicData, TreeNode treeNode) { mIsBindingData = true; mData = logicData; mNode = treeNode; // Disable all controls if not variation logic type // if (mData.type != visualLogic.LogicType.Variation) { labelComment.Visible = false; label1.Visible = false; comboBox1.Visible = false; } else { labelComment.Visible = true; label1.Visible = true; comboBox1.Visible = true; } // Move data to control data (DATA -> CONTROL DATA) // refreshComboBoxItems(); if (comboBox1.Items.Count > mData.selectedItem) { comboBox1.SelectedIndex = mData.selectedItem; } else { comboBox1.SelectedIndex = -1; comboBox1.SelectedItem = null; comboBox1.Text = null; } mIsBindingData = false; }