protected override bool ExecuteItem(JetPopupMenuItem item, ISignal<bool> closeBeforeExecute) { closeBeforeExecute.Fire(true); var occurence = item.Key as ProjectItemOccurence; if (occurence == null || occurence.ProjectItem == null) { return false; } using (CommitCookie.Commit(Solution)) { var solutionExplorer = Solution.GetComponent<ISolutionExplorer>(); return solutionExplorer.ShowInSolutionExplorer(occurence.ProjectItem, activate: true); } }
private void AdviseCustomDataFromFrontend(Lifetime lifetime, Solution solution) { solution.CustomData.Data.Advise(lifetime, e => { var model = UnityModel; if (e.NewValue == e.OldValue || e.NewValue == null) { return; } switch (e.Key) { case "UNITY_Refresh": if (e.NewValue.ToLower() == true.ToString().ToLower()) { myLogger.Info($"{e.Key} = {e.NewValue} came from frontend."); if (model != null) { Refresh.Fire(model); } } break; case "UNITY_Step": if (e.NewValue.ToLower() == true.ToString().ToLower()) { myLogger.Info($"{e.Key} = {e.NewValue} came from frontend."); model?.Step.Sync(RdVoid.Instance, RpcTimeouts.Default); } break; case "UNITY_Play": myLogger.Info($"{e.Key} = {e.NewValue} came from frontend."); model?.Play.SetValue(Convert.ToBoolean(e.NewValue)); break; case "UNITY_Pause": myLogger.Info($"{e.Key} = {e.NewValue} came from frontend."); model?.Pause.SetValue(Convert.ToBoolean(e.NewValue)); break; } }); }
public void MakeItHappen(string arg) { SomethingHappened.Fire(arg); }
public static void Fire(this ISignal <Unit> me) { me.Fire(Unit.Instance); }