public override void Execute(DeFlowContext context) { var methodNode = (IMethodNode)context.Nodes[0]; var module = context.Nodes[0].GetModule(); Debug.Assert(module != null); if (module == null) { throw new InvalidOperationException(); } var method = methodNode.MethodDef; List <FieldDef> fields = new List <FieldDef>(); foreach (var instr in method.Body.Instructions) { if (instr.Operand is FieldDef) { fields.Add(instr.Operand as FieldDef); } } fields = fields.Distinct().ToList(); var win = new SetVariableControl(); win.DataContext = fields; win.Owner = this.appService.MainWindow; win.ShowDialog(); }
public override void Execute(DeFlowContext context) { var win = new SettingsControl(); win.DataContext = Settings; win.Owner = this.appService.MainWindow; win.ShowDialog(); }
public override void Execute(DeFlowContext context) { var methodNode = (IMethodNode)context.Nodes[0]; var module = context.Nodes[0].GetModule(); Debug.Assert(module != null); if (module == null) { throw new InvalidOperationException(); } Theme = themeService.Theme; var win = new ManualModeControl(); win.DataContext = new object[3] { methodNode, this.methodAnnotations, this.undoCommandService }; win.Owner = this.appService.MainWindow; win.ShowDialog(); }
public override void Execute(DeFlowContext context) { ProxyMethod.Execute(methodAnnotations, undoCommandService, appService, context.Nodes); }
public override bool IsEnabled(DeFlowContext context) { return(ProxyMethod.CanExecute(context.Nodes)); }
public override bool IsEnabled(DeFlowContext context) { return(SolveAllMethods.CanExecute(context.Nodes)); }
public override bool IsEnabled(DeFlowContext context) { return(true); }
public override bool IsEnabled(DeFlowContext context) { return(context.Nodes.Length == 1 && context.Nodes[0] is IMethodNode && (context.Nodes[0] as IMethodNode).MethodDef.HasBody); }