Пример #1
0
        private static void OnLCsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            MyListBox myListBox = d as MyListBox;

            myListBox.Items.Clear();
            myListBox.LCdex((List <ListContext>)(e.NewValue), ref myListBox.ItemNums);
            myListBox.Items.Add(new MyListBoxItem((List <ListContext>)(e.NewValue), 0));
            for (int i = 1; i < myListBox.ItemNums; i++)
            {
                myListBox.Items.Add(new MyListBoxItem(i));
            }
        }
Пример #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.myWindow = ((WpfBlendApp.MainWindow)(target));
                return;

            case 2:
                this.mainGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.contextmenu = ((System.Windows.Controls.ContextMenu)(target));
                return;

            case 4:
                this.scrollViewer = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 5:
                this.scrollGrid = ((System.Windows.Controls.Grid)(target));

            #line 149 "..\..\MainWindow.xaml"
                this.scrollGrid.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.ScrollGrid_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 6:
                this.scaleTransform = ((System.Windows.Media.ScaleTransform)(target));
                return;

            case 7:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 8:
                this.canvas2 = ((System.Windows.Controls.Canvas)(target));

            #line 156 "..\..\MainWindow.xaml"
                this.canvas2.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Canvas_MouseDown);

            #line default
            #line hidden

            #line 156 "..\..\MainWindow.xaml"
                this.canvas2.MouseMove += new System.Windows.Input.MouseEventHandler(this.Canvas_MouseMove);

            #line default
            #line hidden

            #line 156 "..\..\MainWindow.xaml"
                this.canvas2.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.Canvas_MouseUp);

            #line default
            #line hidden

            #line 156 "..\..\MainWindow.xaml"
                this.canvas2.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.Canvas_MouseLeftButtonUp);

            #line default
            #line hidden

            #line 156 "..\..\MainWindow.xaml"
                this.canvas2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Canvas2_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 156 "..\..\MainWindow.xaml"
                this.canvas2.MouseLeave += new System.Windows.Input.MouseEventHandler(this.Canvas2_MouseLeave);

            #line default
            #line hidden
                return;

            case 9:
                this.SelRect = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 10:
                this.StartContent = ((System.Windows.Controls.ContentControl)(target));
                return;

            case 11:
                this.dragGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 12:
                this.dragRec = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 13:
                this.startBtn = ((System.Windows.Controls.Button)(target));

            #line 161 "..\..\MainWindow.xaml"
                this.startBtn.Click += new System.Windows.RoutedEventHandler(this.TestBtn_Click);

            #line default
            #line hidden
                return;

            case 14:
                this.stopBtn = ((System.Windows.Controls.Button)(target));

            #line 162 "..\..\MainWindow.xaml"
                this.stopBtn.Click += new System.Windows.RoutedEventHandler(this.StopBtn_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.waitBtn = ((System.Windows.Controls.Button)(target));

            #line 163 "..\..\MainWindow.xaml"
                this.waitBtn.Click += new System.Windows.RoutedEventHandler(this.WaitBtn_Click);

            #line default
            #line hidden
                return;

            case 16:
                this.SRG = ((System.Windows.Shapes.Ellipse)(target));

            #line 165 "..\..\MainWindow.xaml"
                this.SRG.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.SRG_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 165 "..\..\MainWindow.xaml"
                this.SRG.MouseEnter += new System.Windows.Input.MouseEventHandler(this.SRG_MouseEnter);

            #line default
            #line hidden

            #line 165 "..\..\MainWindow.xaml"
                this.SRG.MouseLeave += new System.Windows.Input.MouseEventHandler(this.SRG_MouseLeave);

            #line default
            #line hidden

            #line 165 "..\..\MainWindow.xaml"
                this.SRG.MouseMove += new System.Windows.Input.MouseEventHandler(this.SRG_MouseMove);

            #line default
            #line hidden
                return;

            case 17:
                this.divPath = ((System.Windows.Shapes.Path)(target));
                return;

            case 18:
                this.dragPath = ((System.Windows.Shapes.Path)(target));

            #line 184 "..\..\MainWindow.xaml"
                this.dragPath.MouseMove += new System.Windows.Input.MouseEventHandler(this.Element_MouseMove);

            #line default
            #line hidden

            #line 184 "..\..\MainWindow.xaml"
                this.dragPath.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Element_MouseLeftButtonDown);

            #line default
            #line hidden

            #line 184 "..\..\MainWindow.xaml"
                this.dragPath.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.Element_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 19:
                this.UCListBox = ((WpfBlendApp.MyListBox)(target));
                return;
            }
            this._contentLoaded = true;
        }