/// <summary> /// Triggers the ExecModeChanged event. /// </summary> internal virtual void OnExecModeChanged(WorkSpaceExecModeChangeEventArgs ea) { if (ExecModeChanged != null) ExecModeChanged(this, ea); }
public void ExecModeChanged_DummyHandler(IWorkSpace sender, WorkSpaceExecModeChangeEventArgs ea) { //throw new Exception("The method or operation is not implemented."); ExecModeChanged_TimesHandled++; }
internal void _wkSpce_WorkSpaceExecModeChanged(IWorkSpace sender, WorkSpaceExecModeChangeEventArgs ea) { if (sender != null) { // push change to view this.UpdateExedModeInView(sender, ea.NewMode); } }
internal void _view_WorkSpaceExecModeChanging(IWorkSpaceView sender, WorkSpaceExecModeChangeEventArgs ea) { throw new NotImplementedException("The method or operation is not implemented."); }
internal void _view_WorkSpaceExecModeChanged(IWorkSpaceView sender, WorkSpaceExecModeChangeEventArgs ea) { if (sender != null) { // push change to model (ie the WorkSpace core) this.UpdateExedModeInModel(sender, ea.NewMode); } }
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); }