コード例 #1
0
 public EnumSelector()
 {
     if (System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
     {
         PythonEvaluator pe = new PythonEvaluator();
     }
     InitializeComponent();
 }
コード例 #2
0
 static ScriptConverter()
 {
     PythonEvaluator = new PythonEvaluator();
     DefaultValues = new Dictionary<Type, object>
                         {
                             {typeof (int), 0},
                             {typeof (string), null},
                             {typeof (double), 0.0D},
                             {typeof (decimal), 0.0M},
                             {typeof (bool), false},
                             {typeof (float), 0.0F},
                             {typeof (long), 0L},
                             {typeof (short), 0}
                         };
 }
コード例 #3
0
        static public Task LoadAsync(ThreadProperties tp = null)
        {
            if (_Loader != null)
                return _Loader;

            _Loader = Task.Factory.StartNew(
                () =>
                {
                    using (tp.GetChanger())
                    {
                        PythonEvaluator = new PythonEvaluator();
                    }
                }, 
                CancellationToken.None,
                TaskCreationOptions.LongRunning, 
                TaskScheduler.Default);

            return _Loader;
        }
コード例 #4
0
ファイル: Startup.cs プロジェクト: Klaudit/inbox2_desktop
        public static void PyBinding()
        {
            // All assemblies used by PyBinding should be added here
            Assembly.LoadFrom(Path.Combine(AppDomain.CurrentDomain.SetupInformation.ApplicationBase, "Inbox2.Platform.Channels.dll"));

            // Loads the IronPython runtime
            PythonEvaluator evaluator = new PythonEvaluator();
        }