JD2022-TU1/main/tools/apps/DataFileAnalyzer/Commands/RefreshCommand.cs

29 lines
743 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UAF.WPF.Commands;
namespace DataFileAnalyzer.Commands
{
public class RefreshCommand : BaseCommand
{
public override bool CanExecute(object parameter)
{
return true;
}
public override void Execute(object parameter)
{
DataFileAnalyzerModel model = parameter as DataFileAnalyzerModel;
if (model == null)
model = UAF.Application.Workspace.This.ActiveDocument as DataFileAnalyzerModel;
if (model != null)
{
model.RefreshFileList();
model.UpdatePerforceStatus();
}
}
}
}