private void SetToolStripLabel()
        {
            if (ToolStripLabel == null)
            {
                return;
            }

            var text =
                $"{TrackModels.Count} tracks in playlist ({TimeFormatHelper.GetFormattedHours(TrackModels.Sum(t => t.Length))})";

            ToolStripLabel.Text = text;
        }
 public SampleModel(Sample sample)
 {
     Description = (sample.TrackTitle == sample.Description)
         ? sample.TrackArtist + " - " + sample.Description
         : sample.TrackArtist + " - " + sample.TrackTitle + " - " + sample.Description;
     Tags            = string.Join(", ", sample.Tags.ToArray());
     LengthFormatted = TimeFormatHelper.GetFormattedHours(Convert.ToDecimal(sample.Length));
     Length          = Convert.ToDecimal(sample.Length);
     Bpm             = sample.Bpm;
     Sample          = sample;
     Key             = sample.IsAtonal
         ? "Atonal"
         : KeyHelper.GetDisplayKey(sample.Key);
 }
Example #3
0
 /// <summary>
 ///     Formats the seconds as a string in a HH:MM:SS format.
 /// </summary>
 /// <param name="seconds">The seconds.</param>
 /// <returns>A formatted string</returns>
 public string FormatSeconds(double seconds)
 {
     return(TimeFormatHelper.GetFormattedHours(seconds));
     //return Utils.FixTimespan(seconds, seconds > 3600 ? "HMMSS" : "MMSS");
 }