Ejemplo n.º 1
0
        private void UpdatePythonNodeContent(ModelBase pythonNode, string value)
        {
            var command = new DynCmd.UpdateModelValueCommand(
                pythonNode.GUID, "ScriptContent", value);

            ViewModel.ExecuteCommand(command);
        }
Ejemplo n.º 2
0
        private void OnScriptEditWindowClosed(object sender, System.EventArgs e)
        {
            if (this.DialogResult.HasValue && (this.DialogResult.Value))
            {
                var command = new DynCmd.UpdateModelValueCommand(
                    this.boundNodeId, this.propertyName, this.editText.Text);

                dynSettings.Controller.DynamoViewModel.ExecuteCommand(command);
            }
        }
Ejemplo n.º 3
0
        public void TestUpdateModelValueCommand()
        {
            Guid   modelGuid = Guid.NewGuid();
            string name      = randomizer.Next().ToString();
            string value     = randomizer.Next().ToString();

            var cmdOne = new DynCmd.UpdateModelValueCommand(modelGuid, name, value);
            var cmdTwo = DuplicateAndCompare(cmdOne);

            Assert.AreEqual(cmdOne.ModelGuid, cmdTwo.ModelGuid);
            Assert.AreEqual(cmdOne.Name, cmdTwo.Name);
            Assert.AreEqual(cmdOne.Value, cmdTwo.Value);
        }
Ejemplo n.º 4
0
        private void UpdatePythonNodeContent(ModelBase pythonNode, string value)
        {
            var command = new DynCmd.UpdateModelValueCommand(
                pythonNode.GUID, "ScriptContent", value);

            dynSettings.Controller.DynamoViewModel.ExecuteCommand(command);
        }
Ejemplo n.º 5
0
        private void UpdateCodeBlockNodeContent(CodeBlockNodeModel cbn, string value)
        {
            var command = new DynCmd.UpdateModelValueCommand(cbn.GUID, "Code", value);

            Controller.DynamoViewModel.ExecuteCommand(command);
        }
Ejemplo n.º 6
0
 private void UpdateCodeBlockNodeContent(CodeBlockNodeModel cbn, string value)
 {
     var command = new DynCmd.UpdateModelValueCommand(cbn.GUID, "Code", value);
     Controller.DynamoViewModel.ExecuteCommand(command);
 }