예제 #1
0
        /// <summary>
        /// Add a condition
        /// </summary>
        /// <param name="sender">Sender</param>
        /// <param name="e">Event Args</param>
        private void addConditionButton_Click(object sender, EventArgs e)
        {
            //Show editor dialog then update condition list
            Condition_Editor editor = new Condition_Editor();

            editor.ShowDialog();
            updateConditionList();
        }
예제 #2
0
        /// <summary>
        /// Edit button click
        /// </summary>
        private void editButton_Click(object sender, EventArgs e)
        {
            TreeNode node = conditionEditorTreeView.SelectedNode;

            //Check if node is valid
            if (node != null && node.Tag != null && node.Tag.ToString() != "")
            {
                //Open editor, update list once closed
                Condition_Editor editor = new Condition_Editor(Convert.ToInt32(conditionEditorTreeView.SelectedNode.Tag));
                editor.ShowDialog();
                updateConditionList();
            }
        }