Пример #1
0
            public void StartPause()
            {
                switch (Session.Status)
                {
                case EventStatus.JustCreated:
                    Session.Start();
                    StButCont = "PAUSE";
                    break;

                case EventStatus.Active:
                    Session.Pause();
                    StButCont = "RESUME";
                    break;

                case EventStatus.Suspended:
                    Session.Resume();
                    StButCont = "PAUSE";
                    break;

                case EventStatus.Stopped:
                    Session = new WorkSession();
                    Session.Start();
                    StButCont = "PAUSE";
                    break;
                }

                OnPropertyChanged();
            }
Пример #2
0
        public void GetWorkSession(Action <WorkSession, Exception> callback)
        {
            var workSession = new WorkSession();

            workSession.AddTask("SG");
            workSession.Start("SG");
            callback(workSession, null);
        }