本文整理汇总了C#中TvControl.TvServer.StopRecordingSchedule方法的典型用法代码示例。如果您正苦于以下问题:C# TvServer.StopRecordingSchedule方法的具体用法?C# TvServer.StopRecordingSchedule怎么用?C# TvServer.StopRecordingSchedule使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TvControl.TvServer
的用法示例。
在下文中一共展示了TvServer.StopRecordingSchedule方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: StopRecording
private static bool StopRecording(Schedule schedule)
{
bool stoppedRec = false;
bool isRec = TvDatabase.Schedule.IsScheduleRecording(schedule.IdSchedule);
if (isRec)
{
TvServer server = new TvServer();
server.StopRecordingSchedule(schedule.IdSchedule);
stoppedRec = true;
}
return stoppedRec;
}
示例2: mpButtonDel_Click
private void mpButtonDel_Click(object sender, EventArgs e)
{
mpListView1.BeginUpdate();
try
{
IList<Schedule> schedules = Schedule.ListAll();
TvServer server = new TvServer();
//Since it takes a very long time to add channels, make sure the user really wants to delete them
if (mpListView1.SelectedItems.Count > 0)
{
string holder = String.Format("Are you sure you want to delete these {0:d} channels?",
mpListView1.SelectedItems.Count);
if (MessageBox.Show(holder, "", MessageBoxButtons.YesNo) == DialogResult.No)
{
//mpListView1.EndUpdate();
return;
}
}
NotifyForm dlg = new NotifyForm("Deleting selected tv channels...",
"This can take some time\n\nPlease be patient...");
dlg.Show(this);
dlg.WaitForDisplay();
foreach (ListViewItem item in mpListView1.SelectedItems)
{
Channel channel = (Channel)item.Tag;
//also delete any still active schedules
if (schedules != null)
{
for (int i = schedules.Count - 1; i > -1; i--)
{
Schedule schedule = schedules[i];
if (schedule.IdChannel == channel.IdChannel)
{
server.StopRecordingSchedule(schedule.IdSchedule);
schedule.Delete();
schedules.RemoveAt(i);
}
}
}
channel.Delete();
mpListView1.Items.Remove(item);
}
dlg.Close();
ReOrder();
mpListView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
}
finally
{
mpListView1.EndUpdate();
}
}
示例3: OnClick
private void OnClick(int iItem)
{
m_iSelectedItem = GetSelectedItemNo();
GUIListItem item = GetItem(iItem);
if (item == null)
{
return;
}
Schedule rec = (Schedule)item.TVTag;
GUIDialogMenu dlg = (GUIDialogMenu)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_MENU);
if (dlg == null)
{
return;
}
dlg.Reset();
dlg.SetHeading(rec.ProgramName);
if (rec.Series == false)
{
dlg.AddLocalizedString(618); //delete
}
else
{
dlg.AddLocalizedString(981); //Delete this recording
dlg.AddLocalizedString(982); //Delete series recording
dlg.AddLocalizedString(888); //Episodes management
}
VirtualCard card;
TvServer server = new TvServer();
if (server.IsRecordingSchedule(rec.IdSchedule, out card))
{
dlg.AddLocalizedString(979); //Play recording from beginning
dlg.AddLocalizedString(980); //Play recording from live point
}
else
{
IList<TuningDetail> details = Channel.Retrieve(rec.IdChannel).ReferringTuningDetail();
foreach (TuningDetail detail in details)
{
if (detail.ChannelType == 0)
{
dlg.AddLocalizedString(882); //Quality settings
break;
}
}
}
dlg.DoModal(GetID);
if (dlg.SelectedLabel == -1)
{
return;
}
switch (dlg.SelectedId)
{
case 888: ////Episodes management
OnSetEpisodesToKeep(rec);
break;
case 882:
OnSetQuality(rec);
break;
case 981: //Delete this recording only
{
if (server.IsRecordingSchedule(rec.IdSchedule, out card))
{
GUIDialogYesNo dlgYesNo = (GUIDialogYesNo)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_YES_NO);
if (null != dlgYesNo)
{
dlgYesNo.SetHeading(GUILocalizeStrings.Get(653)); //Delete this recording?
dlgYesNo.SetLine(1, GUILocalizeStrings.Get(730)); //This schedule is recording. If you delete
dlgYesNo.SetLine(2, GUILocalizeStrings.Get(731)); //the schedule then the recording is stopped.
dlgYesNo.SetLine(3, GUILocalizeStrings.Get(732)); //are you sure
dlgYesNo.DoModal(GUIWindowManager.ActiveWindow);
if (dlgYesNo.IsConfirmed)
{
server.StopRecordingSchedule(rec.IdSchedule);
CanceledSchedule schedule = new CanceledSchedule(rec.IdSchedule, rec.IdChannel, rec.StartTime);
rec.Persist();
server.OnNewSchedule();
}
}
}
else
{
server.StopRecordingSchedule(rec.IdSchedule);
CanceledSchedule schedule = new CanceledSchedule(rec.IdSchedule, rec.IdChannel, rec.StartTime);
rec.Persist();
server.OnNewSchedule();
}
LoadDirectory();
}
break;
case 982: //Delete series recording
goto case 618;
case 618: // delete entire recording
//.........这里部分代码省略.........
示例4: mpButtonDel_Click
private void mpButtonDel_Click(object sender, EventArgs e)
{
foreach (ListViewItem item in listView1.SelectedItems)
{
Schedule schedule = (Schedule)item.Tag;
TvServer server = new TvServer();
server.StopRecordingSchedule(schedule.IdSchedule);
schedule.Delete();
listView1.Items.Remove(item);
}
listView1.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
}