public Configuration(Vitrola vitrola) { InitializeComponent(); _vitrola = vitrola; viewMiniatureCB.IsChecked = _vitrola.ViewMiniature; viewScreenSaverVideoCB.IsChecked = _vitrola.ViewVideo; fontsizeLListBox.Text = _vitrola.FontsizeLListBox.ToString(); DataContext = this; DeleteImages=new List<string>(); Filters = new ObservableCollection<string>(vitrola.Filters); tempFilters = new List<string>(vitrola.Filters); valuePlayVideoTB.Text = vitrola.ValueTrack.ToString(); delayMin.Text = vitrola.DelayMin.ToString(); delaySeg.Text = vitrola.DelaySeg.ToString(); if (vitrola.Genres == null) return; Genres = new ObservableCollection<string>(vitrola.Genres); if (Genres != null && Genres.Count > 0) { SelectedGenre = Genres.First(); } Artists = new ObservableCollection<string>(vitrola.Artists); if (Artists != null && Artists.Count > 0) SelectedArtist = Artists.First(); if (vitrola.GenArtTrack == null) GenArtTrack = new SortedList<string, SortedList<string, Tuple<List<string>, List<string>, string,string>>>(); else GenArtTrack = new SortedList<string, SortedList<string, Tuple<List<string>, List<string>, string,string>>>(_vitrola.GenArtTrack); InicializeImagenGenre(); dataGrid.ItemsSource = vitrola.Trazas; }
public Menu(Vitrola vitrola) { InitializeComponent(); _vitrola = vitrola; }
public MainWindow() { if (IsExecutingApplication()) Close(); FocusManager.SetIsFocusScope(this, true); _vitrola = new Vitrola(); _vitrola.LoadVitrola(); _vitrola.LoadTrazas(); StartMove(); Thread.Sleep(_vitrola.DelaySeg*1000); try { var dirWindows = Environment.GetFolderPath(Environment.SpecialFolder.Windows); var dirWindowsFonts = dirWindows + "\\Fonts"; var fontsDesde = _vitrola.CurrentDirectory + "\\Fonts"; //Copiar las fuentes a su destino si es que no existen if (Directory.Exists(fontsDesde) && Directory.Exists(dirWindowsFonts)) { foreach (var file in Directory.GetFiles(fontsDesde)) { var temp = file.Split(new char[] { '\\' }, StringSplitOptions.RemoveEmptyEntries); var name = temp[temp.Length - 1]; if (!File.Exists(dirWindowsFonts + "\\" + name)) File.Copy(file, dirWindowsFonts + "\\" + name); } } } catch{} InitializeComponent(); DataContext = _vitrola; _vitrola.NotifyChanged("Genres"); listBoxGenre.Width = _vitrola.Width; listBoxArtist.Width = _vitrola.Width; listBoxTrack.Width = _vitrola.Width; BorderBrushListBox = listBoxTrack.BorderBrush; ColorBrush = new SolidColorBrush(Colors.Gold); bigScreen = new BigScreen(this); bigScreen.SetVolume(_vitrola.Volumen); if (_vitrola.Genres != null && _vitrola.Genres.Count > 0 && _vitrola.Artists.Count > 0 && _vitrola.Tracks.Count > 0) { if (_vitrola.ViewMiniature) { _vitrola.Source = _vitrola.DirTracks[0]; mediaElement.Play(); } } soundPlayerCoin = new SoundPlayer {SoundLocation = _vitrola.CurrentDirectory + @"\Configuration\coin.wav"}; soundPlayerPraise = new SoundPlayer {SoundLocation = _vitrola.CurrentDirectory + @"\Configuration\praise.wav"}; /////////////////Poner video de Fondo///////////////////////// //player = new MediaPlayer(); //player.Volume = 0; //VideoDrawing videoDrawing = new VideoDrawing(); //videoDrawing.Rect = new Rect(0, 0, 150, 100); //videoDrawing.Player = player; //DrawingBrush brush = new DrawingBrush(videoDrawing); //player.Open(new Uri(@"D:\videos\videos clips\Baladas\ALEX BUENO\02.- AMIGO.mpg")); //Background = brush; //player.Play(); //creando el color de degradao de los triangulos linearGBTriangle = new LinearGradientBrush(); linearGBTriangle.EndPoint = new Point(1, 0.5); linearGBTriangle.StartPoint = new Point(0, 0.5); var gradientStop = new GradientStop(); gradientStop.Offset = 0; gradientStop.Color = Colors.Black; var gradientStop1 = new GradientStop(); gradientStop1.Offset = 1; gradientStop1.Color = Colors.Red; linearGBTriangle.GradientStops = new GradientStopCollection(new List<GradientStop>() {gradientStop, gradientStop1}); //Verify(); CopyRegister(); HideTaskBar(); Activate(); Focus(); Keyboard.Focus(this); WindowInteropHelper interopHelper = new WindowInteropHelper(this); IntPtr windowHandle = interopHelper.Handle; //IntPtr windowHandle = new WindowInteropHelper(System.Windows.Application.Current.MainWindow).Handle; WinAPI.SiempreEncima(windowHandle.ToInt32()); }
public Configuration(Vitrola vitrola, bool filter) : this(vitrola) { tabControl1.SelectedIndex = 3; }
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(); }