Exemplo n.º 1
0
        private void EditScriptContent()
        {
            var editWindow = new ScriptEditorWindow(dynamoViewModel);

            editWindow.Initialize(model.GUID, "ScriptContent", model.Script);
            bool?acceptChanged = editWindow.ShowDialog();

            if (acceptChanged.HasValue && acceptChanged.Value)
            {
                // Mark node for update
                model.OnNodeModified();
            }
        }
Exemplo n.º 2
0
 private void EditScriptContent()
 {
     using (var cmd = Dynamo.Logging.Analytics.TrackCommandEvent("PythonEdit"))
     {
         var editWindow = new ScriptEditorWindow(dynamoViewModel);
         editWindow.Initialize(model.GUID, "ScriptContent", model.Script);
         bool?acceptChanged = editWindow.ShowDialog();
         if (acceptChanged.HasValue && acceptChanged.Value)
         {
             // Mark node for update
             model.OnNodeModified();
         }
     }
 }
Exemplo n.º 3
0
 private void EditScriptContent(object sender, EventArgs e)
 {
     using (var cmd = Dynamo.Logging.Analytics.TrackCommandEvent("PythonEdit"))
     {
         if (editWindow != null)
         {
             editWindow.Activate();
         }
         else
         {
             editWindow = new ScriptEditorWindow(dynamoViewModel, pythonNodeModel, pythonNodeView, ref editorWindowRect);
             editWindow.Initialize(workspaceModel.Guid, pythonNodeModel.GUID, "ScriptContent", pythonNodeModel.Script);
             editWindow.Closed += editWindow_Closed;
             editWindow.Show();
         }
     }
 }
Exemplo n.º 4
0
 private void EditScriptContent()
 {
     using (var cmd = Dynamo.Logging.Analytics.TrackCommandEvent("PythonEdit"))
     {
         if (editWindow != null)
         {
             editWindow.Activate();
         }
         else
         {
             editWindow = new ScriptEditorWindow(dynamoViewModel, model, view);
             editWindow.Initialize(model.GUID, "ScriptContent", model.Script);
             editWindow.Closed += editWindow_Closed;
             editWindow.Show();
         }
     }
 }
Exemplo n.º 5
0
 public void editWindow_Closed(object sender, EventArgs e)
 {
     editWindow = null;
 }