using System;
using System.Collections.Generic;
using System.Text;
using NU.OJL.MPRTOS.TLV.Base;

namespace NU.OJL.MPRTOS.TLV.Core.Commands
{
	public class StopCommand : ICommand
	{
		private IFileContext _fileContext;
		private string _Text;

		public string Text
		{
			get { return _Text; }
			set { _Text = value; }
		}

		public bool CanUndo { get { return false; } set { } }

		public StopCommand()
		{
			_fileContext = ApplicationFactory.GetFileContext();
			Text = "停止する";
		}

		public void Do()
		{
			if (_fileContext.IsOpened)
			{
				_fileContext.Close();
			}
		}

		public void Undo()
		{

		}
	}
}
