Beispiel #1
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.my3D = ((ChessClient.AnimationFiles.Rotate3DContainer)(target));
                return;
            }
            this._contentLoaded = true;
        }
Beispiel #2
0
        void Panel1_MouseDown(object sender, MouseButtonEventArgs e)
        {
            Rotate3DContainer c = (Rotate3DContainer)ContainerUtils.GetNearestContainer(this);

            if (c != null)
            {
                if (e.ChangedButton == MouseButton.Left)
                {
                    c.Turn(true);
                }
                else if (e.ChangedButton == MouseButton.Right)
                {
                    c.Turn(false);
                }
            }
        }