LynnaLab.FileComponent.SetFileParser C# (CSharp) Method

SetFileParser() public method

public SetFileParser ( FileParser p ) : void
p FileParser
return void
        public void SetFileParser(FileParser p)
        {
            parser = p;
            if (parser != null)
                _project = parser.Project;
        }

Usage Example

示例#1
0
        // Attempt to insert newComponent after refComponent, or at the end if
        // refComponent is null
        // Returns false if failed (refComponent doesn't exist or newComponent already
        // exists in this file).
        public bool InsertComponentAfter(FileComponent refComponent, FileComponent newComponent)
        {
            int i;

            if (refComponent == null)
            {
                i = fileStructure.Count - 1;
            }
            else
            {
                i = fileStructure.IndexOf(refComponent);
                if (i == -1)
                {
                    return(false);
                }
            }

            if (fileStructure.Contains(newComponent))
            {
                return(false);
            }

            if (newComponent is Label)
            {
                AddLabelToDictionaries(newComponent as Label);
            }

            fileStructure.Insert(i + 1, newComponent);
            newComponent.SetFileParser(this);

            Modified = true;

            return(true);
        }
All Usage Examples Of LynnaLab.FileComponent::SetFileParser