32 lines
813 B
C#
32 lines
813 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using UAF.WPF.Commands;
|
|
|
|
namespace DataFileAnalyzer.Commands
|
|
{
|
|
public class GoBackCommand : BaseCommand
|
|
{
|
|
public override bool CanExecute(object parameter)
|
|
{
|
|
DataFileAnalyzerModel model = parameter as DataFileAnalyzerModel;
|
|
if (model != null)
|
|
{
|
|
return model.FileHistory.CanGoBack;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override void Execute(object parameter)
|
|
{
|
|
DataFileAnalyzerModel model = parameter as DataFileAnalyzerModel;
|
|
if (model != null)
|
|
{
|
|
if (model.FileHistory.CanGoBack)
|
|
model.FileHistory.Back();
|
|
}
|
|
}
|
|
}
|
|
}
|