コード例 #1
0
ファイル: BigScreen.xaml.cs プロジェクト: oisbel/Vitrola
        public BigScreen(MainWindow mainWindow)
        {
            _mainWindow = mainWindow;
            InitializeComponent();
            dirScreenSaver = mainWindow._vitrola.DirScreenSaver;
            if (mainWindow._vitrola.ViewVideo && dirScreenSaver!="")
            {
                mediaElement.Visibility = Visibility.Visible;
                imageLogo.Visibility = Visibility.Hidden;
                try
                {
                    mediaElement.Source = new Uri(dirScreenSaver);
                    mediaElement.Play();
                }
                catch
                {
                    mediaElement.Visibility = Visibility.Hidden;
                    imageLogo.Visibility = Visibility.Visible;
                    dirScreenSaver = "";
                }
            }
            else
            {
                mediaElement.Visibility = Visibility.Hidden;
                imageLogo.Visibility = Visibility.Visible;
                dirScreenSaver = "";
            }

            SmsWelcome = "ESCOJA SU TEMA FAVORITO";
            tbmarquee.Text = SmsWelcome;
            MissingTrack = 0;
            Author = SmsWelcome;
            Track = "";
            ListBoxReproduction =mainWindow.listBoxReproduction;
            _storyboard = mainWindow.storyBoard;
            _progressBar = mainWindow.progressBar1;
            _vitrola = mainWindow._vitrola;

            PlayList = new List<string>();
            //Publicities = _vitrola.Publicities;
            Screen tempScreen = Screen.PrimaryScreen;
            foreach (var screen in Screen.AllScreens)
            {
                if (!screen.Primary)
                    tempScreen = screen;
            }
            Left= tempScreen.Bounds.Left;
            Top = tempScreen.Bounds.Top;
            Width = tempScreen.Bounds.Width;
            Height = tempScreen.Bounds.Height;

            stackPanel.Width = Width;
            ScaleVideo();
            //mediaElement.Width = Width;
            //WindowState = WindowState.Maximized;
            Activate();
        }
