Пример #1
0
        public NewThemeForm(MusicPlayerForm musicPlayer)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            MusicPlayer = musicPlayer;
            string themeName = musicPlayer.themeName;

            foreach (string mascotName in MascotMap.Keys)
            {
                MascotSelection.Items.Add(mascotName);
                if (mascotName.Equals(ThemeManager.imageString))
                {
                    MascotSelection.SelectedIndex = MascotSelection.Items.Count - 1;
                }
            }
            MascotSelection.Items.Add("Custom");
            if (ThemeManager.imageString.StartsWith("Custom:"))
            {
                PreviewMascotBox.Image        = ThemeManager.image;
                PreventMascotChangeWindow     = true;
                MascotSelection.SelectedIndex = MascotSelection.Items.Count - 1;
            }

            Stack <char> stack = new Stack <char>();

            for (var i = themeName.Length - 1; i >= 0; i--)
            {
                if (!char.IsNumber(themeName[i]))
                {
                    break;
                }

                stack.Push(themeName[i]);
            }

            string version = new string(stack.ToArray());

            try
            {
                long versionNumber = long.Parse(version);
                themeName = themeName.Substring(0, themeName.LastIndexOf(version));

                while (new FileInfo(musicPlayer.themePath + themeName + versionNumber + ".wzmp").Exists)
                {
                    versionNumber++;
                }

                NameTextBox.Text = themeName + versionNumber;
            }
            catch
            {
                NameTextBox.Text = themeName + "1";
            }
        }
Пример #2
0
        public static void SetTheme(MusicPlayerForm musicPlayer, string themeName)
        {
            musicPlayer.penguinPurpleToolStripMenuItem.Checked     = false;
            musicPlayer.pureWhiteToolStripMenuItem.Checked         = false;
            musicPlayer.deepBlackToolStripMenuItem.Checked         = false;
            musicPlayer.feelsGoodManToolStripMenuItem.Checked      = false;
            musicPlayer.forTheHordeToolStripMenuItem.Checked       = false;
            musicPlayer.stardustCrusadersToolStripMenuItem.Checked = false;

            FileInfo themeFile = new FileInfo(musicPlayer.themePath + "\\" + themeName + ".wzmp");

            if (themeFile.Exists)
            {
                string themeProperties = musicPlayer.ReadConfig(themeFile.FullName);
                SetThemeCustom(themeProperties.Split(';'));
            }
            else if (themeName.Equals("pureWhite"))
            {
                SetThemePureWhite();
                musicPlayer.pureWhiteToolStripMenuItem.Checked = true;
            }
            else if (themeName.Equals("deepBlack"))
            {
                SetThemeDeepBlack();
                musicPlayer.deepBlackToolStripMenuItem.Checked = true;
            }
            else if (themeName.Equals("feelsGoodMan"))
            {
                SetThemeFeelsGoodMan();
                musicPlayer.feelsGoodManToolStripMenuItem.Checked = true;
            }
            else if (themeName.Equals("forTheHorde"))
            {
                SetThemeForTheHorde();
                musicPlayer.forTheHordeToolStripMenuItem.Checked = true;
            }
            else if (themeName.Equals("stardustCrusaders"))
            {
                SetThemeStardustCrusaders();
                musicPlayer.stardustCrusadersToolStripMenuItem.Checked = true;
            }
            else
            {
                SetThemePenguinPurple();
                musicPlayer.penguinPurpleToolStripMenuItem.Checked = true;
            }

            themableForms.RemoveAll(item => item == null);
            foreach (Themable themableForm in themableForms)
            {
                themableForm.ApplyTheme();
            }
        }
        public AudioRecorderForm(MusicPlayerForm musicPlayer, TreeNode treeNode, DirectoryInfo directoryInfo)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            this.musicPlayer   = musicPlayer;
            this.treeNode      = treeNode;
            this.directoryInfo = directoryInfo;

            NameLabel.Text = "Record Audio to: " + directoryInfo.Name;
        }
Пример #4
0
        public NewStreamForm(MusicPlayerForm musicPlayer)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            this.musicPlayer = musicPlayer;

            InfoLabel.Text
                = "Tip: When a webradio offers different stream formats for different players,\n"
                  + "you should always choose the .asx (Windows Media Player) format."
                ;
        }
Пример #5
0
        public ConfigHotkeysForm(MusicPlayerForm musicPlayer)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            this.musicPlayer = musicPlayer;
            LoadHotkeys();

            InfoLabel.Text
                = "Tip: You can also use the media buttons on\n"
                  + "your keyboard to control the player."
                ;
        }
Пример #6
0
        public NewPlaylistForm(MusicPlayerForm musicPlayer, List <string> songPaths, string playlistName)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            this.musicPlayer       = musicPlayer;
            this.songPaths         = songPaths;
            PlaylistNameInput.Text = Regex.Replace(playlistName, "^[a-zA-Z0-9]*$", "");

            foreach (string songPath in songPaths)
            {
                SelectedFilePathsBox.AppendText(songPath + (songPaths.Last().Equals(songPath) ? "" : "\n"));
            }
        }
        public YouTubeDownloadForm(MusicPlayerForm musicPlayer, TreeNode treeNode, DirectoryInfo directoryInfo)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            this.musicPlayer   = musicPlayer;
            this.treeNode      = treeNode;
            this.directoryInfo = directoryInfo;

            NameLabel.Text = "Download Audio to: " + directoryInfo.Name;

            InfoLabel.Text
                = "Tip: You shall not exploit any Content for any other than personal purposes\n"
                  + "without the prior written consent of YouTube or the licensors of the Content."
                ;
        }
Пример #8
0
        public NewPlaylistAdditionForm(MusicPlayerForm musicPlayer, List <string> songPaths)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            this.musicPlayer = musicPlayer;
            this.songPaths   = songPaths;

            foreach (string playlistName in musicPlayer.playlistNames.OrderBy(s => s).ToList())
            {
                PlaylistInput.Items.Add(playlistName);
            }

            foreach (string songPath in songPaths)
            {
                SelectedFilePathsBox.AppendText(songPath + "\n");
            }
        }
Пример #9
0
        public ConfigTagsForm(MusicPlayerForm musicPlayer, FileInfo fileInfo)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            this.MusicPlayer = musicPlayer;
            this.FileInfo    = fileInfo;

            NameLabel.Text = fileInfo.Name;

            SongTag            = new SongTag(fileInfo.FullName);
            TitleTextBox.Text  = SongTag.Title;
            TrackTextBox.Text  = SongTag.Track;
            AlbumTextBox.Text  = SongTag.Album;
            ArtistTextBox.Text = SongTag.Artist;
            YearTextBox.Text   = SongTag.Year;
            AlbumBox.Image     = SongTag.Art ?? Properties.Resources.album_art;
        }
Пример #10
0
        public SongListViewForm(MusicPlayerForm musicPlayer, string playlistName, List <string> songPaths)
        {
            InitializeComponent();

            ThemeManager.AddThemableForm(this);
            ApplyTheme();

            this.musicPlayer  = musicPlayer;
            this.playlistName = playlistName;
            this.songPaths    = songPaths;

            if (String.IsNullOrWhiteSpace(playlistName))
            {
                toolStripSeparator1.Visible                 = false;
                showSonglistToolStripMenuItem.Visible       = false;
                removeFromPlaylistToolStripMenuItem.Visible = false;
                deletePlaylistToolStripMenuItem.Visible     = false;
            }

            CreateTable();

            DataGridView.CellMouseDown += (sender, args) => SelectSong(sender, args);
        }