Пример #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);
     }
 }
Пример #2
0
        private void _recordingsTreeView_SelectionChanged(object sender, EventArgs e)
        {
            List <RecordingSummary> recordings = GetSelectedRecordings();

            try
            {
                _selectedRecording = (recordings.Count == 1) ? Proxies.ControlService.GetRecordingById(recordings[0].RecordingId).Result : null;
            }
            catch (Exception ex)
            {
                _selectedRecording = null;
                MessageBox.Show(this, ex.Message, null, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            if (_selectedRecording != null)
            {
                _scheduleNameTextBox.Text  = _selectedRecording.ScheduleName;
                _recStartTextBox.Text      = FormatDateWithTime(_selectedRecording.RecordingStartTime, true);
                _recStopTextBox.Text       = _selectedRecording.RecordingStopTime.HasValue ? FormatDateWithTime(_selectedRecording.RecordingStopTime.Value, true) : "Recording...";
                _isPartialCheckBox.Checked = _selectedRecording.IsPartialRecording;
                _descriptionTextBox.Text   = _selectedRecording.CreateCombinedDescription(false);
                _lastWatchedTextBox.Text   = _selectedRecording.LastWatchedTime.HasValue ? FormatDateWithTime(_selectedRecording.LastWatchedTime.Value, true) : "Never";

                _keepUntilControl.SetKeepUntil(_selectedRecording.KeepUntilMode, _selectedRecording.KeepUntilValue);
                _keepUntilControl.Enabled = true;
                _applyKeepButton.Enabled  = false;

                UpdateKeepUntilLabel(_selectedRecording, recordings[0].IsFileOnDisk);
            }
            else
            {
                ClearDetails();
            }
        }