예제 #1
0
        private void ErrorSelected(object sender, EventArgs e)
        {
            elementList.BeginUpdate();
            elementList.Nodes.Clear();
            QuickFix[] fixes;

            if (errorNode == null)
            {
                elementList.EndUpdate();
                return;
            }

            if (comboBox1.SelectedIndex == 0)
            {
                fixes = editor.ValidationManager.GetQuickFixes(errorNode);
            }
            else
            {
                ValidationError ve = comboBox1.SelectedItem as ValidationError;
                Debug.Assert(ve != null, "Expected ValidationError in combo!");

                fixes = editor.ValidationManager.GetQuickFixes(ve);
            }

            QuickFixSorter s = new QuickFixSorter(fixes, 5);

            AddItems(s.TopItems, elementList.Nodes, true);

            elementList.EndUpdate();
        }
예제 #2
0
        private void ErrorSelected(object sender, EventArgs e)
        {
            elementList.BeginUpdate();
            elementList.Nodes.Clear();
            QuickFix[] fixes;

            if ( errorNode == null )
            {
                elementList.EndUpdate();
                return;
            }

            if ( comboBox1.SelectedIndex == 0 )
                fixes=editor.ValidationManager.GetQuickFixes(errorNode);
            else
            {
                ValidationError ve=comboBox1.SelectedItem as ValidationError;
                Debug.Assert(ve != null, "Expected ValidationError in combo!");

                fixes=editor.ValidationManager.GetQuickFixes(ve);
            }

            QuickFixSorter s=new QuickFixSorter(fixes, 5);

            AddItems(s.TopItems, elementList.Nodes, true);

            elementList.EndUpdate();
        }