Exemple #1
0
            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();
            }
Exemple #2
0
            public override void Execute(DeFlowContext context)
            {
                var win = new SettingsControl();

                win.DataContext = Settings;
                win.Owner       = this.appService.MainWindow;
                win.ShowDialog();
            }
Exemple #3
0
            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();
            }
Exemple #4
0
 public override void Execute(DeFlowContext context)
 {
     ProxyMethod.Execute(methodAnnotations, undoCommandService, appService, context.Nodes);
 }
Exemple #5
0
 public override bool IsEnabled(DeFlowContext context)
 {
     return(ProxyMethod.CanExecute(context.Nodes));
 }
Exemple #6
0
 public override bool IsEnabled(DeFlowContext context)
 {
     return(SolveAllMethods.CanExecute(context.Nodes));
 }
Exemple #7
0
 public override bool IsEnabled(DeFlowContext context)
 {
     return(true);
 }
Exemple #8
0
 public override bool IsEnabled(DeFlowContext context)
 {
     return(context.Nodes.Length == 1 && context.Nodes[0] is IMethodNode && (context.Nodes[0] as IMethodNode).MethodDef.HasBody);
 }