コード例 #1
0
        public DynamoController(SplashScreen splash)
        {
            Bench = new dynBench(this);

            splashScreen = splash;
            homeSpace = CurrentSpace = new HomeWorkspace();

            Bench.CurrentX = dynBench.CANVAS_OFFSET_X;
            Bench.CurrentY = dynBench.CANVAS_OFFSET_Y;

            Bench.InitializeComponent();
            Bench.Log(String.Format(
                "Dynamo -- Build {0}.",
                Assembly.GetExecutingAssembly().GetName().Version.ToString()));

            //WTF
            Bench.settings_curves.IsChecked = true;
            Bench.settings_curves.IsChecked = false;

            dynSettings.Bench = Bench;
            dynSettings.Controller = this;
            dynSettings.Workbench = Bench.WorkBench;

            Bench.LockUI();

            //run tests
            if (FScheme.RunTests(Bench.Log))
                Bench.Log("All Tests Passed. Core library loaded OK.");

            FSchemeEnvironment = new ExecutionEnvironment();

            LoadBuiltinTypes();
            PopulateSamplesMenu();

            Bench.Activated += Bench_Activated;
        }
コード例 #2
0
        /// <summary>
        ///     Class constructor
        /// </summary>
        public DynamoController(ExecutionEnvironment env)
        {
            dynSettings.Controller = this;

            this.RunEnabled = true;
            this.CanRunDynamically = true;

            Bench = new dynBench(this);
            dynSettings.Bench = Bench;

            // custom node loader
            string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
            string pluginsPath = Path.Combine(directory, "definitions");

            CustomNodeLoader = new CustomNodeLoader(pluginsPath);

            SearchViewModel = new SearchViewModel();
            PackageManagerClient = new PackageManagerClient(this);
            PackageManagerLoginViewModel = new PackageManagerLoginViewModel(PackageManagerClient);
            PackageManagerPublishViewModel = new PackageManagerPublishViewModel(PackageManagerClient);

            FSchemeEnvironment = env;

            HomeSpace = CurrentSpace = new HomeWorkspace();
            Bench.CurrentOffset = new Point(dynBench.CANVAS_OFFSET_X, dynBench.CANVAS_OFFSET_Y);

            Bench.InitializeComponent();
            Bench.Log(String.Format(
                "Dynamo -- Build {0}.",
                Assembly.GetExecutingAssembly().GetName().Version));

            DynamoLoader.LoadBuiltinTypes(SearchViewModel, this, Bench);
            DynamoLoader.LoadSamplesMenu(Bench);

            Bench.settings_curves.IsChecked = true;
            Bench.settings_curves.IsChecked = false;

            Bench.LockUI();

            Bench.Activated += OnBenchActivated;
            dynSettings.Workbench = Bench.WorkBench;

            //run tests
            if (FScheme.RunTests(Bench.Log))
            {
                if (Bench != null)
                    Bench.Log("All Tests Passed. Core library loaded OK.");
            }
        }
コード例 #3
0
ファイル: DynamoController.cs プロジェクト: Tadwork/Dynamo
        //public DynamoController(SplashScreen splash)
        public DynamoController()
        {
            Bench = new dynBench(this);

            homeSpace = CurrentSpace = new HomeWorkspace();

            Bench.CurrentX = dynBench.CANVAS_OFFSET_X;
            Bench.CurrentY = dynBench.CANVAS_OFFSET_Y;

            Bench.InitializeComponent();
            Bench.Log(String.Format(
                "Dynamo -- Build {0}.",
                Assembly.GetExecutingAssembly().GetName().Version.ToString()));

            dynSettings.Bench = Bench;
            dynSettings.Controller = this;
            dynSettings.Workbench = Bench.WorkBench;

            if (DynamoCommands.ShowSplashScreenCmd.CanExecute(null))
            {
                DynamoCommands.ShowSplashScreenCmd.Execute(null);
            }

            //WTF
            Bench.settings_curves.IsChecked = true;
            Bench.settings_curves.IsChecked = false;

            Bench.LockUI();

            //run tests
            if (FScheme.RunTests(Bench.Log))
                Bench.Log("All Tests Passed. Core library loaded OK.");

            FSchemeEnvironment = new ExecutionEnvironment();

            LoadBuiltinTypes();
            PopulateSamplesMenu();

            Bench.Activated += Bench_Activated;

            //Dispatcher.CurrentDispatcher.Hooks.DispatcherInactive += new EventHandler(Hooks_DispatcherInactive);
        }