예제 #1
0
        internal void ExecuteCancelRun()
        {
            var link = dvmLink.Instance();

            if (link != null)
            {
                var rs = link.HomeSpace.RunSettings;
                if (rs.RunType.ToString() == "Manual" && !link.HomeSpace.RunSettings.RunEnabled)
                {
                    var new_cancel = new Dynamo.Models.DynamoModel.ForceRunCancelCommand(false, false);                                       //this can't be assigned anywhere
                    link.HomeSpaceViewModel.RunSettingsViewModel.CancelRunCommand.Execute(false);                                             //only notifies the UI of a calcel
                    link.EngineController.LiveRunnerRuntimeCore.ExecutionState = (int)ProtoCore.ExecutionStateEventArgs.State.ExecutionBreak; //doesn't do anything
                    result = 1;
                }
            }
        }
        private void StartDynamoRun()
        {
            var cmd = new Dynamo.Models.DynamoModel.ForceRunCancelCommand(false, false);

            _dynamoViewModel.ExecuteCommand(cmd);
        }