コード例 #2
0
ファイル: MainWindow.g.cs プロジェクト: oisbel/Vitrola
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.wind = ((NicoTrola.MainWindow)(target));
     
     #line 10 "..\..\..\MainWindow.xaml"
     this.wind.KeyDown += new System.Windows.Input.KeyEventHandler(this.Window_KeyDown);
     
     #line default
     #line hidden
     
     #line 10 "..\..\..\MainWindow.xaml"
     this.wind.KeyUp += new System.Windows.Input.KeyEventHandler(this.Window_KeyUp);
     
     #line default
     #line hidden
     
     #line 12 "..\..\..\MainWindow.xaml"
     this.wind.LostKeyboardFocus += new System.Windows.Input.KeyboardFocusChangedEventHandler(this.wind_LostKeyboardFocus);
     
     #line default
     #line hidden
     
     #line 12 "..\..\..\MainWindow.xaml"
     this.wind.Loaded += new System.Windows.RoutedEventHandler(this.wind_Loaded);
     
     #line default
     #line hidden
     
     #line 12 "..\..\..\MainWindow.xaml"
     this.wind.Closed += new System.EventHandler(this.wind_Closed);
     
     #line default
     #line hidden
     return;
     case 2:
     this.genreUp = ((System.Windows.Shapes.Polygon)(target));
     
     #line 224 "..\..\..\MainWindow.xaml"
     this.genreUp.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.genreUp_TouchDown);
     
     #line default
     #line hidden
     
     #line 224 "..\..\..\MainWindow.xaml"
     this.genreUp.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.genreUp_TouchUp);
     
     #line default
     #line hidden
     return;
     case 3:
     this.listBoxGenre = ((System.Windows.Controls.ListBox)(target));
     
     #line 239 "..\..\..\MainWindow.xaml"
     this.listBoxGenre.SizeChanged += new System.Windows.SizeChangedEventHandler(this.listBoxGenre_SizeChanged);
     
     #line default
     #line hidden
     return;
     case 4:
     this.genreDown = ((System.Windows.Shapes.Polygon)(target));
     
     #line 241 "..\..\..\MainWindow.xaml"
     this.genreDown.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.genreDown_TouchDown);
     
     #line default
     #line hidden
     
     #line 241 "..\..\..\MainWindow.xaml"
     this.genreDown.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.genreDown_TouchUp);
     
     #line default
     #line hidden
     return;
     case 5:
     this.artistUp = ((System.Windows.Shapes.Polygon)(target));
     
     #line 259 "..\..\..\MainWindow.xaml"
     this.artistUp.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.artistUp_TouchDown);
     
     #line default
     #line hidden
     
     #line 259 "..\..\..\MainWindow.xaml"
     this.artistUp.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.artistUp_TouchUp);
     
     #line default
     #line hidden
     return;
     case 6:
     this.listBoxArtist = ((System.Windows.Controls.ListBox)(target));
     return;
     case 7:
     this.artistDown = ((System.Windows.Shapes.Polygon)(target));
     
     #line 276 "..\..\..\MainWindow.xaml"
     this.artistDown.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.artistDown_TouchUp);
     
     #line default
     #line hidden
     
     #line 276 "..\..\..\MainWindow.xaml"
     this.artistDown.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.artistDown_TouchDown);
     
     #line default
     #line hidden
     return;
     case 8:
     this.trackUp = ((System.Windows.Shapes.Polygon)(target));
     
     #line 293 "..\..\..\MainWindow.xaml"
     this.trackUp.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.trackUp_TouchDown);
     
     #line default
     #line hidden
     
     #line 293 "..\..\..\MainWindow.xaml"
     this.trackUp.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.trackUp_TouchUp);
     
     #line default
     #line hidden
     return;
     case 9:
     this.listBoxTrack = ((System.Windows.Controls.ListBox)(target));
     
     #line 309 "..\..\..\MainWindow.xaml"
     this.listBoxTrack.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.listBoxTrack_TouchDown);
     
     #line default
     #line hidden
     return;
     case 10:
     this.trackDown = ((System.Windows.Shapes.Polygon)(target));
     
     #line 313 "..\..\..\MainWindow.xaml"
     this.trackDown.TouchDown += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.trackDown_TouchDown);
     
     #line default
     #line hidden
     
     #line 313 "..\..\..\MainWindow.xaml"
     this.trackDown.TouchUp += new System.EventHandler<System.Windows.Input.TouchEventArgs>(this.trackDown_TouchUp);
     
     #line default
     #line hidden
     return;
     case 11:
     this.gridOptions = ((System.Windows.Controls.Grid)(target));
     return;
     case 12:
     this.imageArtist = ((System.Windows.Controls.Image)(target));
     return;
     case 13:
     this.listBoxReproduction = ((System.Windows.Controls.ListView)(target));
     return;
     case 14:
     this.mediaElement = ((System.Windows.Controls.MediaElement)(target));
     
     #line 350 "..\..\..\MainWindow.xaml"
     this.mediaElement.MediaFailed += new System.EventHandler<System.Windows.ExceptionRoutedEventArgs>(this.mediaElement_MediaFailed);
     
     #line default
     #line hidden
     return;
     case 15:
     this.labelMoney = ((System.Windows.Controls.Label)(target));
     return;
     case 16:
     this.textBlockMoney = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 17:
     this.textBlockReference = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 18:
     this.canMain = ((System.Windows.Controls.Canvas)(target));
     return;
     case 19:
     this.tbmarquee = ((System.Windows.Controls.TextBlock)(target));
     return;
     case 20:
     this.sbar = ((System.Windows.Controls.Primitives.StatusBar)(target));
     return;
     case 21:
     this.progressBar1 = ((System.Windows.Controls.ProgressBar)(target));
     return;
     case 22:
     this.storyBoard = ((System.Windows.Media.Animation.Storyboard)(target));
     return;
     case 23:
     this.dAmElementBs = ((System.Windows.Media.Animation.DoubleAnimation)(target));
     return;
     }
     this._contentLoaded = true;
 }