Ejemplo n.º 1
0
 private void ShowRecordingBalloon(string title, Recording recording, bool showDescription)
 {
     if (Config.Current.ShowRecordingBalloons)
     {
         StringBuilder tipText = new StringBuilder();
         tipText.Append(recording.ProgramStartTime.ToShortTimeString());
         tipText.Append("-");
         tipText.Append(recording.ProgramStopTime.ToShortTimeString());
         tipText.Append(" ");
         tipText.Append(recording.CreateProgramTitle());
         if (showDescription)
         {
             string description = recording.CreateCombinedDescription(false);
             if (!String.IsNullOrEmpty(description))
             {
                 tipText.Append(Environment.NewLine).Append(Environment.NewLine);
                 tipText.Append(description);
             }
         }
         if (tipText.Length >= _maxTipTextLength)
         {
             tipText.Length = _maxTipTextLength - 4;
             tipText.Append("...");
         }
         _notifyIcon.ShowBalloonTip(Config.Current.BalloonTimeoutSeconds * 1000, title, tipText.ToString(), ToolTipIcon.Info);
     }
 }
Ejemplo n.º 2
0
        private void BroadcastRecording(AddressList addressList, string title, Recording recording, bool showDescription)
        {
            StringBuilder message = new StringBuilder(title);

            message.Append(" ");
            message.Append(recording.ProgramStartTime.ToShortTimeString());
            message.Append("-");
            message.Append(recording.ProgramStopTime.ToShortTimeString());
            message.Append(" (");
            message.Append(recording.ChannelDisplayName);
            message.Append(") ");
            message.Append(recording.CreateProgramTitle());
            if (showDescription)
            {
                string description = recording.CreateCombinedDescription(false);
                if (!String.IsNullOrEmpty(description))
                {
                    message.Append(Environment.NewLine).Append(Environment.NewLine);
                    message.Append(description);
                }
            }
            if (message.Length >= _maxMessageLength)
            {
                message.Length = _maxMessageLength - 4;
                message.Append("...");
            }
            BroadcastMessageToAddressList(addressList, message.ToString());
        }
Ejemplo n.º 3
0
 public static string BuildRecordingBaseFilePath(string format, string sourceDirectory, Recording recording)
 {
     string result = Path.Combine(sourceDirectory, BuildRecordingBaseFilePath(format, recording.ChannelDisplayName, recording.ChannelType,
         recording.ScheduleName, recording.Title, recording.CreateProgramTitle(), recording.SubTitle, recording.EpisodeNumberDisplay,
         recording.EpisodeNumber, recording.SeriesNumber, recording.ProgramStartTime, recording.Category));
     if (result.Length > _maxPath - 1)
     {
         result = result.Substring(0, _maxPath - 1);
     }
     return result;
 }