Exemplo n.º 1
0
        /// <summary>
        ///     Configures the filtering dialog
        /// </summary>
        /// <param name="efsSystem"></param>
        /// <param name="filterConfiguration"></param>
        public void Configure(EFSSystem efsSystem, FilterConfiguration filterConfiguration)
        {
            ruleActivationCheckBox.Checked = filterConfiguration.RuleFired;
            expectationsCheckBox.Checked = filterConfiguration.Expect;
            variableUpdateCheckBox.Checked = filterConfiguration.VariableUpdate;

            List<Dictionary> dictionaries = new List<Dictionary>(efsSystem.Dictionaries);
            dictionaries.Sort(compare);
            foreach (Dictionary dictionary in dictionaries)
            {
                NamableTreeNode dictionaryTreeNode = new NamableTreeNode(dictionary);
                nameSpaceTreeView.Nodes.Add(dictionaryTreeNode);

                List<NameSpace> nameSpaces = new List<NameSpace>();
                foreach (NameSpace nameSpace in dictionary.NameSpaces)
                {
                    nameSpaces.Add(nameSpace);
                }
                nameSpaces.Sort();

                foreach (NameSpace nameSpace in nameSpaces)
                {
                    GatherNamespaces(dictionaryTreeNode, nameSpace, filterConfiguration);
                }
            }

            regExpTextBox.Text = filterConfiguration.RegExp;
        }
