예제 #1
0
파일: WorkSpace.cs 프로젝트: BgRva/Blob1
 /// <summary>
 /// Triggers the ExecModeChanged event.
 /// </summary>
 internal virtual void OnExecModeChanged(WorkSpaceExecModeChangeEventArgs ea)
 {
     if (ExecModeChanged != null)
         ExecModeChanged(this, ea);
 }
예제 #2
0
 public void ExecModeChanged_DummyHandler(IWorkSpace sender, WorkSpaceExecModeChangeEventArgs ea)
 {
     //throw new Exception("The method or operation is not implemented.");
     ExecModeChanged_TimesHandled++;
 }
예제 #3
0
 internal void _wkSpce_WorkSpaceExecModeChanged(IWorkSpace sender, WorkSpaceExecModeChangeEventArgs ea)
 {
     if (sender != null)
     {
         // push change to view
         this.UpdateExedModeInView(sender, ea.NewMode);
     }
 }
예제 #4
0
 internal void _view_WorkSpaceExecModeChanging(IWorkSpaceView sender, WorkSpaceExecModeChangeEventArgs ea)
 {
     throw new NotImplementedException("The method or operation is not implemented.");
 }
예제 #5
0
 internal void _view_WorkSpaceExecModeChanged(IWorkSpaceView sender, WorkSpaceExecModeChangeEventArgs ea)
 {
     if (sender != null)
     {
         // push change to model (ie the WorkSpace core)
         this.UpdateExedModeInModel(sender, ea.NewMode);
     }
 }
예제 #6
0
        public void VerifyWorkSpaceExecModeChangedEvent()
        {
            var wkSpce = new WorkSpace();
            var helper = new HelperForWorkSpaces();
            wkSpce.ExecModeChanged+=new WorkSpaceExecModeChangeEventHandler<IWorkSpace,WorkSpaceExecModeChangeEventArgs>(helper.ExecModeChanged_DummyHandler);
            ExecutionModes priorMode = ExecutionModes.Single;
            ExecutionModes newMode = ExecutionModes.Cascade;

            WorkSpaceExecModeChangeEventArgs ea = new WorkSpaceExecModeChangeEventArgs(priorMode, newMode);

            wkSpce.OnExecModeChanged(ea);

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