Ejemplo n.º 1
0
        public override void PrepareWPF()
        {
            try
            {
                pc = new IronPythonDebuger();
                pc.Info1.Content = TaskName;
                pc.Info2.Content = PYPath;

#if RTA
                if (!YZXCPUInRuntime.cpu.HasTask(TaskName))
                {
                    YZXCPUInRuntime.AddIronPythonTask(TaskName, PYPath);
                }

                task = YZXCPUInRuntime.cpu.GetTask(TaskName) as IronPythonTask;

                if (task != null)
                {
                    task.Scope.SetVariable("self", this);
                    task.Scope.SetVariable("CPU", YZXCPUInRuntime.cpu);
                    pc.Task    = task;
                    pc.Loaded += Pc_Loaded;
                }
#endif

                WPF.Child = pc;

                hideInfo();
            }
            catch (XamlParseException ex)
            {
                showInfo(ex.ToString());
            }
        }
Ejemplo n.º 2
0
        private void Pc_Loaded(object sender, RoutedEventArgs e)
        {
#if RTA
            ConnectToTask(task);
            connect2CC();
            YZXCPUInRuntime.TryStart(task);
#endif
        }