Exemplo n.º 1
0
        private string GetTargetPath(NewSongProperties songProperties)
        {
            string targetFolderPath = GlobalVariables.GetCustomSongFolderPath(GlobalVariables.CurrentID);
            string targetFileName   = GlobalVariables.CurrentID + "-" + songProperties.SongTitle + "-" + songProperties.SongAuthor;

            return(targetFolderPath + "\\" + targetFileName + ".wem");
        }
Exemplo n.º 2
0
        private void NewSongsCreate()
        {
            this.newSongs = new List <NewSongProperties>();

            foreach (string file in FileList)
            {
                bool move = false;

                if (CustomSongMoveCheckBox.Checked)
                {
                    move = true;
                }

                NewSongProperties newSong;

                string pattern = ".*\\\\\\d*(-{1})(.*)(-{1})(.*)";
                Regex  regex   = new Regex(pattern);
                if (regex.IsMatch(file))
                {
                    string[] values = Path.GetFileNameWithoutExtension(file).Split('-');
                    newSong = new NewSongProperties(values[1], values[2], file, "", move);
                }
                else
                {
                    newSong = new NewSongProperties("", "", file, "", move);
                }
                this.newSongs.Add(newSong);
            }
        }
Exemplo n.º 3
0
        private void SongSaveButton_Click(object sender, EventArgs e)
        {
            NewSongProperties destinationPath = FilesListBox.SelectedItem as NewSongProperties;

            destinationPath.SongTitle  = CustomSongTitleTextBox.Text;
            destinationPath.SongAuthor = CustomSongAuthorTextBox.Text;

            if (CustomSongMoveCheckBox.Checked)
            {
                destinationPath.MoveInstedOfCopy = true;
            }
            else
            {
                destinationPath.MoveInstedOfCopy = false;
            }

            CustomSongTitleTextBox.BackColor  = Color.LightGreen;
            CustomSongAuthorTextBox.BackColor = Color.LightGreen;
        }
Exemplo n.º 4
0
        private void FilesListBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            NewSongProperties destinationPath = FilesListBox.SelectedItem as NewSongProperties;

            CustomSongFileFullPathLabel.Text = destinationPath.SongDestinationPath;
            CustomSongTitleTextBox.Text      = destinationPath.SongTitle;
            CustomSongAuthorTextBox.Text     = destinationPath.SongAuthor;

            if (destinationPath.MoveInstedOfCopy)
            {
                CustomSongMoveCheckBox.Checked = true;
            }
            else
            {
                CustomSongMoveCheckBox.Checked = false;
            }

            CustomSongTitleTextBox.BackColor  = default(Color);
            CustomSongAuthorTextBox.BackColor = default(Color);
        }