void Project_StepChanging(object sender, StepChangeEventArgs e) { switch (e.Step) { case ImportStep.Categories: foreach (var entity in Project.Entities) { if (!IsEnabled(entity)) { continue; } Table table = entity.Table; RemoveForeignKey(table); UpdateProcedure(table, entity.SaveProcedure); UpdateDefaultValues(table); } break; case ImportStep.Tables: foreach (var entity in Project.Entities) { if (!IsEnabled(entity)) { continue; } RemoveRowVersion(entity); } break; case ImportStep.End: foreach (var entity in Project.Entities) { if (!IsEnabled(entity)) { continue; } var producer = Project.Producers.GetProducerInstance <SqlServerProducer>(); if (producer != null) { producer.Production += (psender, pe) => { if (producer.MustUseLocalTransactions) { producer.MustUseLocalTransactions = false; } }; } break; } break; } }
void Project_StepChanging(object sender, StepChangeEventArgs e) { switch (e.Step) { case ImportStep.Categories: foreach (var entity in Project.Entities) { if (!IsEnabled(entity)) continue; Table table = entity.Table; RemoveForeignKey(table); UpdateProcedure(table, entity.SaveProcedure); UpdateDefaultValues(table); } break; case ImportStep.Tables: foreach (var entity in Project.Entities) { if (!IsEnabled(entity)) continue; RemoveRowVersion(entity); } break; case ImportStep.End: foreach (var entity in Project.Entities) { if (!IsEnabled(entity)) continue; var producer = Project.Producers.GetProducerInstance<SqlServerProducer>(); if (producer != null) { producer.Production += (psender, pe) => { if (producer.MustUseLocalTransactions) { producer.MustUseLocalTransactions = false; } }; } break; } break; } }
private void Project_StepChanging(object sender, StepChangeEventArgs e) { switch (e.Step) { //case ImportStep.Start: // break; //case ImportStep.Hints: // break; //case ImportStep.UserTypes: // break; //case ImportStep.ProjectTypes: // break; //case ImportStep.Tables: // break; //case ImportStep.Methods: // break; case ImportStep.PersistenceViews: FilterFunctionsEnumeration = FindOrCreateFilterFunctionsEnumeration(); UpdateMethods(); break; //case ImportStep.Procedures: // break; case ImportStep.Categories: UpdateProcedures(); break; //case ImportStep.Messages: // break; //case ImportStep.UI: // break; //case ImportStep.End: // break; //case ImportStep.ProjectTypesInference: // break; } }
private void LabyrinthProccessor_StepChanged(object sender, StepChangeEventArgs e) { _representation.SetActiveStep(e.Point); }
private void Workflow_StepChanged(object sender, StepChangeEventArgs e) { if (SwitchToMainThread(sender, e)) { return; } //end task if (e.Step == null) { //update bound CalibrationState CalibrationState = App.Instance.Arm.Settings.Calibrated.GetValueOrDefault(); //reset special animations _calSim.FocusOnArm(); _calSim.VerticalPostion(); //shutdown activity ActiveTask.Shutdown?.Invoke(ActiveTask.Workflow); //back to task selection ActiveTask = null; return; } //refresh results if (e.UpdateResult) { //stop special animations switch (e.Step.Key) { case "Led": var sc = App.Instance.Arm.Behaviors.Get <SyncronizeCommands>(); if (sc != null) { sc.SuppressSync = true; //disable syncronize with sim sc.SyncArm.Led.Off(); } break; case "Knob": _calSim.FlashKnob(false); break; case "Button": _calSim.FlashButton(false); break; case "ShoulderFeedback": case "ShoulderMotor": _calSim.StopSwingServo(_calSim.SimArm.Shoulder); break; case "UpperArmFeedback": case "UpperArmMotor": _calSim.StopSwingServo(_calSim.SimArm.UpperArm); break; case "ForeArmFeedback": case "ForeArmMotor": _calSim.StopSwingServo(_calSim.SimArm.ForeArm); break; case "HandFeedback": case "HandMotor": _calSim.StopSwingServo(_calSim.SimArm.Hand); break; case "FingerFeedback": case "FingerMotor": _calSim.StopSwingServo(_calSim.SimArm.Finger); break; case "ShoulderRange": _calSim.StopRangeServo(_calSim.SimArm.Shoulder); break; case "UpperArmRange": _calSim.StopRangeServo(_calSim.SimArm.UpperArm); break; case "ForeArmRange": _calSim.StopRangeServo(_calSim.SimArm.ForeArm); break; case "HandRange": _calSim.StopRangeServo(_calSim.SimArm.Hand); break; case "FingerRange": _calSim.StopRangeServo(_calSim.SimArm.Finger, true); _calSim.FocusOnArm(); break; case "FingerRangeLight": _calSim.StopRangeServo(_calSim.SimArm.Finger, true, true); _calSim.FocusOnArm(); break; case "VerticalPositionPower": _calSim.FlashPower(false); break; case "BaseHold": _calSim.FlashBase(false); break; case "UpperArmHold": _calSim.FlashUpperArm(false); break; case "ForeArmHold": _calSim.FlashForeArm(false); break; case "ShoulderProfile": case "UpperArmProfile": case "ForeArmProfile": case "HandProfile": case "FingerProfile": case "ShoulderSpeed": case "UpperArmSpeed": case "ForeArmSpeed": case "HandSpeed": case "FingerSpeed": _calSim.FreezeCameraCentering(false); var sc2 = App.Instance.Arm.Behaviors.Get <SyncronizeCommands>(); if (sc2 != null) { sc2.SuppressSync = true; //disable syncronize with sim } _calSim.VerticalPostion(false); break; case "Yoga1": case "Yoga2": case "Yoga3": case "Yoga4": case "Yoga5": case "Yoga6": case "Yoga7": case "Yoga8": case "Yoga9": case "Yoga10": case "Yoga11": case "Yoga12": case "Yoga13": case "Yoga14": case "Yoga15": case "Yoga16": case "Yoga17": case "Yoga18": case "Yoga19": case "Yoga20": _calSim.StopPose(); _calSim.FlashKnob(false); _calSim.FocusOnArm(); break; } ActiveTask.Steps.FirstOrDefault(i => i.Key == e.Step.Key)?.UpdateResult(); return; } //start special animations switch (e.Step.Key) { case "Led": _calSim.FocusOnKnob(); var sc = App.Instance.Arm.Behaviors.Get <SyncronizeCommands>(); if (sc != null) { sc.SuppressSync = false; //syncronize with sim } break; case "Knob": _calSim.FlashKnob(true); break; case "Button": _calSim.FlashButton(true); break; case "VerticalPosition": _calSim.FocusOnArm(); _calSim.VerticalPostion(true); break; case "ShoulderFeedback": case "ShoulderMotor": _calSim.SwingServo(_calSim.SimArm.Shoulder); break; case "UpperArmFeedback": case "UpperArmMotor": _calSim.SwingServo(_calSim.SimArm.UpperArm); break; case "ForeArmFeedback": case "ForeArmMotor": _calSim.SwingServo(_calSim.SimArm.ForeArm); break; case "HandFeedback": case "HandMotor": _calSim.SwingServo(_calSim.SimArm.Hand); break; case "FingerFeedback": case "FingerMotor": _calSim.SwingServo(_calSim.SimArm.Finger); break; case "ShoulderRange": _calSim.RangeServo(_calSim.SimArm.Shoulder); break; case "UpperArmRange": _calSim.RangeServo(_calSim.SimArm.UpperArm); break; case "UpperArmRangeHold": _calSim.RangeServo(_calSim.SimArm.UpperArm); _calSim.RangeServo(_calSim.SimArm.UpperArm); break; case "ForeArmRange": _calSim.RangeServo(_calSim.SimArm.ForeArm); break; case "HandRange": _calSim.RangeServo(_calSim.SimArm.Hand); break; case "FingerRange": _calSim.RangeServo(_calSim.SimArm.Finger, true); _calSim.FocusOnHand(); break; case "FingerRangeLight": _calSim.RangeServo(_calSim.SimArm.Finger, true, true); _calSim.FocusOnHand(); break; case "VerticalPositionPower": _calSim.VerticalPostion(true); _calSim.FlashPower(true); break; case "BaseHold": _calSim.FlashBase(true); break; case "UpperArmHold": _calSim.FlashUpperArm(true); break; case "ForeArmHold": _calSim.FlashForeArm(true); break; case "ShoulderProfile": case "UpperArmProfile": case "ForeArmProfile": case "HandProfile": case "FingerProfile": case "ShoulderSpeed": case "UpperArmSpeed": case "ForeArmSpeed": case "HandSpeed": case "FingerSpeed": _calSim.FreezeCameraCentering(true); var sc2 = App.Instance.Arm.Behaviors.Get <SyncronizeCommands>(); if (sc2 != null) { sc2.SuppressSync = false; //syncronize with sim } break; case "VerticalPositionClosed": _calSim.FocusOnArm(); _calSim.VerticalPostion(false); break; case "Yoga1": ShowYogaPose(0); break; case "Yoga2": ShowYogaPose(1); break; case "Yoga3": ShowYogaPose(2); break; case "Yoga4": ShowYogaPose(3); break; case "Yoga5": ShowYogaPose(4); break; case "Yoga6": ShowYogaPose(5); break; case "Yoga7": ShowYogaPose(6); break; case "Yoga8": ShowYogaPose(7); break; case "Yoga9": ShowYogaPose(8); break; case "Yoga10": ShowYogaPose(9); break; case "Yoga11": ShowYogaPose(10); break; case "Yoga12": ShowYogaPose(11); break; case "Yoga13": ShowYogaPose(12); break; case "Yoga14": ShowYogaPose(13); break; case "Yoga15": ShowYogaPose(14); break; case "Yoga16": ShowYogaPose(15); break; case "Yoga17": ShowYogaPose(16); break; case "Yoga18": ShowYogaPose(17); break; case "Yoga19": ShowYogaPose(18); break; case "Yoga20": ShowYogaPose(19); break; } //display message from step ActiveStep = e.Step; //hilight step if (ActiveTask != null) { foreach (var step in ActiveTask.Steps) { if (step.Hilight(e.Step)) { SelectedStep = step; } } } }
private void Project_StepChanging(object sender, StepChangeEventArgs e) { switch (e.Step) { //case ImportStep.Start: // break; //case ImportStep.Hints: // break; //case ImportStep.UserTypes: // break; //case ImportStep.ProjectTypes: // break; //case ImportStep.Tables: // break; //case ImportStep.Methods: // break; case ImportStep.PersistenceViews: FilterFunctionsEnumeration = FindOrCreateFilterFunctionsEnumeration(); UpdateMethods(); break; //case ImportStep.Procedures: // break; case ImportStep.Categories: UpdateProcedures(); break; //case ImportStep.Messages: // break; //case ImportStep.UI: // break; //case ImportStep.End: // break; //case ImportStep.ProjectTypesInference: // break; } }