示例#1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 2:
                this.finishLine = ((System.Windows.Shapes.Line)(target));
                return;

            case 3:
                this.prefinishLine = ((System.Windows.Shapes.Line)(target));
                return;

            case 4:
                this.finishName = ((System.Windows.Controls.Label)(target));
                return;

            case 5:
                this.middleLine = ((System.Windows.Shapes.Line)(target));
                return;

            case 6:
                this.startLine = ((System.Windows.Shapes.Line)(target));
                return;

            case 7:
                this.horse1 = ((HorseRaces.Horse)(target));
                return;

            case 8:
                this.horse2 = ((HorseRaces.Horse)(target));
                return;

            case 9:
                this.horse3 = ((HorseRaces.Horse)(target));
                return;

            case 10:
                this.horse4 = ((HorseRaces.Horse)(target));
                return;

            case 11:
                this.horse5 = ((HorseRaces.Horse)(target));
                return;

            case 12:
                this.horse6 = ((HorseRaces.Horse)(target));
                return;

            case 13:
                this.horse7 = ((HorseRaces.Horse)(target));
                return;

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

            #line 39 "..\..\MainWindow.xaml"
                this.start_button.Click += new System.Windows.RoutedEventHandler(this.start_button_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.Label1 = ((System.Windows.Controls.Label)(target));
                return;

            case 16:
                this.speedLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 17:
                this.Label2 = ((System.Windows.Controls.Label)(target));
                return;

            case 18:
                this.coordLabel = ((System.Windows.Controls.Label)(target));
                return;

            case 19:
                this.startAgain_button = ((System.Windows.Controls.Button)(target));

            #line 44 "..\..\MainWindow.xaml"
                this.startAgain_button.Click += new System.Windows.RoutedEventHandler(this.startAgain_button_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
示例#2
0
 private void This_HorseSpeed(Horse horse)
 {
     targetHorse = horse;
     dX          = Canvas.GetLeft(targetHorse);
     dt.Start();
 }