コード例 #1
0
 public void SaveScript()
 {
     if (SelectedTabIndex == "Scripter")
     {
         managedScript = ModelsToScriptHelper.TransformModelsToScript(CodeBlocks.ToList());
     }
     else if (SelectedTabIndex == "Editor")
     {
         ManagedScript.Analyse(editorScript);
     }
     codeBlocks.Clear();
     Messenger.Default.Send(new NotificationMessage("HideScripter"));
 }
コード例 #2
0
        public void SaveScript()
        {
            //Make sure all syntax exceptions are ignored, we'll show them later
            switch (Configurator.getScripterPreference())
            {
            case "Scripter":
                managedScript = ModelsToScriptHelper.TransformModelsToScript(CodeBlocks.ToList());
                break;

            case "Editor":
                ManagedScript.Analyse(editorScript);
                break;
            }
            CodeBlocks.Clear();
            Close();
        }
コード例 #3
0
        public void DeleteNode(object sender)
        {
            if (!(sender is AssignationModel))
            {
                return;
            }
            AssignationModel model = (AssignationModel)sender;

            foreach (AssignationModel child in CodeBlocks.ToList())
            {
                //If it is the same as the searched one
                if (child == sender)
                {
                    //Remove
                    CodeBlocks.Remove(child);
                }
                else
                {
                    //loop inside
                    DeleteInChilds(child, model);
                }
            }
        }
コード例 #4
0
 public void ScripterToScript()
 {
     managedScript = ModelsToScriptHelper.TransformModelsToScript(CodeBlocks.ToList());
     EditorScript  = managedScript.Parse();
 }