using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
using System.Windows.Forms;
using IReaper.Command;
using IReaper.FileData;
namespace IReaper.Notify{
public partial class NotifyIconContextMenu : ContextMenuStrip
{
public NotifyIconContextMenu()
{
InitializeComponent();
}
public NotifyIconContextMenu(IContainer container)
{
container.Add(this);
InitializeComponent();
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void ExitApplication(object sender, EventArgs e)
{
CommandBase command = CommandManager.GetCommand(CommandFamily.Command_CloseSystem);
command.Execute(this, null);
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void OpenApplication(object sender, EventArgs e)
{
Form main = Core.CoreData[CoreDataType.ApplicationForm] as Form;
if (main == null)
{ return; }
////
main.Visible = true;
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void StartAllDownloads(object sender, EventArgs e)
{
CourseFileDataCollection files = ((CourseFileDataCollection)Core.CoreData[CoreDataType.CurrentViewedFiles]);
CommandBase command = CommandManager.GetCommand(CommandFamily.Command_DownloadFile);
command.Execute(this, files);
}
/// <summary>
///
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void StopAllDownloads(object sender, EventArgs e)
{
CourseFileDataCollection files = ((CourseFileDataCollection)Core.CoreData[CoreDataType.CurrentViewedFiles]);
CommandBase command = CommandManager.GetCommand(CommandFamily.Command_PauseDownload);
command.Execute(this, files);
}
}
}
|