using Aitex.Core.Account;
using MECF.Framework.UI.Client.ClientBase;
using MECF.Framework.Common.OperationCenter;

namespace MECF.Framework.UI.Client.CenterViews.Diagnosis
{
    public class EventGeneratorViewModel : UiViewModelBase
    {
        #region Constructors

        public EventGeneratorViewModel()
        {
            DisplayName = "Event Generator";
        }

        #endregion

        #region Methods

        public void GenWarningEvent()
        {
            InvokeClient.Instance.Service.DoOperation(
                "System.Diagnosis.GenWarningEvent", 
                "This is a test Warning Event");
        }

        public void GenAlarmEvent()
        {
            InvokeClient.Instance.Service.DoOperation(
                "System.Diagnosis.GenAlarmEvent",
                "This is a test Alarm Event");
        }

        public void GenProcessJobDoneEvent()
        {
            InvokeClient.Instance.Service.DoOperation(
                "System.Diagnosis.GenPjDoneEvent",
                "This is a test PJ Done Event");
        }

        public void GenLoginBySameUserEvent()
        {
            InvokeClient.Instance.Service.DoOperation(
                "System.Diagnosis.GenLoginBySameUserEvent",BaseApp.Instance.UserContext.Token);
        }

        #endregion
    }
}