Exemplo n.º 2
0
        /// <summary>
        ///     Updates the namespace configuration according to the provided node, and enclosed nodes
        /// </summary>
        /// <param name="node"></param>
        /// <param name="filterConfiguration"></param>
        private void UpdateConfiguration(NamableTreeNode node, FilterConfiguration filterConfiguration)
        {
            NameSpace nameSpace = node.Namable as NameSpace;

            if (nameSpace != null)
            {
                if (node.Checked)
                {
                    filterConfiguration.NameSpaces.Add(nameSpace);
                }
            }

            Variable variable = node.Namable as Variable;

            if (variable != null)
            {
                if (node.Checked)
                {
                    filterConfiguration.Variables.Add(variable);
                }
            }

            foreach (NamableTreeNode subNode in node.Nodes)
            {
                UpdateConfiguration(subNode, filterConfiguration);
            }
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Configures the filtering dialog
        /// </summary>
        /// <param name="efsSystem"></param>
        /// <param name="filterConfiguration"></param>
        public void Configure(EfsSystem efsSystem, FilterConfiguration filterConfiguration)
        {
            ruleActivationCheckBox.Checked = filterConfiguration.RuleFired;
            expectationsCheckBox.Checked   = filterConfiguration.Expect;
            variableUpdateCheckBox.Checked = filterConfiguration.VariableUpdate;

            List <Dictionary> dictionaries = new List <Dictionary>(efsSystem.Dictionaries);

            dictionaries.Sort(Compare);
            foreach (Dictionary dictionary in dictionaries)
            {
                NamableTreeNode dictionaryTreeNode = new NamableTreeNode(dictionary);
                nameSpaceTreeView.Nodes.Add(dictionaryTreeNode);

                List <NameSpace> nameSpaces = new List <NameSpace>();
                foreach (NameSpace nameSpace in dictionary.NameSpaces)
                {
                    nameSpaces.Add(nameSpace);
                }
                nameSpaces.Sort();

                foreach (NameSpace nameSpace in nameSpaces)
                {
                    GatherNamespaces(dictionaryTreeNode, nameSpace, filterConfiguration);
                }
            }

            regExpTextBox.Text = filterConfiguration.RegExp;
        }
Exemplo n.º 4
0
        /// <summary>
        ///     Constructor
        /// </summary>
        public DynamicTimeLineControl()
        {
            ContextMenu = new ContextMenu();
            ContextMenu.MenuItems.Add(new MenuItem("Configure filter...", OpenFilter));
            DrawArea.DoubleClick += TimeLineControl_DoubleClick;

            FilterConfiguration = new FilterConfiguration();
        }
Exemplo n.º 5
0
        /// <summary>
        /// Constructor
        /// </summary>
        public TimeLineControl()
        {
            InitializeComponent();

            FilterConfiguration = new FilterConfiguration();
            ContextMenu         = new ContextMenu();
            ContextMenu.MenuItems.Add(new MenuItem("Configure filter...", new EventHandler(OpenFilter)));
        }
        /// <summary>
        ///     Constructor
        /// </summary>
        public DynamicTimeLineControl()
        {
            ContextMenu = new ContextMenu();
            ContextMenu.MenuItems.Add(new MenuItem("Configure filter...", OpenFilter));
            DoubleClick += TimeLineControl_DoubleClick;

            FilterConfiguration = new FilterConfiguration();
        }
Exemplo n.º 7
0
        /// <summary>
        /// Updates the configuration according to the user selected filters
        /// </summary>
        /// <param name="filterConfiguration"></param>
        public void UpdateConfiguration(FilterConfiguration filterConfiguration)
        {
            filterConfiguration.RuleFired      = ruleActivationCheckBox.Checked;
            filterConfiguration.Expect         = expectationsCheckBox.Checked;
            filterConfiguration.VariableUpdate = variableUpdateCheckBox.Checked;

            filterConfiguration.NameSpaces.Clear();
            foreach (NamableTreeNode node in nameSpaceTreeView.Nodes)
            {
                UpdateConfiguration(node, filterConfiguration);
            }

            filterConfiguration.RegExp = regExpTextBox.Text;
        }
Exemplo n.º 8
0
        /// <summary>
        /// Updates the configuration according to the user selected filters
        /// </summary>
        /// <param name="filterConfiguration"></param>
        public void UpdateConfiguration(FilterConfiguration filterConfiguration)
        {
            filterConfiguration.RuleFired = ruleActivationCheckBox.Checked;
            filterConfiguration.Expect = expectationsCheckBox.Checked;
            filterConfiguration.VariableUpdate = variableUpdateCheckBox.Checked;

            filterConfiguration.NameSpaces.Clear();
            foreach (NamableTreeNode node in nameSpaceTreeView.Nodes)
            {
                UpdateConfiguration(node, filterConfiguration);
            }

            filterConfiguration.RegExp = regExpTextBox.Text;
        }
Exemplo n.º 9
0
        /// <summary>
        /// Updates the namespace configuration according to the provided node, and enclosed nodes
        /// </summary>
        /// <param name="node"></param>
        /// <param name="filterConfiguration"></param>
        private void UpdateConfiguration(NamableTreeNode node, FilterConfiguration filterConfiguration)
        {
            DataDictionary.Types.NameSpace nameSpace = node.Namable as DataDictionary.Types.NameSpace;
            if (nameSpace != null)
            {
                if (node.Checked)
                {
                    filterConfiguration.NameSpaces.Add(nameSpace);
                }
            }

            foreach (NamableTreeNode subNode in node.Nodes)
            {
                UpdateConfiguration(subNode, filterConfiguration);
            }
        }
Exemplo n.º 10
0
        /// <summary>
        ///     Fills the tree view with the namespace and enclosed namespaces
        /// </summary>
        /// <param name="treeNode"></param>
        /// <param name="nameSpace"></param>
        /// <param name="filterConfiguration">The filter configuration used to set up the check boxes</param>
        private void GatherNamespaces(TreeNode treeNode, NameSpace nameSpace, FilterConfiguration filterConfiguration)
        {
            NamableTreeNode nameSpaceTreeNode = new NamableTreeNode(nameSpace)
            {
                Checked = filterConfiguration.NameSpaces.Contains(nameSpace)
            };

            nameSpaceTreeNode.Collapse();
            treeNode.Nodes.Add(nameSpaceTreeNode);

            // Adds the variables to the selection
            List <Variable> variables = new List <Variable>();

            foreach (Variable variable in nameSpace.Variables)
            {
                variables.Add(variable);
            }
            variables.Sort();

            foreach (Variable variable in variables)
            {
                NamableTreeNode variableTreeNode = new NamableTreeNode(variable)
                {
                    Checked = filterConfiguration.Variables.Contains(variable)
                };
                nameSpaceTreeNode.Nodes.Add(variableTreeNode);
            }

            // Adds the subnamespaces to the selection
            List <NameSpace> subNameSpaces = new List <NameSpace>();

            foreach (NameSpace otherNameSpace in nameSpace.NameSpaces)
            {
                subNameSpaces.Add(otherNameSpace);
            }
            subNameSpaces.Sort();

            foreach (NameSpace subNameSpace in subNameSpaces)
            {
                GatherNamespaces(nameSpaceTreeNode, subNameSpace, filterConfiguration);
            }
        }
Exemplo n.º 11
0
        /// <summary>
        ///     Updates the namespace configuration according to the provided node, and enclosed nodes
        /// </summary>
        /// <param name="node"></param>
        /// <param name="filterConfiguration"></param>
        private void UpdateConfiguration(NamableTreeNode node, FilterConfiguration filterConfiguration)
        {
            NameSpace nameSpace = node.Namable as NameSpace;
            if (nameSpace != null)
            {
                if (node.Checked)
                {
                    filterConfiguration.NameSpaces.Add(nameSpace);
                }
            }

            Variable variable = node.Namable as Variable;
            if (variable != null)
            {
                if (node.Checked)
                {
                    filterConfiguration.Variables.Add(variable);
                }
            }

            foreach (NamableTreeNode subNode in node.Nodes)
            {
                UpdateConfiguration(subNode, filterConfiguration);
            }
        }
Exemplo n.º 12
0
        /// <summary>
        ///     Fills the tree view with the namespace and enclosed namespaces
        /// </summary>
        /// <param name="treeNode"></param>
        /// <param name="nameSpace"></param>
        /// <param name="filterConfiguration">The filter configuration used to set up the check boxes</param>
        private void GatherNamespaces(TreeNode treeNode, NameSpace nameSpace, FilterConfiguration filterConfiguration)
        {
            NamableTreeNode nameSpaceTreeNode = new NamableTreeNode(nameSpace);
            nameSpaceTreeNode.Checked = filterConfiguration.NameSpaces.Contains(nameSpace);
            nameSpaceTreeNode.Collapse();
            treeNode.Nodes.Add(nameSpaceTreeNode);

            // Adds the variables to the selection
            List<Variable> variables = new List<Variable>();
            foreach (Variable variable in nameSpace.Variables)
            {
                variables.Add(variable);
            }
            variables.Sort();

            foreach (Variable variable in variables)
            {
                NamableTreeNode variableTreeNode = new NamableTreeNode(variable);
                variableTreeNode.Checked = filterConfiguration.Variables.Contains(variable);
                nameSpaceTreeNode.Nodes.Add(variableTreeNode);
            }

            // Adds the subnamespaces to the selection
            List<NameSpace> subNameSpaces = new List<NameSpace>();
            foreach (NameSpace otherNameSpace in nameSpace.NameSpaces)
            {
                subNameSpaces.Add(otherNameSpace);
            }
            subNameSpaces.Sort();

            foreach (NameSpace subNameSpace in subNameSpaces)
            {
                GatherNamespaces(nameSpaceTreeNode, subNameSpace, filterConfiguration);
            }
        }
Exemplo n.º 13
0
        /// <summary>
        /// Fills the tree view with the namespace and enclosed namespaces
        /// </summary>
        /// <param name="treeNode"></param>
        /// <param name="nameSpace"></param>
        /// <param name="filterConfiguration">The filter configuration used to set up the check boxes</param>
        private void GatherNamespaces(TreeNode treeNode, DataDictionary.Types.NameSpace nameSpace, FilterConfiguration filterConfiguration)
        {
            NamableTreeNode nameSpaceTreeNode = new NamableTreeNode(nameSpace);

            nameSpaceTreeNode.Checked = filterConfiguration.NameSpaces.Contains(nameSpace);
            treeNode.Nodes.Add(nameSpaceTreeNode);

            List <DataDictionary.Types.NameSpace> subNameSpaces = new List <DataDictionary.Types.NameSpace>();

            foreach (DataDictionary.Types.NameSpace otherNameSpace in nameSpace.SubNameSpaces)
            {
                subNameSpaces.Add(otherNameSpace);
            }
            subNameSpaces.Sort();

            foreach (DataDictionary.Types.NameSpace subNameSpace in subNameSpaces)
            {
                GatherNamespaces(nameSpaceTreeNode, subNameSpace, filterConfiguration);
            }
        }
        /// <summary>
        /// Constructor
        /// </summary>
        public TimeLineControl()
        {
            InitializeComponent();

            FilterConfiguration = new FilterConfiguration();
            ContextMenu = new ContextMenu();
            ContextMenu.MenuItems.Add(new MenuItem("Configure filter...", new EventHandler(OpenFilter)));
        }
Exemplo n.º 15
0
        /// <summary>
        /// Updates the namespace configuration according to the provided node, and enclosed nodes
        /// </summary>
        /// <param name="node"></param>
        /// <param name="filterConfiguration"></param>
        private void UpdateConfiguration(NamableTreeNode node, FilterConfiguration filterConfiguration)
        {
            DataDictionary.Types.NameSpace nameSpace = node.Namable as DataDictionary.Types.NameSpace;
            if (nameSpace != null)
            {
                if (node.Checked)
                {
                    filterConfiguration.NameSpaces.Add(nameSpace);
                }
            }

            foreach (NamableTreeNode subNode in node.Nodes)
            {
                UpdateConfiguration(subNode, filterConfiguration);
            }
        }
Exemplo n.º 16
0
        /// <summary>
        /// Fills the tree view with the namespace and enclosed namespaces
        /// </summary>
        /// <param name="treeNode"></param>
        /// <param name="nameSpace"></param>
        /// <param name="filterConfiguration">The filter configuration used to set up the check boxes</param>
        private void GatherNamespaces(TreeNode treeNode, DataDictionary.Types.NameSpace nameSpace, FilterConfiguration filterConfiguration)
        {
            NamableTreeNode nameSpaceTreeNode = new NamableTreeNode(nameSpace);
            nameSpaceTreeNode.Checked = filterConfiguration.NameSpaces.Contains(nameSpace);
            treeNode.Nodes.Add(nameSpaceTreeNode);

            List<DataDictionary.Types.NameSpace> subNameSpaces = new List<DataDictionary.Types.NameSpace>();
            foreach (DataDictionary.Types.NameSpace otherNameSpace in nameSpace.SubNameSpaces)
            {
                subNameSpaces.Add(otherNameSpace);
            }
            subNameSpaces.Sort();

            foreach (DataDictionary.Types.NameSpace subNameSpace in subNameSpaces)
            {
                GatherNamespaces(nameSpaceTreeNode, subNameSpace, filterConfiguration);
            }
        }