Example #1
0
 public ProblemItem()
 {
     RunPostprocessor = TelmaCommandAssistant.Create(
         "Run Postprocessor",
         () => RunPostprocessorImpl(),
         canExecute: this.WhenAnyValue(t => t.ViewModel.ProblemItem !.Problem !.IsSolved));
 }
Example #2
0
        protected override void OnParametersSet()
        {
            base.OnParametersSet();

            AddTitlesView = TelmaCommandAssistant.CreateFromTask("AddTitlesView", async() =>
            {
                var name = "";
                await ViewModel.OnAddTitlesView.Command.Execute(name);
            });
        }
Example #3
0
 public SelectionPanel()
 {
     OnSetSingleMode     = TelmaCommandAssistant.Create("OnSetSingleMode", () => { Aggregator.SelectionMethod = SelectionMethods.Single; });
     OnSetGroupMode      = TelmaCommandAssistant.Create("OnSetGroupMode", () => { Aggregator.SelectionMethod = lastmethod; });
     OnSetPointSelector  = TelmaCommandAssistant.Create("OnSetPointSelector", () => { Aggregator.SelectorType = SelectorTypes.stPoint; });
     OnSetRectSelector   = TelmaCommandAssistant.Create("OnSetRectSelector", () => { Aggregator.SelectorType = SelectorTypes.stRectangle; });
     OnSetCircleSelector = TelmaCommandAssistant.Create("OnSetCircleSelector", () => { Aggregator.SelectorType = SelectorTypes.stCircle; });
     OnSetSelMethod      = TelmaCommandAssistant.Create("OnSetSelMethod", () => { lastmethod = Aggregator.SelectionMethod = SelectionMethods.Select; });
     OnSetUnselMethod    = TelmaCommandAssistant.Create("OnSetUnselMethod", () => { lastmethod = Aggregator.SelectionMethod = SelectionMethods.Unselect; });
     OnSetInvMethod      = TelmaCommandAssistant.Create("OnSetInvMethod", () => { lastmethod = Aggregator.SelectionMethod = SelectionMethods.Inverse; });
 }
        public FilePanel()
        {
            Save = TelmaCommandAssistant.Create("Save", async() =>
            {
                FileService.Component = ViewModel;
                await JSInterop.InvokeVoidAsync("Popup", "save-name");
            });

            Open = TelmaCommandAssistant.Create("Open", async() =>
            {
                FileService.Component = ViewModel;
                await JSInterop.InvokeVoidAsync("Popup", "load-name");
            });
        }
 public SelectionMethodSection()
 {
     OnSetSelMethod   = TelmaCommandAssistant.Create("OnSetSelMethod", () => { lastmethod = Aggregator.SelectionMethod = SelectionMethods.Select; });
     OnSetUnselMethod = TelmaCommandAssistant.Create("OnSetUnselMethod", () => { lastmethod = Aggregator.SelectionMethod = SelectionMethods.Unselect; });
     OnSetInvMethod   = TelmaCommandAssistant.Create("OnSetInvMethod", () => { lastmethod = Aggregator.SelectionMethod = SelectionMethods.Inverse; });
 }
 public WorkModeSection()
 {
     OnSetSingleMode = TelmaCommandAssistant.Create("OnSetSingleMode", () => { Aggregator.SelectionMethod = SelectionMethods.Single; });
     OnSetGroupMode  = TelmaCommandAssistant.Create("OnSetGroupMode", () => { Aggregator.SelectionMethod = lastmethod; });
 }
 public SelectorSection()
 {
     OnSetPointSelector  = TelmaCommandAssistant.Create("OnSetPointSelector", () => { Aggregator.SelectorType = SelectorTypes.stPoint; });
     OnSetRectSelector   = TelmaCommandAssistant.Create("OnSetRectSelector", () => { Aggregator.SelectorType = SelectorTypes.stRectangle; });
     OnSetCircleSelector = TelmaCommandAssistant.Create("OnSetCircleSelector", () => { Aggregator.SelectorType = SelectorTypes.stCircle; });
 }