Пример #1
0
        RuleControl CreateRuleControl(object datacontext)
        {
            RuleControl control = new RuleControl()
            {
                DataContext = datacontext
            };

            control.MoveUpEvent           += Rule_MoveUpEvent;
            control.MoveDownEvent         += Rule_MoveDownEvent;
            control.RuleValueChangedEvent += Rule_RuleValueChangedEvent;
            control.DelClick += (s, e) => rlist.Remove(control);
            return(control);
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.userControl = ((MarcovAlgorithmVisualizer.RuleControl)(target));
                return;

            case 2:
                this.lab = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.stackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 4:
                this.AV = ((System.Windows.Controls.TextBox)(target));

            #line 46 "..\..\RuleControl.xaml"
                this.AV.LostFocus += new System.Windows.RoutedEventHandler(this.A_LostFocus);

            #line default
            #line hidden
                return;

            case 5:
                this.BV = ((System.Windows.Controls.TextBox)(target));

            #line 48 "..\..\RuleControl.xaml"
                this.BV.LostFocus += new System.Windows.RoutedEventHandler(this.B_LostFocus);

            #line default
            #line hidden
                return;

            case 6:

            #line 51 "..\..\RuleControl.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.MoveUp_Click);

            #line default
            #line hidden
                return;

            case 7:

            #line 53 "..\..\RuleControl.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.MoveDown_Click);

            #line default
            #line hidden
                return;

            case 8:

            #line 55 "..\..\RuleControl.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Del_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }