Ejemplo n.º 1
0
 /// <summary>
 /// Triggers the WorkModeChanged event.
 /// </summary>
 internal virtual void OnWorkModeChanged(WorkSpaceModeChangeEventArgs ea)
 {
     if (WorkModeChanged != null)
         WorkModeChanged(this, ea);
 }
Ejemplo n.º 2
0
 public void WorkModeChanged_DummyHandler(IWorkSpace sender, WorkSpaceModeChangeEventArgs ea)
 {
     //throw new Exception("The method or operation is not implemented.");
     WorkModeChanged_TimesHandled++;
     ;
 }
Ejemplo n.º 3
0
 internal void _wkSpce_WorkSpaceModeChanged(IWorkSpace sender, WorkSpaceModeChangeEventArgs ea)
 {
     if (sender != null)
     {
         // push change to view
         UpdateWorkModeInView(sender, ea.NewMode);
     }
 }
Ejemplo n.º 4
0
 internal void _view_WorkSpaceModeChanging(IWorkSpaceView sender, WorkSpaceModeChangeEventArgs ea)
 {
     throw new NotImplementedException("The method or operation is not implemented.");
 }
Ejemplo n.º 5
0
 internal void _view_WorkSpaceModeChanged(IWorkSpaceView sender, WorkSpaceModeChangeEventArgs ea)
 {
     if (sender != null)
     {
         // push change to model (ie the WorkSpace core)
         UpdateWorkModeInModel(sender, ea.NewMode);
     }
 }
Ejemplo n.º 6
0
        public void VerifyWorkSpaceModeChangedEvent()
        {
            var wkSpce = new WorkSpace();
            var helper = new HelperForWorkSpaces();
            wkSpce.WorkModeChanged += new WorkSpaceModeChangeEventHandler<IWorkSpace, WorkSpaceModeChangeEventArgs>(helper.WorkModeChanged_DummyHandler);

            WorkSpaceMode priorMode = WorkSpaceMode.Normal;
            WorkSpaceMode newMode = WorkSpaceMode.Execution;

            var ea = new WorkSpaceModeChangeEventArgs(priorMode, newMode);

            wkSpce.OnWorkModeChanged(ea);

            Assert.Equal(1, helper.WorkModeChanged_TimesHandled);
        }