示例#1
0
        public void Clear()
        {
            if (Directory.Exists(Controller.TempPath))
            {
                try
                {
                    Directory.Delete(Controller.TempPath, true);
                }
                catch
                {
                    // Do nothing - usually some dev process is accessing the directory
                }
            }
            SharedData.ClearAssemblySearchPaths();
            DefaultValueFunctions.Clear();
            Settings.Default.CodeFile = "";
            CompileFolderName = "";
            Functions.Clear();
            ClearIncludedFiles();
            IsDirty = false;
            Namespaces.Clear();
            Parameters = new ParamInfo[0];
            ProjectFileName = "";
            ProjectXmlConfig = "";
            m_references.Clear();
            ScriptFunctionsFile = "";
            TargetFile = "";
            TemplateFile = "";
            TemplateNamespace = "";
            OutputNames.Clear();
            RootOutput = new OutputFolder("ROOT");
            Constants = new Constant[0];
            m_userOptions.Clear();
            DebugProjectFile = "";
            Actions = new BaseAction[0];
            m_referencedAssemblies.Clear();
            ApiExtensionMethods.Clear();

            TriggerProjectChangedEvent(true);
        }
示例#2
0
 public void AddAction(BaseAction action)
 {
     AddAction(action, Actions.Length);
 }
示例#3
0
        public void AddAction(BaseAction action, int index)
        {
            BaseAction[] newActions = new BaseAction[Actions.Length + 1];
            Array.Copy(Actions, newActions, Actions.Length);

            for (int i = newActions.Length - 1; i > index; i--)
            {
                newActions[i] = newActions[i - 1];
            }
            newActions[index] = action;
            Actions = newActions;
            IsDirty = true;
        }
示例#4
0
        public void RemoveAction(int index)
        {
            BaseAction[] newActions = new BaseAction[Actions.Length - 1];
            int newIndex = 0;

            for (int i = 0; i < Actions.Length; i++)
            {
                if (i == index)
                {
                    continue;
                }
                newActions[newIndex] = Actions[i];
                newIndex++;
            }
            Actions = newActions;
            IsDirty = true;
        }