Пример #1
0
        private static void OnDefaultPositionChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            double?newValue = (double?)e.NewValue;

            if (newValue.HasValue)
            {
                MediaPlayerExt totalMilliseconds = d as MediaPlayerExt;
                totalMilliseconds.isDragging            = true;
                totalMilliseconds.mediaElement.Position = TimeSpan.FromMilliseconds(newValue.Value);
                totalMilliseconds.Position   = totalMilliseconds.mediaElement.Position.TotalMilliseconds;
                totalMilliseconds.isDragging = false;
            }
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this._mediaElement = ((SmartView2.Controls.MediaPlayerExt)(target));
                return;

            case 2:
                this._contextMenuMediaElement = ((System.Windows.Controls.ContextMenu)(target));
                return;

            case 3:

            #line 67 "..\..\..\..\..\Views\MultimediaInner\MediaPlayerPage.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this._fullScreenButton_Click);

            #line default
            #line hidden
                return;

            case 4:

            #line 81 "..\..\..\..\..\Views\MultimediaInner\MediaPlayerPage.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this._fullScreenButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this._pauseMenuItem = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 6:
                this._playMenuItem = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 7:
                this._photoListBox = ((System.Windows.Controls.ListBox)(target));

            #line 177 "..\..\..\..\..\Views\MultimediaInner\MediaPlayerPage.xaml"
                this._photoListBox.ManipulationBoundaryFeedback += new System.EventHandler <System.Windows.Input.ManipulationBoundaryFeedbackEventArgs>(this._photoListBox_ManipulationBoundaryFeedback);

            #line default
            #line hidden
                return;

            case 8:
                this._musicVideoStackPanel = ((System.Windows.Controls.Grid)(target));
                return;

            case 9:
                this._musicTitleStackPanel = ((System.Windows.Controls.DockPanel)(target));
                return;

            case 10:
                this._musicButtonsStackPanel = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 11:
                this._fullScreenButton = ((System.Windows.Controls.Button)(target));

            #line 275 "..\..\..\..\..\Views\MultimediaInner\MediaPlayerPage.xaml"
                this._fullScreenButton.Click += new System.Windows.RoutedEventHandler(this._fullScreenButton_Click);

            #line default
            #line hidden
                return;

            case 12:
                this._photoPreviousButton = ((System.Windows.Controls.Button)(target));
                return;

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

            case 14:
                this._content = ((System.Windows.Controls.Grid)(target));
                return;

            case 15:
                this._musicListBox = ((System.Windows.Controls.ListView)(target));
                return;
            }
            this._contentLoaded = true;
        }